Anyone know why the automation below requires a delay of 1 second in order to work properly? I am receiving a 433 MHz code from a door sensor, which the automation is then supposed to turn on a 433 MHz outlet. If I set the delay to anything less than 1 second, the switch in HA will change, however the 433 MHz outlet doesn’t receive the turn_on code. If I use a Zwave switch, the delay is not required. It appears this issue deals strictly with receiving and turning on 433 MHz devices.
#Working Automation
alias: “pilight_door1_closed”
trigger:
platform: event
event_type: pilight_received
event_data:
protocol: ev1527
uuid: 0000-b8-27-eb-4ffabe
unitcode: 879842
state: opened
action:
- service: logbook.log
data:
name: "Automation Triggered: "
message: “pilight_door1_closed”
- delay:
seconds: 1
- service: switch.turn_off
entity_id: switch.zap1
#Not Working Automation
alias: “pilight_door1_closed”
trigger:
platform: event
event_type: pilight_received
event_data:
protocol: ev1527
uuid: 0000-b8-27-eb-4ffabe
unitcode: 879842
state: opened
action:
- service: logbook.log
data:
name: "Automation Triggered: "
message: “pilight_door1_closed”
- service: switch.turn_off
entity_id: switch.zap1
#Switch
platform: command_line
switches:
zap1:
command_on: ‘pilight-send -p clarus_switch -t -u=63 -i=A1’
command_off: ‘pilight-send -p clarus_switch -f -u=63 -i=A1’
And for the record, the logbook info is in there just for troubleshooting. And I’m using the pilight-send command because the clarus_switch
protocol doesn’t support alphanumeric IDs.