esphome_component_bthome icon indicating copy to clipboard operation
esphome_component_bthome copied to clipboard

Fix: change unit of measurement for illuminance from "lux" to "lx"

Open laberning opened this issue 1 year ago • 0 comments

Just noticed a small issue with the unit of measurement for illuminance when used with home assistant.

https://github.com/afarago/esphome_component_bthome/blob/f09865b000cd35351d5bc01209502c8ec16a1430/components/bthome_base/const_generated.py#L229C36-L229C37

Home assistant expects the unit to be "lx" instead of "lux" and will throw a warning otherwise:

Entity sensor.light_illuminance (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) 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+esphome%22

Thanks for creating this really nice component!

laberning avatar Feb 19 '24 20:02 laberning