I have a dumb Samsung TV that I want to control with a Broadlink. I have the TV plugged into a Xiaomi Zigbee Plug to monitor the power consumption for the purposes of keeping the switch in sync. Admittedly this is a little over my head at the moment and I am in struggle town.
This is what I have in my switch.yaml currently:
TV_switch:
value_template: "{{ states('sensor.tv_consumption_monitor_switch_powerdraw') | int > 20}}"
turn_on:
- service: switch.broadlink_send_packet_10_0_20_62
data:
packet:
- "JgCMAJSVETkRORE4EhMRFBEUERQRFBE4EjgROREUERQRFBETEhMTEhE5ERQRFBEUERMSExITETkRFBE4EjgRORE5EjcSOBEABgaUlRE5ETkROBITERQRFBEUERQROBI4ETkRFBEUERQTERITEhMROREUERQRFBETEhMSExE5ERQTNhI4EjgRORE4EjgSAA0FAAAAAAAAAAAAAAAA="
turn_off:
- service: switch.broadlink_send_packet_10_0_20_62
data:
packet:
- "JgCMAJSVETkRORE4EhMRFBEUERQRFBE4EjgROREUERQRFBETEhMTEhE5ERQRFBEUERMSExITETkRFBE4EjgRORE5EjcSOBEABgaUlRE5ETkROBITERQRFBEUERQROBI4ETkRFBEUERQTERITEhMROREUERQRFBETEhMSExE5ERQTNhI4EjgRORE4EjgSAA0FAAAAAAAAAAAAAAAA="
Am I on the right path with this?