Comments (6)
It seems that your fan reports air quality target as "OFF" when your fan is powered off. To confirm, can you enable the debug log and look for a "New state:" log before this error?
from ha-dyson.
This is what I see in the logs when I encounter this error:
2021-03-21 18:43:34 DEBUG (SyncWorker_9) [custom_components.dyson_local.fan] Turn off fan Pure Cool Link
2021-03-21 18:43:35 DEBUG (Thread-6) [libdyson.dyson_device] New state: {'msg': 'STATE-CHANGE', 'time': '2021-03-21T18:43:35.000Z', 'mode-reason': 'LAPP', 'state-reason': 'MODE', 'product-state': {'fmod': ['FAN', 'OFF'], 'fnst': ['FAN', 'OFF'], 'fnsp': ['0001', '0001'], 'qtar': ['0003', 'OFF'], 'oson': ['OFF', 'OFF'], 'rhtm': ['OFF', 'OFF'], 'filf': ['3811', '3811'], 'ercd': ['NONE', 'NONE'], 'nmod': ['OFF', 'OFF'], 'wacd': ['NONE', 'NONE']}, 'scheduler': {'srsc': 'b045', 'dstv': '0001', 'tzid': '0001'}}
2021-03-21 18:43:35 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 282, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/config/custom_components/dyson_local/fan.py", line 208, in device_state_attributes
return {ATTR_AIR_QUALITY_TARGET: self.air_quality_target}
File "/config/custom_components/dyson_local/fan.py", line 203, in air_quality_target
return AIR_QUALITY_TARGET_ENUM_TO_STR[self._device.air_quality_target]
File "/usr/local/lib/python3.8/site-packages/libdyson/dyson_pure_cool_link.py", line 33, in air_quality_target
return AirQualityTarget(self._get_field_value(self._status, "qtar"))
File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.8/enum.py", line 662, in __new__
raise ve_exc
ValueError: 'OFF' is not a valid AirQualityTarget
from ha-dyson.
I got a similar error but for the humidifier
2021-04-05 14:44:45 ERROR (MainThread) [pyhap.characteristic] TargetHumidifierDehumidifierState: value=0 is an invalid value.
thanks for this integration!
from ha-dyson.
@liudger Seems your error is from package pyhap.characteristic
, which is not related to this integration.
from ha-dyson.
@Phontana Version 0.9.0 should fix your problem. Feel free to reopen if it doesn't.
from ha-dyson.
@shenxn thank you, I just updated to 0.9.0 and it is fixed indeed.
from ha-dyson.
Related Issues (20)
- Dyson Purifier Humidify Cool Formaldehyde (358K) not supported HOT 10
- Dyson Cloud never worked, using Dyson Local only now HOT 7
- Type 438K Fails to Connect HOT 3
- Stopped working? HOT 20
- Core 2022.2.0: Sensor has device class temperature, state class measurement and unit °C with non-numeric value: off
- Support Request - Add Device - Dyson HP07 Purifier Hot and Cool - Device Type 527k HOT 12
- No Formaldehyde Value HOT 2
- New device type Dyson purifier cool formaldehyde HOT 4
- New actively maintained integration! Collaborators welcome! Details inside. HOT 8
- Wifi-less "Dyson Pure Humidity+Cool" is not supported
- state class measurement and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: off HOT 4
- Failed to find the device using discovery
- Not working on Home Assistant v2023.6 HOT 1
- ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'" HOT 3
- Oscillation/angle setting
- Deactivate preset mode, or preset mode none
- Planned deprecation of direction, oscillate, preset_mode and set_speed HOT 1
- Local integration stopped working in HA 2024.1 HOT 4
- Depreciation warning in logs HOT 1
- ValueError: invalid literal for int() with base 10: 'off'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-dyson.