Dyson automation - dyson.set_speed

I’m hoping someone can assist me with the automation of my Dyson fans, I have the HP04 Pure Cool+Hot and DP04 Pure Cool.

I am unable to get the dyson.set_speed to work in the actions for both of the fans. I have read several posts where people have successfully configured this service, however, I have followed their steps to no avail.

I am able to use the fan.set_speed service but this only allows me to set low, medium, high instead of the full range of 1,2,3 through to 10 that the dyson.set_speed should be able to do.

I have used the UI to create the automation and also created in automations.yaml

Below is my code for the automation, I am able to get all the other options to activate using the same formatting.

I would be extremely grateful for any assistance, please let me know if there’s any other info I would need to provide to help resolve this.

  alias: Nursery Cooling
  description: Turn on fan above 24C
  trigger:
  - platform: numeric_state
    entity_id: sensor.nursery_temperature
    above: '24'
    below: '26'
  action:
  - service: climate.turn_on
    entity_id: climate.nursery
  - service: climate.set_hvac_mode
    data:
      hvac_mode: cool
    entity_id: climate.nursery
  - service: dyson.set_speed
    data:
      dyson_speed: '5'
    entity_id: fan.nursery
  - service: fan.oscillate
    data:
      oscillating: 'true'
    entity_id: fan.nursery
  mode: restart

I am able to set the speed using the dev tools > service. I must be missing something but can’t work out what it is…

I have exactly the same issue.
Can you check what error you’re getting in the logs?

I’m getting the below errors (though with the same if I call the fan.set_speed with low/medium/high, that seems to work ok)

Bedroom Fan Speed Controller: Error executing script. Invalid data for call_service at pos 1: value should be a string for dictionary value @ data[‘entity_id’]

voluptuous.error.MultipleInvalid: value should be a string for dictionary value @ data['entity_id']

I worked it out in the end. The action has the be written exactly like this…

Awesome!!
Thanks a lot @stepoole :ok_hand: that did the trick

I’m having the same trouble, but have tried your suggestion above… what do you believe was the critical factor stopping it working before?

My preference is to use the interface… so ideally I would like to try to re-work the solution for that … but If I can’t get it working easily then yep, I will revert to YML. The problem currently is that neither work!

How are you initiating the action - what’s above it?

Here’s my code…

  • id: ‘Example’
    alias: Zwift BC > 20 MPH
    description: Zwift - BC speed changes Dyson fan speed
    trigger:
    • platform: state
      entity_id: sensor.zwift_speed_e34353
      from: ‘21’
      to: ‘99’
      condition: []
      action:
    • data:
      entity_id: fan.gym
      dyson_speed: 1
      service: dyson.set_speed
      mode: single

Sorted!

1 Like