aijayadams / hass-blueair

BlueAir sensor integration for HomeAssistant
34 stars 15 forks source link

Non i models are unsupported #8

Closed MaxDucy closed 2 years ago

MaxDucy commented 2 years ago

Just wants to inform you that I've tested with both of my Classic 205 and 405 non i model (No sensor and auto mode). All of them are unsupported. All entities shown as unavailable.

lurv commented 2 years ago

I can also confirm that Classic 505 is unsupported. I have attached some logs below:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 607, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 486, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 492, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 273, in state value = self.native_value File "/config/custom_components/blueair/sensor.py", line 61, in native_value if self._device.temperature is None: File "/config/custom_components/blueair/device.py", line 73, in temperature return self._datapoint["temperature"] KeyError: 'temperature'

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 607, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 486, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 492, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 902, in state return STATE_ON if self.is_on else STATE_OFF File "/config/custom_components/blueair/fan.py", line 52, in is_on return self._device.is_on File "/config/custom_components/blueair/device.py", line 118, in is_on if self._attribute["fan_speed"] == "0": KeyError: 'fan_speed'

Tokynet commented 2 years ago

Bump on this issue, I bought a Classic 205 thinking it would be supported. Oddly enough, I can turn it on and off for about 2 days after "configuring" the extension, therefore it does work for a bit.

Is there any plans to troubleshoot this issue more?

rgeorgi commented 2 years ago

I also have a Classic model (605) and ran into the same problem; so I opened a PR (#11 ) to do an initial poll to populate the fan speed, and remove the sensors from classic models.

aijayadams commented 2 years ago

Thanks to @rgeorgi this is addressed - I made a small change to allow classic_XXXi models to retain sensors (as that's the type I have :P