says:
2017-06-15 22:45:48 INFO (MainThread) [homeassistant.setup] Setting up notify
2017-06-15 22:45:49 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected int for dictionary value @ data[‘trigger’][0][‘for’][‘minutes’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/automation/
I use input_sliders too for time delays. The way I get around the “for” not being able to use templates is call a script and use a template in the delay action. It does require you to make a new automation to cancel the script if motion is detected. Let me know if you’re stuck and I can post an example later when I’m at my computer.
Here’s an automation I use to turn off the basement lights if there’s no motion in x minutes (which it gets from the input_slider. It calls a script and uses that delay time. If motion is detected while the script is in it’s delay period, the second automation turns the script off, thereby cancelling the automation to turn off the lights.
Here’s the automations (you don’t need to use the conditions, I just built some input_booleans as options):
- alias: 'Basement Lights Timer Start'
trigger:
platform: state
entity_id: binary_sensor.in_the_basement_occupancy
from: 'on'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.basement_motion
state: 'on'
- condition: state
entity_id: input_boolean.guest_mode_basement
state: 'off'
action:
service: script.turn_on
entity_id: script.basement_motion
- alias: 'Basement Lights Timer Cancel'
trigger:
platform: state
entity_id: binary_sensor.in_the_basement_occupancy
from: 'off'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.basement_motion
state: 'on'
- condition: state
entity_id: input_boolean.guest_mode_basement
state: 'off'
action:
service: script.turn_off
entity_id: script.basement_motion