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

RF switch configuration

$
0
0

@Prozector wrote:

I have RF switches which can be switched by running this script (part of my scripts.yaml):

    sw_1_1_1_toggle:
       sequence:
         - service: mqtt.publish
           data_template:
              topic: 'rf/cmnd/backlog'
              payload: "RfSync 9990; RfLow 300; RfHigh 960; RfCode #146874"
              retain: true

Switches uses same payload (RfCode) both for switching off and on and relays do not send any data – they just switches their state.

I want to make a “light switch” which will function as follows:

  1. Home Assistant “subscribes” on RF Bridge events like this:
    “RfReceived”:{“Sync”:9990,“Low”:300,“High”:960,“Data”:“146874”,“RfKey”:“None”}
  2. If event received and switch state is Off set switch icon to On, if switch if On then switch icon state to Off
  3. If my “light switch” is toggled in interface it sends payload to backlog. Payload is the same as in (1) so event (2) happens and switch icon changes it state.

Please, help me to achieve this. I read a lot of topics here but have not found anything similar to my idea.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles