Switch

class st.zigbee.defaults.switch.OnOffConfiguration
cluster: number

On/Off cluster ID 0x0006

attribute: number

On/Off attribute ID 0x0000

minimum_interval: number

0 seconds

maximum_interval: number

300 seconds (5 mins)

data_type: Boolean

the Boolean class

class st.zigbee.defaults.switch
zigbee_handlers: table
attribute_configurations: table
capability_handlers: table
default_on_off_configuration: st.zigbee.defaults.switch.OnOffConfiguration
static default_response_handler(driver, device, zb_rx)

Global handler for default response on the on off cluster

This converts the command from 0x01 -> Switch.switch.on and 0x00 to Switch.switch.off.

Parameters
  • driver (ZigbeeDriver) – The current driver running containing necessary context for execution

  • device (st.zigbee.Device) – The device this message was received from containing identifying information

  • zb_rx (st.zigbee.ZigbeeMessageRx) – the full message this report came in

static on_off_attr_handler(driver, device, value, zb_rx)

Default handler for on off attribute on the on off cluster

This converts the boolean value from true -> Switch.switch.on and false to Switch.switch.off.

Parameters
static on(driver, device, command)

Default handler for the Switch.on command

This will send the on command to the on off cluster

Parameters
  • driver (ZigbeeDriver) – The current driver running containing necessary context for execution

  • device (st.zigbee.Device) – The device this message was received from containing identifying information

  • command (CapabilityCommand) – The capability command table

static off(driver, device, command)

Default handler for the Switch.off command

This will send the off command to the on off cluster

Parameters
  • driver (ZigbeeDriver) – The current driver running containing necessary context for execution

  • device (st.zigbee.Device) – The device this message was received from containing identifying information

  • command (CapabilityCommand) – The capability command table