libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
228 stars 26 forks source link

Can’t turn on/off Dyson Pure #167

Closed oneseventhree closed 3 months ago

oneseventhree commented 3 months ago

The issue I had here has returned: https://github.com/libdyson-wg/ha-dyson/issues/161

Fan is showing on my network so I am not sure what is wrong as I can control it from the Dyson App:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 1:37:43 PM (4 occurrences)
Last logged: 8:30:13 PM

[140347034914960] Unexpected exception
[140347043360064] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 328, in async_handle_turn_on_service
    await self.async_turn_on(percentage, preset_mode, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 337, in async_turn_on
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dyson_local/fan.py", line 166, in turn_on
    self._device.turn_on()
  File "/config/custom_components/dyson_local/vendor/libdyson/dyson_pure_cool_link.py", line 52, in turn_on
    self._set_configuration(fmod="FAN")
  File "/config/custom_components/dyson_local/vendor/libdyson/dyson_device.py", line 324, in _set_configuration
    raise DysonNotConnected
custom_components.dyson_local.vendor.libdyson.exceptions.DysonNotConnected
r1ch1eb commented 3 months ago

Same issue for me. Stopped working yesterday morning. Works OK from MyDyson android app and Google Home integration but ha has stopped. All toggles are greyed out

dotvezz commented 3 months ago

The error code is libdyson.exceptions.DysonNotConnected here. This is one of those errors that can happen for a number of reasons. Have you tried the troubleshooting steps on the readme?

Do you know if the device's IP address has possibly changed on your network?

If none of that works, are you able to confirm your model numbers and firmware versions?

r1ch1eb commented 3 months ago

Power cycling the HP09 has resolved.

oneseventhree commented 3 months ago

Power cycling the HP09 has resolved.

Worked for me too :) good to know!

dotvezz commented 3 months ago

Cool deal! Glad to hear it worked :smile: