Hi
I’m trying to create a timer using the “variable” addon. I tried the example provided, but I keep getting the following error.
2019-10-06 10:40:47 INFO (MainThread) [homeassistant.helpers.script] Script timer start sous-sol: Running script
2019-10-06 10:40:47 INFO (MainThread) [homeassistant.helpers.script] Script timer start sous-sol: Executing step call service
2019-10-06 10:40:47 INFO (MainThread) [homeassistant.helpers.script] Script timer start sous-sol: Executing step call service
2019-10-06 10:40:48 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_track_utc_time_change.<locals>.pattern_time_change_listener(<Event time_c....002316-04:00>) at /usr/src/homeassistant/homeassistant/helpers/event.py:402
Traceback (most recent call last):
File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 411, in pattern_time_change_listener
calculate_next(now)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 395, in calculate_next
localized_now, matching_seconds, matching_minutes, matching_hours
File "/usr/src/homeassistant/homeassistant/util/dt.py", line 256, in find_next_time_expression_time
raise ValueError("Cannot find a next time: Time expression never " "matches!")
ValueError: Cannot find a next time: Time expression never matches!
Most likely it is a bad configuration on my side, but I can’t really see my error
I was wondering if anyone would have a thought about my problem.
I’m running hass.io on ubuntu.
Home assistant version is 0.99.3
variable addon commit version is fd9b44e
Here’s the relevant code
[variable]
timer_soussol:
value: 30
attributes:
icon: mdi:alarm
[script]
'1570313908374':
alias: timer start sous-sol
sequence:
- data:
value: '30'
variable: timer_soussol
service: variable.set_variable
- data:
entity_id: automation.timer_countdown_sous_sol
service: automation.turn_on
[automation]
- id: '1570314313861'
alias: timer_countdown_sous_sol
initial_state: 'off'
trigger:
- hours: ''
minutes: ''
platform: time_pattern
seconds: /1
condition: []
action:
- data:
value_template: '{{ [((variable.state | int) - 1), 0] | max }}'
variable: timer_soussol
service: variable.set_variable
- id: '1570314576664'
alias: timer_end_sous_sol
trigger:
- entity_id: variable.timer_soussol
platform: state
to: '0'
condition: []
action:
- data:
entity_id: automation.timer_countdown_sous_sol
Thank in advance
Regards