Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the "battery" key to the home-assistant MQTT script #2595

Closed
wants to merge 7 commits into from
13 changes: 13 additions & 0 deletions examples/rtl_433_mqtt_hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@
}
},

"battery": {
"device_type": "sensor",
"object_suffix": "B",
"config": {
"device_class": "battery",
"name": "Battery",
"unit_of_measurement": "%",
"value_template": "{{ value|int }}",
"state_class": "measurement",
"entity_category": "diagnostic"
}
},

"battery_ok": {
"device_type": "sensor",
"object_suffix": "B",
Expand Down
Loading