Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

add IAS_WD + IAS_SQUAWK #147

Closed
wants to merge 1 commit into from
Closed

add IAS_WD + IAS_SQUAWK #147

wants to merge 1 commit into from

Conversation

fairecasoimeme
Copy link
Contributor

No description provided.

@doudz
Copy link
Owner

doudz commented Nov 21, 2019

Merci pour cette contribution
Dans l'idée c'est ce qu'il fallait faire, toutefois j'apporte quelques remarques (voir commentaires)
et je vais apporter les modifications moi même en incluant tes modifications car j'avais déjà une partie du travail fait de mon côté

@@ -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'
Copy link
Owner

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,
Copy link
Owner

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):
Copy link
Owner

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,
Copy link
Owner

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

doudz added a commit that referenced this pull request Nov 21, 2019
@fairecasoimeme
Copy link
Contributor Author

Merci pour cette contribution
Dans l'idée c'est ce qu'il fallait faire, toutefois j'apporte quelques remarques (voir commentaires)
et je vais apporter les modifications moi même en incluant tes modifications car j'avais déjà une partie du travail fait de mon côté

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.
Désolé ... je met tout en place et je fais quelques bêtises mais dans pas longtemps je serai prêt :)

@doudz
Copy link
Owner

doudz commented Nov 21, 2019

Du coup je ferme de PR car il n'est plus nécessaire

@doudz doudz closed this Nov 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants