#script
1 messages ยท Page 1 of 1 (latest)
This is the script
alias: My Script
fields:
motion_sensor_entity_id:
example: switch.switch_kitchen_switch_l1
description: The motion sensor
switch_entity_id:
example: switch.switch_kitchen_switch_l1
description: The light
time_away:
example: '2'
description: How long without detecting movement
sequence:
- condition: template
value_template: '{{is_state(switch_entity_id, ''off'')}}'
- service: switch.turn_on
target:
entity_id: '{{ switch_entity_id }}'
- wait_for_trigger:
- platform: template
value_template: '{{is_state(motion_sensor_entity_id, ''off'')}}'
for:
minutes: '{{ time_away|int }}'
- service: switch.turn_off
target:
entity_id: '{{ switch_entity_id }}'
mode: single
does anyone know what I'm doing wrong?
is it that the fields are not passed on to the wait_for_trigger?
spam? apologies for that, I didnt mean to, first time user and on the web version, I thought I didnt send the first message
Well, as a first time user you should have read the rules ๐
no no, that was common sense, i meant that I'm a first user of discord...
again, sorry
Sure, but if you just joined the server you were directed to read #rules
And after the bot cleaned up you were sent warnings, which you ignored
So, please pay more attention ๐
https://www.home-assistant.io/docs/configuration/splitting_configuration/#advanced-usage on this page, it says "!include_dir_* automation" would include the automation directory and subdirectories. Is that correct or am I reading it wrong? When I add this to my configuration.yaml file it throws an error.