#script

1 messages ยท Page 1 of 1 (latest)

slate kraken
#

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?

gritty star
#

Please stop and read that NOW

slate kraken
#

spam? apologies for that, I didnt mean to, first time user and on the web version, I thought I didnt send the first message

gritty star
#

Well, as a first time user you should have read the rules ๐Ÿ˜‰

slate kraken
#

no no, that was common sense, i meant that I'm a first user of discord...

#

again, sorry

gritty star
#

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 ๐Ÿ˜‰

earnest cave