Giter VIP home page Giter VIP logo

Comments (6)

shenxn avatar shenxn commented on July 19, 2024

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.

Phontana avatar Phontana commented on July 19, 2024

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.

liudger avatar liudger commented on July 19, 2024

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.

shenxn avatar shenxn commented on July 19, 2024

@liudger Seems your error is from package pyhap.characteristic, which is not related to this integration.

from ha-dyson.

shenxn avatar shenxn commented on July 19, 2024

@Phontana Version 0.9.0 should fix your problem. Feel free to reopen if it doesn't.

from ha-dyson.

Phontana avatar Phontana commented on July 19, 2024

@shenxn thank you, I just updated to 0.9.0 and it is fixed indeed.

from ha-dyson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.