jacdac.switch.client

Module Contents

Classes

SwitchClient

A switch, which keeps its position.

class jacdac.switch.client.SwitchClient(bus: jacdac.bus.Bus, role: str, *, missing_active_value: Optional[bool] = None)

Bases: jacdac.bus.SensorClient

A switch, which keeps its position. Implements a client for the Switch service.

property active Optional[bool]

Indicates whether the switch is currently active (on).,

property variant Optional[jacdac.switch.constants.SwitchVariant]

(Optional) Describes the type of switch used.,

on_on(handler: jacdac.bus.EventHandlerFn) jacdac.bus.UnsubscribeFn

Emitted when switch goes from off to on.

on_off(handler: jacdac.bus.EventHandlerFn) jacdac.bus.UnsubscribeFn

Emitted when switch goes from on to off.