Is there any good reason why this doesn’t work? The switch changes the state of the input_boolean, but the packet is never sent to the broadlink device.
switch:
- platform: broadlink
host: 192.168.2.10
mac: 'xxx'
friendly_name: 'RM pro+'
type: rm2_pro_plus
vive_sensor_power:
value_template: '{{ states("input_boolean.vive_sensor_power") }}'
friendly_name: 'Vive Sensor Power'
turn_on:
- service: switch.broadlink_send_packet_192_168_2_10
data:
packet: "xxx"
- service: input_boolean.turn_on
data:
entity_id: input_boolean.vive_sensor_power
turn_off:
- service: switch.broadlink_send_packet_192_168_2_10
data:
packet: "xxxx"
- service: input_boolean.turn_off
data:
entity_id: input_boolean.vive_sensor_power
input_boolean:
vive_sensor_power:
name: Vive Sensor Power
On the other hand, writing it as a script works as intended… Is it the tag “sequence” that is the reason why it’s working? I don’t understand why, the rest of the code is identical as far as I can tell:
script:
vive_sensor_power:
sequence:
- service: switch.broadlink_send_packet_192_168_2_10
data:
packet: "xxx"
- service: input_boolean.turn_on
data:
entity_id: input_boolean.vive_sensor_power