libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
208 stars 23 forks source link

Missing unit for volatile_organic_compounds and nitrogen_dioxide #127

Closed jorgenbosman closed 5 months ago

jorgenbosman commented 5 months ago

I just switched from the old ha-dyson repo to this one, and now I see that for some sensors, the unit is "None" instead of the old "µg/m³"

2024-01-31 16:18:53.332 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.woonkamer_volatile_organic_compounds (None) cannot be converted to the unit of previously compiled statistics (µg/m³). Generation of long term statistics will be suppressed unless the unit changes back to µg/m³ or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this 2024-01-31 16:18:53.332 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.woonkamer_nitrogen_dioxide (None) cannot be converted to the unit of previously compiled statistics (µg/m³). Generation of long term statisti

dotvezz commented 5 months ago

Hey, thanks for reporting! This is something that's come up a few times so I should probably update the FAQ on the readme. The short answer here is: while we're really grateful to Shen and the original set of contributors whose shoulders we're standing on here, the original VOC and NO2 sensors were incorrectly reporting µg/m³, when the sensor data from the device is actually an index.

As a result, this integration has removed the old sensor.device_volatile_organic_compounds entities. We've implemented new sensor.device_volatile_organic_compounds_index entities.

You can delete the old entities, which should now be unavailable, from your Home Assistant instance.

Edit: I'll close this thread, but feel free to follow up here if you have questions or concerns!