Welcome to HomeKitLab · a home lab that leans toward Apple Home · everyone is welcome, whatever you run at home · Ring cameras, go2rtc, and Home Assistant · best viewed in Netscape Navigator 4.0 at 800×600 ·

How to Add Dyson Fans to Apple Home (Local Control with Home Assistant and a HomeKit Bridge)

NEW!

Dyson fans do not speak HomeKit. They do speak MQTT on your own network, and a community Home Assistant integration talks to them directly, with no cloud round trip for each command. This is how two Dyson Pure Cool Link fans, one in the main bedroom and one in the spare room, ended up in Apple Home as two clean fan tiles with speed and swing, and nothing else.

The trick in the middle is a small wrapper. Pass the Dyson fan straight to the HomeKit Bridge and Apple Home adds a couple of extra switches you probably do not want. A template fan in front of it fixes that.

The page is dressed like a 1998 personal site. The YAML is current. Copy it from the Notepad boxes.

What you need
  • Home Assistant with HACS installed.
  • Wi-Fi Dyson fans already set up in the MyDyson app. These are Pure Cool Link fans, which the integration reports as device type 475.
  • An Apple home hub, a HomePod or an Apple TV, on a network that can reach the server.
  • Packages turned on, so each project lives in its own file: homeassistant: packages: !include_dir_named packages in configuration.yaml.

Where each piece sits

Dyson integration (dyson_local)
The libdyson-wg custom integration. Talks to each fan over your LAN.
MyDyson account
Used once to discover the fans and fetch their local credentials.
Template fans
Thin wrappers that pass through on/off, speed, and oscillation only.
HomeKit Bridge
A bridge named Dyson Fans that publishes just the two wrappers.

1 Install the Dyson integration from HACS

The old Dyson Local and Dyson Cloud integrations by shenxn are no longer maintained. Their replacement is libdyson-wg/ha-dyson. It still installs under the domain dyson_local, so you will see that name in entity and config file paths.

In HACS, search for Dyson (or add libdyson-wg/ha-dyson as a custom repository of type Integration), download it, and restart Home Assistant. If HACS says "not a valid add-on repository", you are in the add-on store. This is a custom integration.

A HACS window listing the Dyson integration from libdyson-wg/ha-dyson as installed, with a note to restart Home Assistant.
The Dyson integration comes from HACS. It is a custom integration, not an add-on.

2 Discover the fans with your MyDyson account

Go to Settings, Devices & services, Add Integration, and search for Dyson. Pick the MyDyson account option and sign in. Dyson emails a verification code, so check spam if it does not show up.

Once the account is connected, every fan on it appears under Discovered. Configure each one. From here on Home Assistant talks to the fans locally. The README says you can even delete the MyDyson account entry afterwards and the fans keep working.

Older fans have a Wi-Fi sticker on the body, and you can set them up from that SSID and password instead. Use the sticker's values, not your home Wi-Fi.

A Dyson setup window with the MyDyson email and verification code masked, and two discovered fans named Master bedroom fan and Spare bedroom fan.
Sign in once with MyDyson. Each fan then shows up as discovered.

Treat what the integration stores like a password. The fan credentials and serials live in Home Assistant's .storage folder. Keep them out of screenshots, chat, and git.

3 Name the fans and check the entities

Each fan comes in as a device with a fan entity and a set of extras. Give the devices short names. Here they are MB Fan (fan.master_bedroom_fan) and SR Fan (fan.spare_bedroom_fan).

What you get per fan on a Pure Cool Link:

  • The fan: on/off, speed, oscillation, and preset modes.
  • Switches for Night Mode and Continuous Monitoring.
  • Sensors for temperature, humidity, an air quality index, a VOC index, and filter life, plus a Reset Filter Life button.

The VOC and air quality values from these fans are index numbers, not µg/m³. The integration says so itself, and it renamed the old VOC sensors to ..._volatile_organic_compounds_index for that reason. Leave them on the Home Assistant side.

A device window for MB Fan listing the fan entity, Night Mode and Continuous Monitoring switches, and temperature, humidity, air quality index, VOC index, and filter life sensors.
One fan, many entities. Only the fan itself goes to Apple Home.

4 Make clean wrapper fans for HomeKit

Here is the catch. The HomeKit Bridge builds the fan accessory from the fan's supported features. A Dyson fan supports preset modes, so Apple Home gets extra preset switches next to the fan, and entity_config has no option to hide them.

The way around it is a template fan for each Dyson. It reports the real fan's state, speed, and oscillation, and forwards on, off, speed, and swing commands. It has no preset modes, so the HomeKit side never sees any. Put it in packages/dyson_fans.yaml.

packages/dyson_fans.yaml
template:
  - fan:
      - name: "MB Fan HomeKit"
        unique_id: mb_fan_homekit
        default_entity_id: fan.mb_fan_homekit
        speed_count: 10
        state: "{{ is_state('fan.master_bedroom_fan', 'on') }}"
        percentage: "{{ state_attr('fan.master_bedroom_fan', 'percentage') | int(0) }}"
        oscillating: "{{ is_state_attr('fan.master_bedroom_fan', 'oscillating', true) }}"
        turn_on:
          - action: fan.turn_on
            target:
              entity_id: fan.master_bedroom_fan
        turn_off:
          - action: fan.turn_off
            target:
              entity_id: fan.master_bedroom_fan
        set_percentage:
          - action: fan.set_percentage
            target:
              entity_id: fan.master_bedroom_fan
            data:
              percentage: "{{ percentage }}"
        set_oscillating:
          - action: fan.oscillate
            target:
              entity_id: fan.master_bedroom_fan
            data:
              oscillating: "{{ oscillating }}"
      # Copy the block for the second fan:
      # name "SR Fan HomeKit", fan.sr_fan_homekit, and fan.spare_bedroom_fan

speed_count: 10 gives ten steps of 10%, which matches the ten speeds on the fan. default_entity_id pins the new entity id, so the HomeKit filter below can name it.

Keep any automations pointed at the real Dyson entity, not the wrapper. The wrapper is only there for the HomeKit layout.

A flow diagram: the Dyson fan entity with presets and oscillation, then a template fan named MB Fan HomeKit that keeps only on/off, speed in 10 steps, and oscillation, then the HomeKit Bridge.
The wrapper drops the preset modes, so Apple Home shows one clean fan tile.

5 Give the fans their own HomeKit Bridge

The fans get a bridge of their own instead of joining the lights bridge. If a fan misbehaves you can reset this one bridge without touching anything else in Apple Home.

Add it to the same package file. A bridge defined in YAML is edited in YAML from then on. It shows up in Settings with "import" as its source.

packages/dyson_fans.yaml
homekit:
  - name: Dyson Fans
    port: 21082
    advertise_ip: 192.168.1.50   # your server's LAN IP
    filter:
      include_entities:
        - fan.mb_fan_homekit
        - fan.sr_fan_homekit
    entity_config:
      fan.mb_fan_homekit:
        name: MB Fan
      fan.sr_fan_homekit:
        name: SR Fan

Every HomeKit Bridge needs a unique name and its own TCP port. 21082 was free on this server because the other bridges sit between 21064 and 21080. advertise_ip is only needed when mDNS has to be reflected across VLANs or Docker does not use host networking. See mDNS across VLANs.

Check the config under Developer tools, YAML, Check configuration, then restart Home Assistant. This server runs Home Assistant in Docker with host networking, so there is no ha command. Restart from the UI or with docker restart homeassistant.

A HomeKit Bridge window named Dyson Fans: bridge mode, port 21082, advertise_ip 192.168.1.50, and the entities fan.mb_fan_homekit named MB Fan and fan.sr_fan_homekit named SR Fan.
A bridge just for the fans, on its own port. The IP is a placeholder.

6 Pair it in the Apple Home app

Home Assistant posts a notification with the QR code and PIN for the new Dyson Fans bridge. In the Home app choose Add Accessory, scan the code, accept the uncertified accessory with Add Anyway, and assign MB Fan and SR Fan to their rooms.

pairing.txt
Open the Apple Home app
Add Accessory
Scan the QR code from the Home Assistant notification
Add Anyway (uncertified accessory)
Pick a room for MB Fan and for SR Fan
Done

Each fan shows up as one fan accessory with power, a speed slider, and swing (oscillation). Siri works too: "Set MB Fan to 50 percent".

An Apple Home style window with a placeholder pairing code XXX-XX-XXX and two fan tiles, MB Fan and SR Fan, each with a speed and swing line.
Illustration, not a screenshot. Each fan arrives as one fan with speed and swing.

7 Troubleshooting

A fan goes unavailable

The integration connects to a small MQTT broker inside the fan. The integration's README says some Dyson firmware holds on to dead connections until new ones fail, and its first fix is to power-cycle the fan. Unplug it at the wall, plug it back in, then reload the Dyson integration.

The extra switches are still in Apple Home

HomeKit caches the accessory layout. If you first paired the raw fan.* entities and then swapped in the wrappers, call the HomeKit reset_accessory action on the wrapper fans, or remove the Dyson Fans bridge from the Home app and pair it again.

Developer tools > Actions
action: homekit.reset_accessory
target:
  entity_id:
    - fan.mb_fan_homekit
    - fan.sr_fan_homekit

The speed jumps around

Apple Home's slider is 0 to 100. With speed_count: 10 Home Assistant rounds to the nearest 10%, so 37% lands on 40%. That is normal.

A troubleshooting window with three rows: fan unavailable, power-cycle the fan; extra switches in Home, reset the accessory; speed jumps, ten steps of ten percent.
The three things that come up most.

Back to the guides Home

Comments

Loading comments…