A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
550
stars
117
forks
source link
Add `device_class` and `state_class` to EQ3 Valve Sensor #265
Home Assistant picks up and autoconfigures perfectly the EQ3 thermostats exposed by this project.
A small issue is that the exposed valve sensor, as it is, is not recorded for long-term statistics as it lacks a couple of specifications. This makes it impossible for example to have a panel showing the heating usage per room throughout the day/week/month/year.
This PR adds device_class and state_class to the autodiscovery configuration for HA so that the correct icon is shown and statistics are possible.
I tested this works in my own HA instance by building my own forked image and swapping it in docker-compose.yaml. The valves were immediately picked up with the correct type and recording statistics was then possible.
Type of change
Somehow between new feature and bugfix? I'm not sure how to classify this.
Description
Home Assistant picks up and autoconfigures perfectly the EQ3 thermostats exposed by this project.
A small issue is that the exposed valve sensor, as it is, is not recorded for long-term statistics as it lacks a couple of specifications. This makes it impossible for example to have a panel showing the heating usage per room throughout the day/week/month/year.
This PR adds
device_class
andstate_class
to the autodiscovery configuration for HA so that the correct icon is shown and statistics are possible.I tested this works in my own HA instance by building my own forked image and swapping it in
docker-compose.yaml
. The valves were immediately picked up with the correct type and recording statistics was then possible.Type of change
Somehow between new feature and bugfix? I'm not sure how to classify this.