hello, I am running Home Assistant on one Raspberry Pi and RTL_433 on a separate Raspberry Pi. I am able to run RTL_433 on one Pi using:
‘$ rtl_433 -f 344975000 -F “mqtt://10.54.1.249:1883,user=mqtt,pass=password,events=rtl_433[/model][/id]”’
You have defined an MQTT Sensor with a device_class of “opening”. That’s not a valid choice for an MQTT Sensor but it is valid for an MQTT Binary Sensor.
If you want it to remain as an MQTT Sensor you will have to remove the device_class option because the ones supported by an MQTT Sensor don’t apply to a window.
On the other hand, if you made a mistake and do want it to be an MQTT Binary Sensor, simply move its configuration from the sensor: domain to the binary_sensor: domain.
In addition, your value_template may not meet the needs of an MQTT Binary Sensor. The template must produce ON when the window is open and OFF when it’s closed. Are you certain the template does that?
Thanks but still no luck. Do you think I have to include “Honeywell-Security” in the state topic? I tried a couple variations to no avail. Frustrating because I can see the sensors when i listen to all in mqtt
The sensor’s configuration, in your first post, contains the following:
state_topic: rtl_433
That’s what I also used in my suggestion because I assumed it was correct.
Looking at the results of what you just posted, I see that the assumption may have been incorrect. Unless you have data showing that payloads are in fact published to rtl_433 then I suggest you use this instead:
- platform: mqtt
state_topic: rtl_433/Honeywell-Security/980218
name: Back Door
device_class: opening
value_template: "{{ 'ON' if value_json.state == 'open' else 'OFF' }}"
For each MQTT Binary Sensor you define, simply ensure the last six digits of its state_topic matches the physical sensor’s id value.