An Opus review of merged PR #170 found the cleanLevel-scalar existence gate on AIR_QUALITY doesn't hold up as a general rule: three fixtures in this repo (air_purifier_device.json, air_purifier_vtww_device.json, range_hood_device.json) carry genuinely populated Dust/FineDust/ SuperFineDust readings with no such scalar, so requiring it risks silently dropping real air-quality readings on AC hardware this repo hasn't seen yet. Reverted _has_sensor_type to item-type presence only (as before #170) and moved the #166 fix to enabled_default=False on all five entities instead -- same conservative, non-existence-gated treatment already used for tropical_night_mode and the fridge/cooktop precedents it was modeled on. Golden fixtures and tests updated to match; the five sensors are bound-but-disabled on windfree/#17-style boards again rather than unbound. Also added icons for the AC fan_mode values #170 missed -- the raw numeric labels ("1".."5") that TP1X_DA-AC-RAC-01001 and the window-AC board report instead of turbo/max -- and swapped the whole fan-speed icon family to mdi:fan-speed-1/2/3 for a more purpose-built look than the generic speedometer, applied consistently to both the AC climate card and the air purifier fan. Fixed motiondirect/motionindirect to match core's smartthings integration's arrow pairing (previously inverted). Known limitation, not fixed here: enabled_default only affects newly registered entities. Anyone who already has tropical_night_mode or the five air-quality sensors enabled from #164 (a narrow window before this fix, but real) won't see them auto-disable -- they'd need to disable them by hand in Settings > Devices > Entities. A real fix needs a one-time entity-registry migration, which this integration has no existing infrastructure or test coverage for; scoping that felt like its own follow-up rather than something to bolt on here.
67 lines
1.7 KiB
JSON
67 lines
1.7 KiB
JSON
{
|
|
"entity": {
|
|
"climate": {
|
|
"airconditioner": {
|
|
"state_attributes": {
|
|
"fan_mode": {
|
|
"state": {
|
|
"1": "mdi:fan-speed-1",
|
|
"2": "mdi:fan-speed-1",
|
|
"3": "mdi:fan-speed-2",
|
|
"4": "mdi:fan-speed-3",
|
|
"5": "mdi:fan-speed-3",
|
|
"turbo": "mdi:fan-speed-3",
|
|
"max": "mdi:fan-speed-3"
|
|
}
|
|
},
|
|
"preset_mode": {
|
|
"state": {
|
|
"ai_comfort": "mdi:creation",
|
|
"quiet": "mdi:volume-off",
|
|
"smart": "mdi:brain",
|
|
"speed": "mdi:speedometer",
|
|
"nano": "mdi:weather-dust",
|
|
"nanosleep": "mdi:sleep",
|
|
"longwind": "mdi:weather-windy",
|
|
"motiondirect": "mdi:account-arrow-left",
|
|
"motionindirect": "mdi:account-arrow-right",
|
|
"drycomfort": "mdi:water-percent",
|
|
"2step": "mdi:stairs"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"fan": {
|
|
"air_purifier_fan": {
|
|
"state_attributes": {
|
|
"preset_mode": {
|
|
"state": {
|
|
"smart": "mdi:brain",
|
|
"max": "mdi:fan-speed-3",
|
|
"mid": "mdi:fan-speed-2",
|
|
"windfree": "mdi:weather-dust",
|
|
"sleep": "mdi:sleep"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sensor": {
|
|
"machine_state": {
|
|
"state": {
|
|
"idle": "mdi:power-standby",
|
|
"active": "mdi:play",
|
|
"pause": "mdi:pause"
|
|
}
|
|
},
|
|
"connection_mode": {
|
|
"state": {
|
|
"observe": "mdi:broadcast",
|
|
"poll": "mdi:sync"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|