ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
606 stars 141 forks source link

Change unit of light sensor from "lux" to "lx" #167

Closed ThomDietrich closed 1 year ago

ThomDietrich commented 1 year ago

Home Assistant 2023.2 introduced a change that created warnings with integrations all over the place. Our project here is affected as well:

Entity sensor.kleine_strahlenaralie_light (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'lux' which is not a valid unit for the device class ('illuminance') it is using; expected one of ['lx']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

https://github.com/ThomDietrich/miflora-mqtt-daemon/blob/538b0eb2bdbe054025409a0337fdf831f27e7028/miflora-mqtt-daemon.py#L27

Pull request welcome!

A change to the line above will modify the unit for all conventions supported by this project. I believe potential side effects are minimal.

ThomDietrich commented 1 year ago

Fixed in https://github.com/ThomDietrich/miflora-mqtt-daemon/commit/3ec456b4fea5e5fef575489c25591a786515460c