I have taken RTL2832_433 and sent to MQTT. Here’s a dump on home/rtl_433
{"time" : "2019-01-15 03:07:44", "model" : "Acurite tower sensor", "id" : 12644, "sensor_id" : 12644, "channel" : "A", "temperature_C" : 0.900, "humidity" : 77, "battery_low" : 0}
So battery_low 0 must be okay and 1 must trigger a low condition.
Here’s my configuration.yaml. Temp and humidity working perfectly. I know my unit of measurement should not be % for battery but I’m stumped.
sensor:
- platform: mqtt
state_topic: ‘home/rtl_433’
name: ‘Outdoor Temp’
unit_of_measurement: ‘F’
value_template: ‘{{ ((value_json.temperature_C * 1.8) + 32)|round(1) }}’ - platform: mqtt
state_topic: ‘home/rtl_433’
name: ‘Outside Humidity’
unit_of_measurement: ‘%’
value_template: “{{ value_json.humidity }}” - platform: mqtt
name: ‘Battery Level’
state_topic: ‘home/rtl_433’
unit_of_measurement: ‘%’
value_template: ‘{{ value_json.battery_low }}’
device_class: battery
How do I display OK for 0 and Low for 1?
I took the screenshot before I added the battery. It just says 0%