Switch Level

class st.zigbee.defaults.switchLevel.CurrentLevelConfiguration
cluster: number

LevelCluster cluster ID 0x0008

attribute: number

CurrentLevel attribute ID 0x0000

minimum_interval: number

1 second

maximum_interval: number

3600 seconds (1 hour)

data_type: st.zigbee.data_types.Uint8

the Uint8 class

reportable_change: number

1

class st.zigbee.defaults.switchLevel
zigbee_handlers: table
attribute_configurations: table
capability_handlers: table
default_current_level_configuration: st.zigbee.defaults.switchLevel.CurrentLevelConfiguration
static level_attr_handler(driver, device, value, zb_rx)

Default handler for current level attribute on the level control cluster

This converts the Uint8 value from 0-254 to SwitchLevel.level(0-100)

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

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

  • value (st.zigbee.data_types.Uint8) – the value of the current level attribute of the level control cluster

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

static set_level(driver, device, command)

Default handler for the SwitchLevel.setLevel command

This will send the move to level with on off command to the level control cluster

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

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

  • command (table) – The capability command table