Open NewsGuyTor opened 6 months ago
After implementing said changes almost all the warnings are gone. Only one that remains for me is:
2023-12-14 14:22:47.398 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.slaapkamergordijn_illuminance (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'Level' 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
changing line 3371 to
+ "\"unit_of_meas\": \"lx\", " +
should fix the warning, only issue I have with this fix is that the data produced by the Switchbot for Illuminance isn't in lux. So technically it's not the best solution, might need to use an other topic instead of illuminance. But for now this suits me and the warnings are gone.
@NewsGuyTor thanx for your part of the fix. If you could add in my previous comment that would be great, for this comment do with it what you want..
@Capusjon : Fixed
This should make it function better in Home Assistant