Fan — fan
A fan somebody chooses a speed on — a ceiling fan behind a speed controller, an extractor, a whole-house fan.
Not a switch with a fan wired to it, and the difference is not pedantry: a switch is on or
off, so "turn the fan down" has nowhere to land and a rule that says medium cannot be written
at all. A load whose only two states are on and off is a switch even when the thing on the end
of it spins.
Speeds are named rather than numbered because that is how every fan controller that exists reports them, and the names are not the same set twice: Lutron offers Off/Low/Medium/MediumHigh/ High, a three-speed pull-chain replacement offers three, and a DC motor offers ten. So the set is a capability the device fills in and everything downstream reads, rather than a vocabulary this file invents and every driver then has to lie about.
Capabilities
Declared in the driver manifest under [[proxy]] capabilities. Anything not declared takes the default below.
| Capability | Type | Default | Meaning |
|---|---|---|---|
speeds | string[] | ["low","medium","high"] | The speeds this fan actually has, slowest first. Not including off. |
supports_reverse | bool | false | Can run in reverse — a winter/summer switch on the motor rather than on the wall |
Commands
off
No parameters.
on
To the speed it was last on, or the slowest it has if it has never run.
No parameters.
set_reverse
Only present when
supports_reverseis declared true.
| Parameter | Type | Notes |
|---|---|---|
reverse | bool |
set_speed
| Parameter | Type | Notes |
|---|---|---|
speed | string |
toggle
No parameters.
Notifications
online_changed
| Parameter | Type | Notes |
|---|---|---|
online | bool |
reverse_changed
Only present when
supports_reverseis declared true.
| Parameter | Type | Notes |
|---|---|---|
reverse | bool |
speed_changed
The speed it is running at now. A fan that has stopped reports on = false rather than a speed nobody named.
| Parameter | Type | Notes |
|---|---|---|
on | bool | |
speed | string |
State
Last-known values core keeps for a binding of this proxy.
| Key | Type | Meaning |
|---|---|---|
on | bool | |
online | bool | |
reverse | bool | |
speed | string |