I have a HA automation that simply pushes 2 buttons on an ESPHome ESP32. When I perform both pushes in one automation the ESP registers the pushes but does not change the light state. When I break the automation down in to 2 automations with 1 button press each, it works every time.
alias: K and L test
description: ""
triggers:
- trigger: time
at: "22:26:00"
weekday:
- mon
- tue
- wed
- thu
- fri
conditions: []
actions:
- action: button.press
metadata: {}
target:
entity_id: button.esphome_dev_kitchen_light
data: {}
- action: button.press
metadata: {}
target:
entity_id: button.esphome_dev_living_room_light
data: {}
mode: single
Single button automation:
alias: Living Room light 5 pm
description: ""
triggers:
- trigger: time
at: "17:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
conditions: []
actions:
- action: button.press
metadata: {}
target:
entity_id: button.esphome_dev_living_room_light
data: {}
mode: single
ESPHome button configs:
- platform: template
name: "Kitchen light"
web_server:
sorting_weight: 5
on_press:
- logger.log: "Kitchen light pressed"
- lambda: |-
// Change frequency to 350 MHz before sending
id(transceiver).set_frequency(350.0e6);
- remote_transmitter.transmit_raw:
code: [179, -399, 199, -193, 366, -221, 366, -220, 364, -220, 365, -221, 362, -221, 366, -221, 367, -442, 150, -444, 151, -417, 174, -415, 174, -6809]
repeat:
times: 12
wait_time: 0ms
- platform: template
name: "Living Room light"
web_server:
sorting_weight: 15
on_press:
- logger.log: "Living room button pressed"
- lambda: |-
// Change frequency to 433.92 MHz before sending
id(transceiver).set_frequency(433.92e6);
- remote_transmitter.transmit_raw:
code: [401, -445, 343, -466, 317, -466, 344, -468, 323, -468, 349, -445, 350, -446, 352, -448, 351, -447, 353, -448, 376, -422, 377, -5225, 779, -421, 377, -823, 779, -395, 403, -798, 402, -821, 778, -397, 804, -396, 402, -798, 402, -822, 378,
-799, 402, -821, 779, -421, 377, -822, 780, -420, 781, -421, 378, -822, 377, -799, 402, -822, 378, -821, 780, -421, 378, -799, 804, -396, 803, -395, 805, -420, 780, -420, 378, -821, 778, -423, 377, -821, 378, -822, 377, -823, 778, -422, 780, -421,
378, -800, 401, -821, 377, -823, 378, -822, 780, -421, 377, -801, 801, -396, 402, -822, 779, -422, 377, -800, 403, -797, 402, -797, 804, -396, 403, -797, 402, -798, 401, -821, 378, -822, 378, -822, 378, -799, 403, -799, 401, -798, 804, -396, 804,
-395, 804, -421, 377, -824, 780, -396, 800, -421, 779, -421, 779, -422, 779, -396, 805, -396, 803, -421, 779, -421, 377, -25648]
repeat:
times: 5
wait_time: 0ms
The logs show the button presses in all cases, but when I do both together there are no error messages but the ligths do not toggle.
What in the world am I missing here?