Skip to main content

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.

CapabilityTypeDefaultMeaning
has_auto_offboolfalseDevice can turn itself off after a timeout
supports_power_meteringboolfalse

Commands

off

No parameters.

on

No parameters.

set_auto_off

Only present when has_auto_off is declared true.

ParameterTypeNotes
secondsu32 0–86400

toggle

No parameters.

Notifications

online_changed

ParameterTypeNotes
onlinebool

power_changed

Only present when supports_power_metering is declared true.

ParameterTypeNotes
wattsf32

switch_changed

ParameterTypeNotes
onbool

State

Last-known values core keeps for a binding of this proxy.

KeyTypeMeaning
onbool
onlinebool
wattsf32