Trigger ON/OFF Generic 433mhz RF socket Sonoff Bridge Espurna Firmware

Hi Am New to HA
I have successfully flashed Espurna on my sonoff Bridge , I am able to status of my PIR sensor & use in my automation it works fine

Question:
Now I want to switch ON/OFF my generic 433mhz RF socket using home Assitant
I have learned the RF code both ON & OFF for the socket into Espurna Learn interface.

I have added an MQTT switch to my HA (Same as Sonoff Tasmotised switch).
Configuration.yaml

switch 04:
platform: mqtt
name: “photo Strip Light”
command_topic: “SBRIDGE01/rfout/set”
state_topic: “SBRIDGE01/rfin”
qos: 1
payload_on: “2EEA019A04B0B61201”
payload_off: “2EE0019A04B0B61203”
retain: true

When I trigger to ON state in HA UI the switch automatically pulls back itself to OFF.

Can you help me know how to make that switch work & Turn ON/OFF my RF socket

Thanks in advance.

This normally means the state_topic message was not received from the device confirming it had switched state, so HA assumes the switch did not happen. What does the switch send back after the command is sent?

I get HA popup “Turned on photo Strip Light” & it switches back to off

Sorry, the question wasn’t clear, what I meant was, what MQTT message does the switch send back to indicate its status when it changes state.

I assume No message is sent back. as i do not see anything

In that case you need to set optimistic: true and remove the state_topic entry. This tells HA not to expect a response.

2 Likes

Hey gpbenton. I know this wasn’t my thread, but I had a similar issue, and this sorted it for me.

So, thank you! :ok_hand: