What's Changed
🆕 New Features
- Air Quality Monitor support — H5140 and compatible CO2 monitors are now fully supported
carbonDioxideConcentration→SensorDeviceClass.CO2(ppm)airQuality→SensorDeviceClass.AQIfilterLifeTime→ diagnostic percentage sensor
- Air Purifier sensor properties — Devices already working as fans now also expose
airQualityandfilterLifeTimeproperty sensors (previously silently dropped) - New binary sensor events —
co2AlarmEvent(GAS),iceBucketFullEvent/iceTrayEmptyEvent(PROBLEM)
🐛 Bug Fixes
- Fan unresponsive after control command —
async_GoveeAPI_ControlDevicewas gatingreturn Trueon a successful local cache update. If the capability wasn't found in cache (type/instance mismatch), it returnedFalseand skippedasync_write_ha_state(), leaving HA state stale even when the API command succeeded. API success and cache update are now decoupled. - H7120 fan flat-workMode detection — Runtime re-detection of flat-workMode devices was fragile; workMode values (1/2/3) collided with the default
_manual_work_mode=1, causing the wrong payload to be sent. Fixed with an explicit_flat_work_modeflag set at init. - H7106 fan speed capped at 33% — Duplicate gear modes were being added from Sleep/Nature modeValue sub-options, collapsing the speed range. Fixed by deduplicating gear modes during platform init.
🔇 Error Handling
- Graceful Govee API timeouts —
TimeoutError,ClientConnectionError, andServerDisconnectedErrorare now logged asWARNING("Govee API unreachable, will retry on next poll") instead ofERRORin the update coordinator and both GET/POST request helpers. These are transient upstream conditions, not integration errors. - Silenced availability
KeyError— Theavailableproperty no longer logs anERRORwhen device state hasn't been populated yet (expected during API downtime or startup).
🔧 Housekeeping
- ruff format pass on
utils.py - README updates
Full Changelog: v4.1.0...v4.1.2