libdyson-wg / ha-dyson Goto Github PK
View Code? Open in Web Editor NEWHome Assistant custom integration for Wi-Fi connected Dyson devices
License: MIT License
Home Assistant custom integration for Wi-Fi connected Dyson devices
License: MIT License
Hi, I had the integration setup fine and working. However, today, my H1 randomly became unreachable. I re-configured the dyson cloud integration and auto discovery found the machine. However, once I try to configure it, it fails giving me the error "Failed to find the device using discovery".
I deleted the device, deleted the integration, restarted HASS, and then reloaded the integrations. My other machines are configuring just fine, but my H1 still only appears as a discovered device unable to be configured.
Unsure of what could have went wrong with this specific machine.
Thanks for maintaining this.
I have an HP02 that I've had for a month and hooked it up using the original integration via the local mode by capturing the packets on my android phone. All has worked well. This was added under Device Type: Pure Hot+Cool Link
Yesterday I got an HP04 and originally hooked it up via the original integration (didn't know about yours).
I did the same packet capture but it would only add using Pure Hot+Cool. So not the LINK one.
All works except for the Continuous Monitoring switch. It has no effect.
I found out about this integration and did the hot swap over. Still didn't work so removed the HP04 and readded but same behavior.
Is there something I can provide to help identify why this switch isn't working?
And is the HP04 being the Pure Hot+Cool expected vs the Pure Hot+Cool Link of the HP02?
Yesterday, Dyson announced the following products:
Based on previous product releases and MQTT/Wifi messaging patterns, adding support for these devices should be trivial. However, testing the new devices with this integration will require the assistance of device owners.
If any owners of the new devices would be willing to share messages/logs that would be awesome.
After adding the repo and downloading (and restarting) nothing showed up. I tried the no longer supported "original" repo first and had the same issue, so I deleted that one, hoping this one would work but no cigar.
Any idea what might be going on? Basically nothing shows up in the integrations. I do see the files via the file editor, so it is installed.
Hi,
thanks for opening up an new Dyson repository. Any way to add a discussion section to this repository?
I'd like to ask a question if Dyson local does "I/O in the event loop"
For context, here is a comment
I'm trying to find some demons in my HA instance and wanted to ask that question and if Dyson local does this, it would be good to fix that.
When you connect to the app and then attempt to retrieve credentials via get_devices.py, if you are on different networks (i.e. your phone is on mobile), you will get "Unable to authenticate user" error.
Once you login on the same network, it will work as expected.
I had my Dyson Pure Hot Cold (PT2-CA-HK******) connected through a YAML configuration (setup ~2.5 years ago), I am trying to move away from having things in my YAML so I removed that device from my configuration and installed this repo (local and cloud) through HACS.
HACS:
Integrations:
I was able to configure the cloud portion and log into my account (after I figured out that it sent an email with the code for entry).
But I am not able to "configure" or see my device inside HA. When I click the configure on the local it asks for a host (optional), if I leave it blank it says "failed to connect"
if I enter the ip address of the device it also says Failed to connect.
This appears in the log:
Logger: homeassistant.config_entries
Source: helpers/entity_component.py:169
First occurred: 4:01:17 PM (3 occurrences)
Last logged: 4:34:06 PM
Error setting up entry [email protected] (CA) for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 419, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 169, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
hi just moved over from the old integration and all added fine but I no longer have a seperate entity for oscillation so when adding into HomeKit a with is no longer populated ?
any workarounds for this
thanks
I am getting the below error that is constantly being added to the logs. Anyone know what it is? Let me know if you require any other info
Logger: homeassistant
Source: components/sensor/__init__.py:585
First occurred: 17:20:34 (7600 occurrences)
Last logged: 22:23:34
Error doing job: Exception in callback Entity.async_write_ha_state()
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 581, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'fail'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 585, in state
raise ValueError(
ValueError: Sensor sensor.dyson_fan_pm_2_5 has device class 'pm25', state class 'measurement' unit 'µg/m³' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'fail' (<class 'str'>)
Hi everyone. I manage to add my Dyson Pure Cool (438) using credentials from libdyson-main, but then I get a "This entity is unavailable" error for the fan. What is strange is that if I toggle "Night Mode", I do see the change happening on the device, which indicates that the credentials are correct and the connection is established. See the screenshot below.
Some additional information:
Any help would be greatly appreciated!
Hi All,
Little help here. I’m not even sure if the model i have is compatible ,i have the new Big and Quiet Air purifier. I have added the Dyson via Hacs Successfully, added my Dyson account and shows with no entities. HA does Discover my device, I go to try and setup and all i get is “unknown error occurred” in the pop up there is a “ IP address optional “ I don't add anything there, I cant find the device on my network , yes its odd but the app works with no issue. Can someone please o please steer me in the right direction.
No logs, so i cant provide much detail, however i will add happily provide any info I can, running on a pie With OS
I could not see any error message on the home assistant logs :-\ even after reloading the integration several times.
I reverted to 2023.9.3 and it works again.
Hello,
this isn't really an issue, but is there a possibility that this will become an official integration of HA? I think there are still a lot of users waiting for dyson to come back as an official integration.
Hi,
I think this is ha-dyson
based on the last line of the log entry
ValueError: Sensor sensor.pure_cool_humidity has device class humidity, state class measurement unit % and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: off (<class 'str'>)
Any ideas?
Full log below.
By the way, awesome job on keeping ha-dyson
working for us all!
Logger: homeassistant
Source: components/sensor/__init__.py:583
First occurred: 11 May 2023 at 17:06:11 (41110 occurrences)
Last logged: 09:25:52
Error doing job: Task exception was never retrieved
Error doing job: Exception in callback Entity.async_write_ha_state()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'off'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.pure_cool_humidity has device class humidity, state class measurement unit % and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: off (<class 'str'>)
This is on v1.0.0
Logger: homeassistant.components.camera
Source: custom_components/dyson_local/camera.py:23
Integration: Camera (documentation, issues)
First occurred: 14:06:36 (1 occurrences)
Last logged: 14:06:36
Error while setting up dyson_local platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/dyson_local/camera.py", line 23, in async_setup_entry
data = hass.data[DOMAIN][config_entry.entry_id]
~~~~~~~~~^^^^^^^^
KeyError: 'dyson_cloud'
When using the cloud after email the app returns Unknown error occurred
'\
I owned a dyson purifier cool formaldehyde and purifier hot+cold. The later one cannot show up in HA
Hoping this is a simple one
I noticed that the device would turn on every time I accessed the 'more info' panel of the fan entity in HA.
Upon further troubleshooting I found that this was because of the oscillation toggle being on. If the oscillation is toggled off, the fan stays off when viewing the entity which is ideal for my setup, where I use 'more info' cards for my media player and dyson fan.
I don't think I have I missed a setting somewhere, it appears to be some kind of out of order logic processing fault. I should be able to keep oscillation toggled on without the fan turning on when viewing the entity.
If this can't be replicated please let me know if you need any more info, and thanks so much for working on this project.
Receiving this error in my system logs since the most recent update:
This error originated from a custom integration.
Logger: custom_components.dyson_local.button
Source: custom_components/dyson_local/button.py:26
Integration: Dyson (documentation, issues)
First occurred: 18:29:52 (1 occurrences)
Last logged: 18:29:52
one <myName> Air Purifier
Currently only the following climate/filter sensors are retrieved from the machine:
From the Dyson app, I can read the CO2 real-time readings as well, but not in HA.
Logger: homeassistant.components.automation.morning
Source: custom_components/dyson_local/vendor/libdyson/dyson_device.py:324
Integration: Automation (documentation, issues)
First occurred: 05:00:00 (2 occurrences)
Last logged: 05:00:00
TOD - Sunrise: Error executing script. Unexpected error for device at pos 1:
While executing automation automation.morning
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_device_step
await device_action.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/action.py", line 71, in async_call_action_from_config
await platform.async_call_action_from_config(hass, config, variables, context)
File "/usr/src/homeassistant/homeassistant/components/switch/device_action.py", line 35, in async_call_action_from_config
await toggle_entity.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py", line 123, in async_call_action_from_config
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
return await cast(
^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 833, in entity_service_call
response_data = task.result() # pop exception if have
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1191, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 877, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1255, in async_turn_off
await self.hass.async_add_executor_job(ft.partial(self.turn_off, **kwargs))
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dyson_local/switch.py", line 63, in turn_off
return self._device.disable_night_mode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dyson_local/vendor/libdyson/dyson_device.py", line 395, in disable_night_mode
self._set_configuration(nmod="OFF")
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
Logger: homeassistant.setup
Source: setup.py:215
First occurred: 12:27:43 PM (2 occurrences)
Last logged: 12:27:47 PM
Setup failed for custom integration dyson_cloud: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py)
Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.11/site-packages/libdyson/init.py)
Hi,
I found this entry in my logs. There is nothing before or after, just this one:
2023-07-31 10:12:43.304 ERROR (MainThread) [custom_components.dyson_local] Error fetching environmental data: Failed to request environmental data
Both Dyson's are online, but switched off
so the environmental entities are all unknown
.
Honestly, not much to go on, but I thought I'd report it as it may be a useful data point in the future.
Versions:
Home Assistant Container
, core-2023.7.3
1.32.1
1.01
Would it be possible possible to add the ability to add a sensor for when the water tank is empty on humidifiers? It would be great to be able to automate notifications for this.
Someone had raised this issue in the past in the upstream repo:
shenxn/ha-dyson#129
I took a look at https://github.com/libdyson-wg/libdyson-neon/blob/main/libdyson/dyson_pure_humidify_cool.py (as well as any relevant issues), and I didn't see any mention/support. I think something would probably need to be added there, so I can open up an issue in that project if it makes more sense.
I also did some checking to see if there's any sort of API documentation or anything for Dyson, and I wasn't able to find anything. Was everything discovered for this integration by monitoring network communication locally, or did I completely miss something?
By the way, I just switched over today from shenxn/ha-dyson, and everything went very smoothly. Thanks for forking and updating this!
Adding the model 520 Pure Cool Desk results in a stacktrace. The device appears in the integrations list, but no data and no button.
I've done a packet capture on the JSON being passed across MQTT. I don't see cflr (carbon filter life) being passed across. Also in the official Dyson mobile app it shows as "This feature in temporarily unavailable" for filter status, although on the display on the fan itself I can see it seems to have some filter data.
MQTT Updates
`520/VW1-UK-MAA3485B/command{"msg": "REQUEST-CURRENT-STATE", "time": "2023-05-06T13:55:29Z"}0w..520/VW1-UK-MAA3485B/command{"msg": "REQUEST-PRODUCT-ENVIRONMENT-CURRENT-SENSOR-DATA", "time": "2023-05-06T13:55:29Z"}.....0..."520/VW1-UK-MAA3485B/status/current{"msg":"CURRENT-STATE","time":"2023-05-06T13:55:29.000Z","mode-reason":"PRC","state-reason":"NONE","dial":"OFF","rssi":"37","product-state":{"fpwr":"ON","fdir":"OFF","auto":"OFF","fnsp":"0002","qtar":"0001","sltm":"OFF","oson":"OFF","nmod":"OFF","rhtm":"ON","fnst":"FAN","filf":"0000","ercd":"NONE","wacd":"NONE"},"scheduler":{"srsc":"0000","dstv":"0000","tzid":"0000"}}0..."
520/VW1-UK-MAA3485B/status/current{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2023-05-06T13:55:30.000Z","data":{"tact":"2971","hact":"0055","pm25":"0000","pm10":"0000","va10":"0004","noxl":"0001","p25r":"0000","p10r":"0000","sltm":"OFF"}}0..."520/VW1-UK-MAA3485B/status/current{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2023-05-06T13:55:30.000Z","data":{"tact":"2971","hact":"0055","pm25":"0000","pm10":"0000","va10":"0004","noxl":"0001","p25r":"0000","p10r":"0000","sltm":"OFF"}}0..."
520/VW1-UK-MAA3485B/status/current{"msg":"CURRENT-STATE","time":"2023-05-06T13:55:30.000Z","mode-reason":"PRC","state-reason":"NONE","dial":"OFF","rssi":"36","product-state":{"fpwr":"ON","fdir":"OFF","auto":"OFF","fnsp":"0002","qtar":"0001","sltm":"OFF","oson":"OFF","nmod":"OFF","rhtm":"ON","fnst":"FAN","filf":"0000","ercd":"NONE","wacd":"NONE"},"scheduler":{"srsc":"0000","dstv":"0000","tzid":"0000"}}"
520/VW1-UK-MAA3485B/status/current{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2023-05-06T13:55:31.000Z","data":{"tact":"2971","hact":"0055","pm25":"0000","pm10":"0000","va10":"0004","noxl":"0001","p25r":"0000","p10r":"0000","sltm":"OFF"}}"
520/VW1-UK-MAA3485B/status/current{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2023-05-06T13:55:31.000Z","data":{"tact":"2971","hact":"0055","pm25":"0000","pm10":"0000","va10":"0004","noxl":"0001","p25r":"0000","p10r":"0000","sltm":"OFF"}}`
`May 06 15:20:03 nandi hass[1485197]: 2023-05-06 15:20:03.597 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dyson_local platform for sensor
May 06 15:20:03 nandi hass[1485197]: Traceback (most recent call last):
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
May 06 15:20:03 nandi hass[1485197]: await asyncio.shield(task)
May 06 15:20:03 nandi hass[1485197]: File "/home/homeassistant/.homeassistant/custom_components/dyson_local/sensor.py", line 68, in async_setup_entry
May 06 15:20:03 nandi hass[1485197]: if device.carbon_filter_life is None:
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/libdyson/dyson_pure_cool.py", line 48, in carbon_filter_life
May 06 15:20:03 nandi hass[1485197]: return int(filter_life)
May 06 15:20:03 nandi hass[1485197]: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
May 06 15:20:03 nandi hass[1485197]: 2023-05-06 15:20:03.599 ERROR (MainThread) [homeassistant.components.fan] Error adding entities for domain fan with platform dyson_local
May 06 15:20:03 nandi hass[1485197]: Traceback (most recent call last):
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
May 06 15:20:03 nandi hass[1485197]: await asyncio.gather(*tasks)
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
May 06 15:20:03 nandi hass[1485197]: await entity.add_to_platform_finish()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 823, in add_to_platform_finish
May 06 15:20:03 nandi hass[1485197]: self.async_write_ha_state()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 568, in async_write_ha_state
May 06 15:20:03 nandi hass[1485197]: self._async_write_ha_state()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 635, in _async_write_ha_state
May 06 15:20:03 nandi hass[1485197]: attr.update(self.extra_state_attributes or {})
May 06 15:20:03 nandi hass[1485197]: File "/home/homeassistant/.homeassistant/custom_components/dyson_local/fan.py", line 231, in extra_state_attributes
May 06 15:20:03 nandi hass[1485197]: ATTR_ANGLE_LOW: self.angle_low,
May 06 15:20:03 nandi hass[1485197]: File "/home/homeassistant/.homeassistant/custom_components/dyson_local/fan.py", line 220, in angle_low
May 06 15:20:03 nandi hass[1485197]: return self._device.oscillation_angle_low
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/libdyson/dyson_pure_cool.py", line 130, in oscillation_angle_low
May 06 15:20:03 nandi hass[1485197]: return int(self._get_field_value(self._status, "osal"))
May 06 15:20:03 nandi hass[1485197]: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
May 06 15:20:03 nandi hass[1485197]: 2023-05-06 15:20:03.609 ERROR (MainThread) [homeassistant.components.fan] Error while setting up dyson_local platform for fan
May 06 15:20:03 nandi hass[1485197]: Traceback (most recent call last):
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 312, in _async_setup_platform
May 06 15:20:03 nandi hass[1485197]: await asyncio.gather(*pending)
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
May 06 15:20:03 nandi hass[1485197]: await asyncio.gather(*tasks)
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
May 06 15:20:03 nandi hass[1485197]: await entity.add_to_platform_finish()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 823, in add_to_platform_finish
May 06 15:20:03 nandi hass[1485197]: self.async_write_ha_state()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 568, in async_write_ha_state
May 06 15:20:03 nandi hass[1485197]: self._async_write_ha_state()
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 635, in _async_write_ha_state
May 06 15:20:03 nandi hass[1485197]: attr.update(self.extra_state_attributes or {})
May 06 15:20:03 nandi hass[1485197]: File "/home/homeassistant/.homeassistant/custom_components/dyson_local/fan.py", line 231, in extra_state_attributes
May 06 15:20:03 nandi hass[1485197]: ATTR_ANGLE_LOW: self.angle_low,
May 06 15:20:03 nandi hass[1485197]: File "/home/homeassistant/.homeassistant/custom_components/dyson_local/fan.py", line 220, in angle_low
May 06 15:20:03 nandi hass[1485197]: return self._device.oscillation_angle_low
May 06 15:20:03 nandi hass[1485197]: File "/srv/homeassistant/lib/python3.10/site-packages/libdyson/dyson_pure_cool.py", line 130, in oscillation_angle_low
May 06 15:20:03 nandi hass[1485197]: return int(self._get_field_value(self._status, "osal"))
May 06 15:20:03 nandi hass[1485197]: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
`
I have a Home Assistant dyson integration and the following error message appears in the log:
`File "/usr/local/lib/python3.10/site-packages/libdyson/dyson_pure_humidify_cool.py", line 110, in formaldehyde
return int(self._get_environmental_field_value("hcho"))
File "/usr/local/lib/python3.10/site-packages/libdyson/dyson_device.py", line 292, in _get_environmental_field_value
return int(value)
ValueError: invalid literal for int() with base 10: 'NONE'`
Hi there! I was using this integration successfully for the past week or two but after a restart today from working on my dashboard layout, I'm randomly getting an invalid config error notification upon boot up. Specfically:
"Invalid config
The following integrations and platforms could not be set up:
dyson_local (Show logs
dyson_cloud (Show logs
Please check your config and logs."
Under the cloud log I got this error
Logger: homeassistant.setup
Source: setup.py:214
First occurred: 1:41:58 PM (1 occurrences)
Last logged: 1:41:58 PM
Setup failed for custom integration dyson_cloud: Unable to import component: No module named 'custom_components.dyson_local'
and under the local log I got these errors
Logger: frontend.js.latest.202305033
Source: components/system_log/__init__.py:257
First occurred: 1:45:55 PM (3 occurrences)
Last logged: 1:45:55 PM
http://homeassistant.local:8123/config/logs?filter=dyson_cloud:0:0 Uncaught
http://homeassistant.local:8123/hacsfiles/fan-control-entity-row/fan-control-entity-row.js?hacstag=19166315023:9:28 Uncaught ReferenceError: Polymer is not defined
and
Logger: homeassistant.setup
Source: setup.py:214
First occurred: 1:41:58 PM (1 occurrences)
Last logged: 1:41:58 PM
Setup failed for custom integration dyson_cloud: Unable to import component: No module named 'custom_components.dyson_local'
Any help would be greatly appreciated!
Setup:
-Dell Optiplex 7050 i5 12gb ram 128gb ssd
-HA OS 2023.9.1
Issue:
-The fan went offline September 1 at 9PM
-This tells me it wasn't an update of HA and likely isn't due to the new release
Troubleshooting Steps Taken:
Hi,
It seems like i have connection issues to my dyson fan after the homeassistant os update.
Fan kept beeing offline so i tried to reinstall and configure the integration.
Connecting to the account has no issues but configuring the discovered fan results in:
"Failed to connect. The IP Address may be required if your Home Assistant installation is running in a Container or a VM."
Even while filling in the ip
I have a PH01 and a PH03 unit, both called "Pure Humidify+Cool", but they have different Device Types from each other. PH01:358, and PH03:358K.
When manually adding a unit, there are dropdown options for "Pure Humidify+Cool", and "Pure Humidify+Cool Formaldehyde". The former corresponds in the code to 358, and the latter to 358E.
I am able to successfully add my PH01 unit without issue because it is a 358, which works when selecting "Pure Humidify+Cool", but when I try to add my PH03 I get an error like this:
{"type":"form","flow_id":"f1848c43c17a5a7094dfc020bf8cd1d9","handler":"dyson_local","step_id":"manual","data_schema":[{"type":"string","name":"serial","required":true,"default":"(serial)"},{"type":"string","name":"credential","required":true,"default":"(credential)"},{"type":"select","options":[["N223","360 Eye robot vacuum"],["276","360 Heurist robot vacuum"],["438","Pure Cool"],["438K","Purifier Cool"],["438E","Pure Cool Formaldehyde"],["520","Pure Cool Desk"],["475","Pure Cool Link"],["469","Pure Cool Link Desk"],["527","Pure Hot+Cool"],["527E","Pure Hot+Cool (New)"],["455","Pure Hot+Cool Link"],["358","Pure Humidify+Cool"],["358E","Purifier Humidify+Cool Formaldehyde"],["527K","Purifier Hot+Cool"]],"name":"device_type","required":true,"default":"358E"},{"type":"string","name":"host","optional":true,"default":""}],"errors":{"base":"cannot_connect"},"description_placeholders":null,"last_step":null}
I have tried selecting "Pure Humidify+Cool" and "Pure Humidify+Cool Formaldehyde" and both produce the same error.
I've tried connecting the device via. the cloud project as well, and while it discovers it and shows it available to configure on my Devices page, it still returns the same error when attempting to add the discovered device.
Would it be possible to add support for 358K units? If not, is there a workaround I can use in the mean time to manually send the type as 358K?
I had the previous integration installed and working fine. I've since deleted it and changed the HACS repository and installed the new version. Unfortunately, when I try to add the devices again, the config flow exists. I've enabled debug logging, but there is not much to see:
2023-04-16 22:11:59.954 DEBUG (Thread-13 (_thread_main)) [libdyson.dyson_device] Connected with result code 5
2023-04-16 22:11:59.956 DEBUG (Thread-13 (_thread_main)) [libdyson.dyson_device] Disconnected with result code 0
2023-04-16 22:11:59.960 DEBUG (MainThread) [custom_components.dyson_local.config_flow] Failed to connect to device:
(The result is the same with WiFi credentials, except that the custom component logs the serial and parsed device type as well.)
Hey firstly:
big thanks for your work!
I set up my integration with the cloud log in - finally.
But I had a hard time to understand what's the 2nd line under the password.
A short remark to the OTP-Code sent by mail would help :)
BR
Fabian
Hi,
Finally got around to migrating to this but I don't see the 527K in the list when doing a manual setup, is it not added here yet ?
Also when selecting another model instead (regular hot+cool) it fails to connect, with no additional information whereas the old integration does connect fine, but is missing the formaldehyde and No2 sensor of course, not quite sure why this may be.
Thanks
Hi,
This is a minor thing, but just to be consistent, it would be good to update the units to the proper ones
thanks
Hi,
My setup : Raspberry Pi 4 B 8 gb ram plugged in via ethernet
Method used: finding devices via Dyson account username and password.
Error: used both auto and ip address to configure but cannot add it.
Error message : "Failed to connect. The IP Address may be required if your Home Assistant installation is running in a Container or a VM."
Option 1:
How can you deactivate the auto-Preset mode if you only have one preset?
(I don't want to adjust the speed but switch off the auto mode at the current speed)
Option 2: (preferred)
Add an normal or none preset mode to the Dyson Pure Cool Link or all fans.
The preset mode should also stay the same after you switch the device off and on again.
Errors in sensor values continue to occur with continuous monitoring off. Please indicate the last value or 0 value, not the off value.
Logger: homeassistant
Source: components/sensor/init.py:583
First occurred: 09:44:55 (41 occurrences)
Last logged: 09:52:55
Error doing job: Exception in callback Entity.async_write_ha_state()
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'off'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.seonpunggi_temperature has device class temperature, state class measurement unit °C and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: off (<class 'str'>)
When I install the integration appear this:
{"message":"Invalid handler specified"}
any solution?
I have 3 Dyson fans. 2 were integrated back in time with the previous Dyson local integration and migrated via the 'Experimental no-reconfiguration swap' -method described in #3 (comment)
Before I added the 3rd device, I also installed the new Dyson cloud integration via HACS. Setting up the new device, everything worked a-ok, got the fan visible via auto-discovery.
The odd thing now is that for the 2 earlier fans, neither entries 'Volatile Organic Compounds' nor 'Nitrogen Dioxide' work. From an entities-card clicking either of them on either of the 2 fans, the notification statement is
This entity is no longer being provided by the dyson_local integration. If the entity is no longer in use, delete it in settings.
For the 3rd fan added lately both the entities work so I can see the values for the parameter.
I assume that regardless that the Dyson local integration was updated to the libdyson-wg -version, there is some legacy conflict with the 2 fans.
Any ideas on how I should re-generate the 2 fans so that they actually use updated Dyson local and would (probably) show the VC and NO₂ entries?
Curious why Speed controls were removed in a previous commit?
Would it be possible to add back in support for displaying the current speed as an entity, and exposing a service to set the speed?
(TP04)
I am seeing that I can select in increments of .5 - which is right - but the issue is that they are offset.
Expected result
Actual result
Did a fresh install of this by uninstalling shenxn/ha-dyson and installing this using the guide on the homepage.
Manage to sync my devices into HA using the cloud integration however, there is No devices or entities.
FYI I am using Dyson TP04
Please support Dyson Purifier Humidify Cool Formaldehyde 358K.
Home Assistant 2023.5.3
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest
VM hosted on Ubuntu 23.04
current version of Virtualbox
Removed the previous ha-local and ha-cloud repos and the current ones
Attepted to install intergrations
Received following error message
Config flow could not be loaded: {"message":"Invalid handler specified"}
Enabled logging
Log snippet
ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dyson_local: Exception importing custom_components.dyson.config_flow
...
ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dyson_cloud: cannot import name 'DysonPureHumidifyCool' from 'libdyson' (/usr/local/lib/python3.10/site-packages/libdyson/init.py)
ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.dyson.config_flow
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 879, in exec_module
File "", line 1017, in get_code
File "", line 947, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/dyson/init.py", line 31
<title>core/init.py at dev · home-assistant/core</title>
^
SyntaxError: invalid character '·' (U+00B7)
2023-05-23 21:52:02.637 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dyson_local: Exception importing custom_components.dyson.config_flow
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.