stevemann
(Stephen Mann (YAML-challenged))
May 6, 2022, 4:22am
1
I want to write a script to send three commands to my Broadlink remote with a 750ms delay between each. Individually, each command works just fine, but when I put them into a script, only the first command is sent.
Any ideas what I did wrong?
alias: fios_stb_office_msnbc
sequence:
- service: remote.send_command
data:
device: Office STB
command: 6
target:
entity_id: remote.broadlink_office_remote
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 750
- service: remote.send_command
data:
device: Office_STB
command: 0
target:
device_id: c93b2be6ffa811eab444bf3b4d7f7b79
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 750
- service: remote.send_command
data:
device: Office STB
command: 3
target:
device_id: c93b2be6ffa811eab444bf3b4d7f7b79
mode: single
rgnyldz
(ErgĂĽn YILDIZ)
March 30, 2024, 8:25pm
3
I believe I have the same issue. I had a script that blinks a bulb red as a warning where I turn on and of the light bulb with a delay of 300ms.
It was working before but after HA update I think this functionality broke somehow. Not sure with which update tho.
alias: Bench Danger
sequence:
- repeat:
count: 5
sequence:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.bench_light_lt
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 300
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 0
- 0
target:
entity_id: light.bench_light_lt
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 300
mode: single
whatever value I put in delay, it’s always doing around 4 seconds.
stevemann
(Stephen Mann (YAML-challenged))
March 30, 2024, 10:17pm
4
Try editing the script change a single character, say 0 to 0. You don’t change the logic but it triggers the “Save”. When you click on “Save” the syntax is checked. Maybe you will identify anerror.
Here is a test that I just ran:
alias: Test
sequence:
- repeat:
count: 5
sequence:
- service: switch.turn_on
target:
entity_id: switch.kim_worklight_relay
data: {}
- delay:
milliseconds: 500
- service: switch.turn_off
target:
entity_id: switch.kim_worklight_relay
data: {}
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
mode: single
1 Like