docs: Add an example of manual Home Assisant integration ()

This commit is contained in:
Marc Mezzarobba 2021-11-13 11:57:01 +01:00 committed by GitHub
parent 04cbdbcbf0
commit cf05ceb3ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,9 +53,44 @@ You can easily set up some MQTT things then:
Home Assistant has good MQTT support and can read rtl_433 event topics.
::: warning
Example needed
:::
Assuming rtl_433 is started with
rtl_433 -C si -M time:unix:usec:utc -F mqtt
you can set up temperature and humidity sensors in Home Assistant with
sensor:
- name: temperature_raw
state_topic: "rtl_433/host/devices/Prologue-TH/5/3/+/temperature_C"
platform: mqtt
device_class: temperature
unit_of_measurement: "°C"
force_update: true
expire_after: 610
- name: humidity_raw
state_topic: "rtl_433/host/devices/Prologue-TH/5/3/+/humidity"
platform: mqtt
device_class: humidity
unit_of_measurement: "%"
force_update: true
expire_after: 610
You may want to postprocess the received values with something like
sensor:
- name: temperature
entity_id: sensor.temperature_raw
platform: filter
filters:
- filter: outlier
window_size: 2
radius: 3.0
See [the Home Assistant documentation](https://www.home-assistant.io/integrations/sensor.mqtt/)
for more information.
See also [rtl_433_mqtt_hass.py](https://github.com/merbanan/rtl_433/tree/master/examples/rtl_433_mqtt_hass.py)
MQTT Home Assistant auto discovery.