Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

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

Open
laberning opened this issue Feb 19, 2024 · 0 comments
Open

Comments

@laberning
Copy link

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant