Dyson fan integration

I am looking for a way to integrate my Dyson Pure Cool in Home Assistant. At this moment, the integration is working and I am able to start and stop the fan. Next step is to add some automation for the fan speed. I have tried several examples from the internet, however none is working. One example where I need help is the automation below which needs to update the input_number slide in HA when the fan speed is changed when using the remote.

- id: '1597862935563'
  alias: Change Dyson fan speed from component
  description: ''
  trigger:
  - platform: template
    value_template: '{% if (states.fan.woonkamer.attributes.speed|int) != (states.input_number.dyson_fan_speed.state|int)
      %}true{%endif%}'
  condition: []
  action:
  - data:
      data_template:
        entity_id: input_number.dyson_fan_speed
        value: '{{states.fan.woonkamer.attributes.speed|int}}'
    entity_id: input_number.dyson_fan_speed
    service: input_number.set_value

When I try to execute the Action part of the automation with developer tools, I receive an error: no extra key are allowed. Who is able to help me? I’m also interested in working configurations. Thanks in advance.

New HA user here and trying to setup dyson pure hot+cool link. I added this to the config.yaml

dyson:
username: my_username
password: my_password
language: AU
devices:
- device_id: device_serialnumber
- device_ip: device_ipaddress`

When I save and restart HA I get the following error:

Invalid config

The following integrations and platforms could not be set up:

*** dyson**

Please check your config.

What am i doing wrong?

Setup failed for dyson: Integration failed to initialize.

15:53:44 – setup.py (ERROR)

Not connected to Dyson account. Unable to add devices

15:53:44 – dyson (ERROR)

Hi,

Did you use the correct formatting in configuration.yaml? Please see my code below including the right formatting. Besides that, I see one extra minus sign at the device_ip section which must be removed.

dyson:
  username: 
  password: 
  language: AU
  devices:
    - device_id: 
      device_ip: 

Perfect thanks, I also had to upgrade hassio

1 Like

@cmartens While I now have most of the functions of the fan 2 things I can’t do are AUTO or NIGHT mode. When I toggle this with the dyson remote I can see the state change in the lovelace card but I cannot add these services to the buttons.

I suspect it is because these services are not defined. When I go to developer tools and services there is no fan.auto_mode or fan.night_mode service.

Can you see these services? Any idea how/where they are defined?

I personally don’t use these functions. However, please have a look at https://www.home-assistant.io/integrations/dyson/. It contains information regarding night mode and auto mode.

Thanks, I saw the details of this integration. What I am unsure of is how to ‘call’ auto_mode or night_mode as they are listed as attributes not component services

Literally first time posting on the forums. If this helps you out, I managed to get switches syncing auto and night mode states with remote inputs from the Dyson fan.

switch:
- platform: template
      switches:
          fan_auto_mode:
            friendly_name: "Fan Auto Mode"
            value_template: "{{ is_state_attr('fan.living_room', 'auto_mode', true) }}"
            turn_on:
              service: dyson.set_auto_mode
              data:
                entity_id: fan.living_room
                auto_mode: true
            turn_off:
              service: dyson.set_auto_mode
              data:
                entity_id: fan.living_room
                auto_mode: false
          fan_night_mode:
            friendly_name: "Fan Night Mode"
            value_template: "{{ ( is_state('fan.living_room', 'on') or is_state_attr('fan.living_room', 'auto_mode', true)  ) and is_state_attr('fan.living_room', 'night_mode', true) }}"
            turn_on:
              service: dyson.set_night_mode
              data:
                entity_id: fan.living_room
                night_mode: true
            turn_off:
              service: dyson.set_night_mode
              data:
                entity_id: fan.living_room
                night_mode: false
2 Likes

https://www.home-assistant.io/integrations/dyson/

This link seems to be broken. Where can I find this integration?

1 Like

This integration does not work anymore. Currently I use the following integration which is running fine for more than two years now. Please give it a try.

https://github.com/shenxn/ha-dyson

1 Like

@cmartens
I followed your link, and see the documentation.
It looks like this is an integration with HACS?

I looked for it in the HACS Store and didn’t find it.

Is there a different way to install that I am missing?

Hi, before you can see the Dyson integration in HACS, you need to add https://github.com/shenxn/ha-dyson as custom repository in HACS (via HACS - integrations - three dots - customized repositories). After that, you can install and configure the integration.

@cmartens Perfect, Got it now. Thanks

1 Like

For anyone else stumbling on this thread: that repo isn’t maintained anymore.
This is the currently maintainted one: GitHub - libdyson-wg/ha-dyson: Home Assitant custom integration for Wi-Fi connected Dyson devices

2 Likes