core: MQTT: The unit of measurement `lux` is not valid
The problem
I was sent here by the MQTT Debug log: “Please update your configuration if your entity is manually configured, otherwise create a bug report at…”
I have a linknlink eMotion Pro device that’s reporting light levels (illuminance) in ‘lux’. It seems that HA wants to move to make this ‘lx’ The warning message is:
The unit of measurement luxis not valid together with device classilluminance. this will stop working in HA Core 2025.7.0
How do I manage this? What mechanism is in place for users to deal with autoconfig items for MQTT integrations where the manufacturer hasn’t/wont make changes to fix? Can I force the change on an autodiscovered sensor and if so what’s the method for doing so?
What version of Home Assistant Core has the issue?
core-2025.5.3
What was the last working version of Home Assistant Core?
core-2025.5.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
MQTT
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (3 by maintainers)
I had the same error for a weather station that is configured with MQTT manually
The unit of measurement was set to
lux, and that caused the error.Changing that to
lxmade the error go away.For Auto Discovery based devices only the manufacturer can fix this. So maybe the core team should reconsider this breaking change. I can imaging a work around in case it breaks:
device->MQTT Info->MQTT discovery data->payload