zigbeefordomoticz / Domoticz-Zigbee

Zigbee plugin for Domoticz. Allow to connect various zigbee controllers like Zigate but also Texas Instrument CC2531, CC13x2, CC26x2 ; Silicon-Labs; deConz based chipset to be connected to Domoticz
GNU General Public License v3.0
102 stars 43 forks source link

refactor paramDevice:param_PowerOnAfterOffOn() #1706

Closed pipiche38 closed 10 months ago

pipiche38 commented 10 months ago

This function need to be re-factored on the same principle as what have been done for the occupancy_setting.

Adding a module Modules/onoff_settings.py

OnTime 0x4001 / uint16 (0x21) OffWaitTime 0x4002/uint16 (0x21) StartUpOnOff 0x4003/enum8 (0x30)

The OnTime attribute specifies the length of time (in 1/10ths second) that the “on” state SHALL be main-tained before automatically transitioning to the “off” state when using the On with timed off command. If this attribute is set to 0x0000 or 0xffff, the device SHALL remain in its current state.

The OffWaitTime attribute specifies the length of time (in 1/10ths second) that the “off” state SHALL be guarded to prevent an on command turning the device back to its “on” state (e.g., when leaving a room, the lights are turned off but an occupancy sensor detects the leaving person and attempts to turn the lights back on). If this attribute is set to 0x0000, the device SHALL remain in its current state.

The StartUpOnOff attribute SHALL define the desired startup behavior of a50 device when it is supplied with power and this state SHALL be reflected in the OnOff attribute. The values of the StartUpOnOff attribute are listed below.