Skip to content

Commit

Permalink
Update rtl_433_mqtt_hass.py to add battery_mV (#2725)
Browse files Browse the repository at this point in the history
In addition to battery_ok, many devices also surface the measured battery voltage.
  • Loading branch information
fallenpegasus authored Nov 26, 2023
1 parent 1e02cdc commit 1dc9f69
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/rtl_433_mqtt_hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,19 @@
}
},

"battery_mV": {
"device_type": "sensor",
"object_suffix": "mV",
"config": {
"device_class": "voltage",
"name": "Battery mV",
"unit_of_measurement": "mV",
"value_template": "{{ float(value) }}",
"state_class": "measurement",
"entity_category": "diagnostic"
}
},

"humidity": {
"device_type": "sensor",
"object_suffix": "H",
Expand Down

0 comments on commit 1dc9f69

Please sign in to comment.