Repository navigation
Add Air Quality sensor (airQuality from Comfort Cloud) - #540
Merged
sockless-coding merged 2 commits intoNov 30, 2026
Merged
sockless-coding merged 2 commits into
sockless-coding merged 2 commits into
Conversation
Expose the airQuality value that aio-panasonic-comfort-cloud already parses into device.parameters.air_quality. The sensor is only available when the unit reports a non-zero value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Map the airQuality codes to the levels the Comfort Cloud app uses (AirQuality enum in app 5.1.2): 1 clean, 2 dust sensor off, 3 dirty, 4 IAQ sensor off, 5 initializing, 6 excellent, 7 fair, 8 poor. 0 means the unit has no sensor, so the entity is only created when the unit reports a non-zero code instead of being permanently unavailable. Drop the MEASUREMENT state class (the value is a level, not a quantity), add state translations and icons, and cover the mapping with tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
I did some tweaks to make it a bit more general |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an Air Quality sensor that exposes the
airQualityvalue. The library (aio-panasonic-comfort-cloud) already parses it intodevice.parameters.air_quality, but the integration did not expose it as an entity.The sensor is an enum. The codes come from the
AirQualityenum in the Comfort Cloud app (5.1.2):The entity is only added for units that report a non-zero code at setup, so units without an air quality sensor don't get an entity. Unknown codes show as unknown.
Tested on CS-XZ24BKH-8 (Vietnam, X-Premium with dust and odour sensors): 6/7/8 match Excellent/Fair/Poor on the "Indoor Air Quality" screen in the app.
🤖 Generated with Claude Code