-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
Merci pour cette contribution |
@@ -52,7 +52,8 @@ | |||
ACTIONS_LOCK = 'lock' | |||
ACTIONS_COVER = 'cover' | |||
ACTIONS_THERMOSTAT = 'thermostat' | |||
ACTIONS_IAS = 'ias' | |||
ACTIONS_IAS_WARNING = 'ias_warning' | |||
ACTIONS_IAS_SQUAWK = 'ias_squawk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour le moment je ne vois pas l'intérêt d'avoir 2 types d'action ACTIONS_IAS_WARNING et ACTIONS_IAS_SQUAWK car les 2 semblent disponible en même temps
je conserve donc ACTIONS_IAS
@@ -20,7 +20,7 @@ | |||
from .responses import (RESPONSES, Response) | |||
from .const import (ACTIONS_COLOR, ACTIONS_LEVEL, ACTIONS_LOCK, ACTIONS_HUE, | |||
ACTIONS_ONOFF, ACTIONS_TEMPERATURE, ACTIONS_COVER, | |||
ACTIONS_THERMOSTAT, ACTIONS_IAS, | |||
ACTIONS_THERMOSTAT, ACTIONS_IAS_WARNING, ACTIONS_IAS_SQUAWK, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem on conserve ACTIONS_IAS
@@ -1889,6 +1888,34 @@ def action_onoff(self, addr, endpoint, onoff, on_time=0, off_time=0, effect=0, g | |||
data = struct.pack('!BHBBBB', addr_mode, addr, 1, endpoint, effect, gradient) | |||
return self.send_data(cmd, data) | |||
|
|||
@register_actions(ACTIONS_IAS_WARNING) | |||
def action_ias_warning(self, addr, endpoint, warning_mode, duration, strobe_cycle, strobe_level, direction=0, manufacturer_code=0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est une bonne idée d'avoir la fonction action_ias_warning
mais attention, elle existe déjà ! c'est write_attribute_request_ias
Toutefois je préfère action_ias_warning
je vais renommer la fonction
return self.send_data(cmd, data) | ||
|
||
@register_actions(ACTIONS_IAS_SQUAWK) | ||
def action_ias_squawk(self, addr, endpoint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem la fonction existe déjà, c'est write_attribute_request_ias_squawk
En fait, j'étais partie de la version stable et quand je suis passé en version dev, j'ai vu que t'avais fait quasiment la même chose. |
Du coup je ferme de PR car il n'est plus nécessaire |
No description provided.