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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant