Skip to content

Commit

Permalink
Adjusting examples
Browse files Browse the repository at this point in the history
  • Loading branch information
enkama committed Jan 22, 2022
1 parent c5a74d9 commit 0b76b6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/counter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ automation:
data:
variable: test_counter
value: >
{{ (variable.state | int) + 1 }}
{{ (variable.state | int(default=0)) + 1 }}
2 changes: 1 addition & 1 deletion examples/keypad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ automation:
data:
variable: keypad_timer
value: >
{{ [((variable.state | int) - 1), 0] | max }}
{{ [((variable.state | int(default=0)) - 1), 0] | max }}
- alias: keypad_timeout
trigger:
Expand Down
2 changes: 1 addition & 1 deletion examples/timer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ automation:
data:
variable: test_timer
value: >
{{ [((variable.state | int) - 1), 0] | max }}
{{ [((variable.state | int(default=0)) - 1), 0] | max }}
- alias: test_timer_trigger
trigger:
Expand Down

0 comments on commit 0b76b6a

Please sign in to comment.