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 executiondevice (
st.zigbee.Device
) – The device this message was received from containing identifying informationvalue (
st.zigbee.data_types.Uint8
) – the value of the current level attribute of the level control clusterzb_rx (
st.zigbee.ZigbeeMessageRx
) – the full message this report came in
- static set_level(driver, device, command, register_native)
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 executiondevice (
st.Device
) – The device this message was received from containing identifying informationcommand (
table
) – The capability command tableregister_native (
boolean or nil
) – Register future commands to be handled natively by the hub