Automation/Template Switch?

Hello! So I am very new to Home Assistant, and I am deeply learning. However I do need a lil bit of help.

I have a Broadlink RM4 Mini, where I have some Scripts setup to Toggle Power (turn on/off), and the other basic controls.

What I want to do is to bring those “scripts” into an actual “switch” to report the state on/off. That way it can report the right status. Using the helper seems like a great idea, I tried to do the code myself, with half success, it wasn’t reporting any status. Which is why I think I use a Automation here?

Thank you :slight_smile:

Hello and welcome.

Please share what you have already tried, correctly formatted for the forum.

I’ve been playing with REST and if the response to setting the status sends a confirmation then that can be used to to confirm status

Be interested to your approach as @tom_l said
Good luck!


So, I tried the basic configuration for the template switch.

  - platform: template
        friendly_name: 'TV'
        value_template: "{{ is_state('input_boolean.television', 'on') }}"
          service: script.power_television
          service: script.power_television

It works, however it doesn’t report any statuses, I’m stumped LOL.

I know I’m probably incorrect, but my logic is that from the value template if the state is “on”, it should run the scripts. This would be my 2 am brain trying to code.

Ah! So I did remake my Automation and I finally learned myself, so sorry for making this thread!

The huge issue is going to be that it’s very easy to get HA and the device status out of synch.

If you ever use the remote to operate the device then HA won’t know it changed state.