Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Add state to existing switch

$
0
0

@WeldFire wrote:

Hello,

Is there a way to add state to an existing broadlink switch or create a new switch containing state that calls the original switch?

I have a broadlink IR Blaster with which I’m controlling my TV and I would like to track whether it is on before sending as the command for my TV is a toggle command.

I don’t see any way to add the current state of the TV from the documentation that I see here:

I’ve done something similar before with a command line platform and would like to do something like this:

- platform: broadlink
    host: !secret ip-broadlink-ir_blaster
    switches:
      tv:
        friendly_name: "Samsung TV Power"
        command_on: !secret living_room-samsung_tv-power
        command_off: !secret living_room-samsung_tv-power
        # command_state: "wget --spider --server-response --tries=1 --timeout=5 http://192.168.1.5:8000 2>&1 | grep '200\ OK'"

Best Regards,
WeldFire

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>