MQTT Trigger for cheap RC with Sonoff RFBridge

Hi,

I am fairly new to home assistant and migrate my old self made smart home implementation to home assistant.

Everything works fine but I am stuck now.

To control my lights I am using cheap 433MHz RCs from amazon. These RCs are really dumb but sufficient for me. To get them into my old smart home software I have used the Sonoff RF Bridge with Tasmota to get MQTT messages, when the button on the RC is pressed.

What I get via MQTT ist this:

Topic: tele/RFBRIDGE/RESULT
Payload: {“Time”:“2024-07-27T17:41:42”,“RfReceived”:{“Sync”:10800,“Low”:330,“High”:1040,“Data”:“19D6F1”,“RfKey”:“None”}}

Where Data contains the ID of the button pressed on the RC.

Could you give me a hint or a pointer to some docs one how to use the RC to switch my lights ?

Thanks

HI

trigger:
  - platform: mqtt
    topic: tele/RFBRIDGE/RESULT
    payload: 19D6F1
    value_template: "{{ value_json.RfReceived.Data }}"

action:
  - service: light.toggle
    metadata: {}
    data: {}
    target:
      entity_id: light.whateveryourlightiscalled

You would use the above as a trigger and action for your automation to turn on/off the light

Hi,

worked!

I were not able to put the lines in the config.yaml. But when I use your snippet while setting up an automation it worked perfectly.

Thanks a lot !

Glad it worked. If you are on the page where you setup the automation tap the 3 vertical dots in top right corner and select edit in yaml and you could have put them in there.

jepp, that’s what I did, and it worked really nice :slight_smile: