Code Monkey home page Code Monkey logo

ha-dyson's People

Contributors

anto79-ops avatar austinbeam avatar blorby avatar chishm avatar codyc1515 avatar crowbarz avatar domanchi avatar dotvezz avatar flameeyes avatar graham33 avatar jasperslits avatar kakise avatar lrb2 avatar majk-p avatar pfrybar avatar revolter avatar shenxn avatar silther avatar slyoldfox avatar vickyg3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-dyson's Issues

Failed to find the device using discovery

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.

Continuous Monitoring (Auto) switch not working for HP04

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?

Add and test support for new Dyson devices (Device owners' help is appreciated!)

Yesterday, Dyson announced the following products:

  • Purifier Big+Quiet
    • Support added in v1.1.0
  • Purifier Big+Quiet Formaldehyde
    • Support added in v1.1.0
  • 360 Vis Nav

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 install through HACS, nothing shows up

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.

Discussion section for questions

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.

Add the note about IP address to the README

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.

Missing Formaldehyde devices on manual installation

I'm doing a manual installation.

I've a Dyson Purifier Cool Formaldehyde, but I do not see any Formaldehyde devices in the dropdown. Furthermore, some devices are listed twice in the list.

FYI, Formaldehyde devices were correctly output in the previous shenxn repo.

Screenshot 2023-06-05 at 12 55 40

Failed to connect using Cloud + Local

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:
image
Integrations:
image

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"
image
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!

Dyson Pure Hot+Cool no entity for oscillation?

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

Error in logs

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'>)

Dyson Pure Cool error "This entity is unavailable" but "Night Mode" works.

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:

  • The air quality entities (PM2.5, PM10 etc) are not added to HA.
  • I tried adding and removing the device/integration few times.
  • Tried hard rebooting in between steps.
  • Tried moving to this repo from the no longer maintained shenxn/ha-dyson repo (and used the instructions here on how to migrate).
  • I previously managed to have everything working with a previous Dyson Pure Cool (same model). Unfortunately, I had to return that one because it had a physical problem. I removed that device from my Dyson account before trying any of this. With this new Dyson, I never managed to get it to work.
  • Home Assistant version is 2023.6.1 (but I have been having this issue since before upgrading)
  • Dyson Integration version is v0.20.1

Any help would be greatly appreciated!

Screenshot 2023-06-11 at 20 09 23

Error on trying to add discovered Device

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
IMG_3358

official integration

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.

Error doing job: Task exception was never retrieved (41,110 occurrences in 15 hrs)

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'>)

Error while setting up dyson_local platform for camera

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'

Unknown error.

When using the cloud after email the app returns Unknown error occurred
'\

Config Flow could not be loaded

Hello

I receive this error when attempting to add the cloud intergration. This happens immediately after adding and before I am able to put in my credentials.

image

TP04 - Oscillation control turns on the device

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.

One error in logs

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

Missing CO2 sensor reading from Dyson Purifier Big+Quiet

Currently only the following climate/filter sensors are retrieved from the machine:

  • HCHO
  • Humidity
  • NO2 (Nitrogen Dioxide)
  • PM 10
  • PM 2.5
  • Temperature
  • TVOC
  • Carbon Filter (%)
  • HEPA Filter (%)

From the Dyson app, I can read the CO2 real-time readings as well, but not in HA.

custom_components.dyson_local.vendor.libdyson.exceptions.DysonNotConnected

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

ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'"

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)

Error fetching environmental data: Failed to request environmental data

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:

  • HA Home Assistant Container, core-2023.7.3
  • HACS 1.32.1
  • Dyson_local: 1.01

Enhancement: Empty water tank sensor for humidifiers

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!

Stacktrace when adding type 520 Pure Cool Desk

  • Advanced install (not HA OS)
  • Python 3.10
  • Having trouble adding model 520
  • Model 527 works correctly (From previous shenxn release)
  • libdyson_neon-1.0.2 is latest from pip (0.8.11)
  • Dyson_local v0.19.0

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'
`

ValueError: invalid literal for int() with base 10: 'NONE'

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'`

Invalid config error, unable to use integration

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!

HP09 Failing to connect w/ IP Address

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:

  1. Restart HA (Power)
  2. Reload Config
  3. Delete Device
  4. Re-Authorize Dyson Login to setup new device through config
  5. HA finds Device
    6.Initial Submit did not enter IP
  6. Error "Failed to connect. The IP Address may be required if your Home Assistant installation is 8. running in a Container or a VM."
  7. I enter IP address (confirmed from AngryIP) of HP09
  8. Same error as Above
  9. Repeat

Connection issues

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

In manual add, no option for PH03 units, only PH01 and PH04

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?

Can't add integration ("Failed to connect")

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.)

Change Request in the Read.me or the setup screen - cloud

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

527K name ?

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

cannot connect with Dyson Purifier Hot+Cool™ HP09 Formaldehyde

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."

Set angle for Dyson TP09

Hello,

In version 2023.10.1 of HassIO, my Dyson TP09 integration works properly. However, I cannot set the oscillation angle. The available oscillation modes for my model are: off, 45, 90, 180 and 350 degrees.

Captura de pantalla 2023-10-10 a las 11 52 50 IMG_3578

Regards,

add preset mode: normal

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.

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'>)

Odd Dyson local not supported entries.

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?

Missing entities

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

Intergration error

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

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.