Skip to content

Commit

Permalink
Fix template examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
snarky-snark committed Aug 9, 2019
1 parent 33e3d21 commit eeeffb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ var:
toggle_count:
friendly_name: "Toggle Count"
initial_value: 0
value_template: "{{{ (var.toggle_count | int) + 1 }}}"
value_template: "{{ (var.toggle_count | int) + 1 }}"
entity_id:
- input_boolean.foo
- input_boolean.bar
Expand All @@ -188,7 +188,7 @@ multiplies variables `y` and `z` whenever `my_custom_event` fires.
var:
x:
friendly_name: 'yz'
value_template: "{{{ (var.y | int) * ( var.z | int) }}}"
value_template: "{{ (var.y | int) * ( var.z | int) }}"
event_type: my_custom_event
```

Expand Down Expand Up @@ -298,7 +298,7 @@ adds it to the variable `z`. In this example, `bottle_event` contains an
var:
avg_formula_plus_z:
friendly_name: "Average Formula Plus z"
value_template: "{{{ ( avg_formula | float) + ( var.z | float) }}}"
value_template: "{{ ( avg_formula | float) + ( var.z | float) }}"
query: "SELECT COALESCE(SUM(CAST(JSON_EXTRACT(event_data, '$.volume') AS FLOAT))/7.0, 0) AS avg_formula FROM events WHERE event_type = 'bottle_event' AND time_fired BETWEEN DATETIME('now', 'start of day', '-7 days') AND DATETIME('now', 'start of day');"
column: 'avg_formula'
tracked_event_type: bottle_event
Expand Down

0 comments on commit eeeffb5

Please sign in to comment.