I’m using a Broadlink RM Pro to toggle the power on an air purifier that is plugged into an energy monitoring plug. I’d like to make a switch in HA that looks at the energy usage to determine if it is on or off before it sends a command. Right now it just toggles when I call this script:
toggle_power_exercise_room_air_puifier:
sequence:
- service: remote.send_command
target:
device_id: b361d3ebc7b36837a14648de246db3cc
data:
device: exercise_room_air_purifier
command: power
hold_secs: 2.2
I’m guessing templating is involved and was hoping I could get some hints from someone who has already done this.