Switch — switch v1
A plain on/off load that is not a light — a pump, a fan wall switch, an outlet, a fireplace.
Use light if the user thinks of it as a light; use this if they do not.
Capabilities
Declared in the driver manifest under [[proxy]] capabilities. Anything not declared takes the default below.
| Capability | Type | Default | Meaning |
|---|---|---|---|
has_auto_off | bool | false | Device can turn itself off after a timeout |
supports_power_metering | bool | false |
Commands
off
No parameters.
on
No parameters.
set_auto_off
Only present when
has_auto_offis declared true.
| Parameter | Type | Notes |
|---|---|---|
seconds | u32 0–86400 |
toggle
No parameters.
Notifications
online_changed
| Parameter | Type | Notes |
|---|---|---|
online | bool |
power_changed
Only present when
supports_power_meteringis declared true.
| Parameter | Type | Notes |
|---|---|---|
watts | f32 |
switch_changed
| Parameter | Type | Notes |
|---|---|---|
on | bool |
State
Last-known values core keeps for a binding of this proxy.
| Key | Type | Meaning |
|---|---|---|
on | bool | |
online | bool | |
watts | f32 |