New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed status reporting and expose new modes (arm night, arm max) #16051
Conversation
Add support for Arm Max (arm away + no entry delay)
Hi @abarbaccia, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
state = STATE_ALARM_ARMED_MAX | ||
elif self._info['status']['armed_stay'] and not self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_HOME | ||
elif self._info['status']['armed_stay'] and self._info['status']['armed_zero_entry_delay']: |
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.
line too long (99 > 79 characters)
state = STATE_ALARM_ARMED_AWAY | ||
elif self._info['status']['armed_away'] and self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_MAX | ||
elif self._info['status']['armed_stay'] and not self._info['status']['armed_zero_entry_delay']: |
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.
line too long (103 > 79 characters)
elif self._info['status']['alpha']: | ||
elif self._info['status']['armed_away'] and not self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_AWAY | ||
elif self._info['status']['armed_away'] and self._info['status']['armed_zero_entry_delay']: |
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.
line too long (99 > 79 characters)
elif self._info['status']['entry_delay']: | ||
state = STATE_ALARM_PENDING | ||
elif self._info['status']['alpha']: | ||
elif self._info['status']['armed_away'] and not self._info['status']['armed_zero_entry_delay']: |
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.
line too long (103 > 79 characters)
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, | ||
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) | ||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_ALARM_ARMED_MAX, STATE_ALARM_DISARMED, | ||
STATE_UNKNOWN, STATE_ALARM_ARMING, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) |
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.
line too long (98 > 79 characters)
@@ -17,8 +17,8 @@ | |||
DATA_EVL, EnvisalinkDevice, PARTITION_SCHEMA, CONF_CODE, CONF_PANIC, | |||
CONF_PARTITIONNAME, SIGNAL_KEYPAD_UPDATE, SIGNAL_PARTITION_UPDATE) | |||
from homeassistant.const import ( | |||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, | |||
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) | |||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_ALARM_ARMED_MAX, STATE_ALARM_DISARMED, |
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.
line too long (121 > 79 characters)
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.
I tested these on my envisalink hardware and it works as expected.
@abarbaccia You still need to fix your linting issues (both those provided by Hound and those provided by Travis). |
Add functionality to call Arm Max service
state = STATE_ALARM_ARMED_HOME | ||
elif self._info['status']['armed_stay'] and | ||
self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_NIGHT |
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.
expected an indented block
not self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_HOME | ||
elif self._info['status']['armed_stay'] and | ||
self._info['status']['armed_zero_entry_delay']: |
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.
unexpected indentation
elif self._info['status']['armed_stay'] and | ||
not self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_HOME | ||
elif self._info['status']['armed_stay'] and |
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.
trailing whitespace
state = STATE_ALARM_ARMED_MAX | ||
elif self._info['status']['armed_stay'] and | ||
not self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_HOME |
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.
expected an indented block
self._info['status']['armed_zero_entry_delay']: | ||
state = STATE_ALARM_ARMED_MAX | ||
elif self._info['status']['armed_stay'] and | ||
not self._info['status']['armed_zero_entry_delay']: |
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.
unexpected indentation
elif self._info['status']['entry_delay']: | ||
state = STATE_ALARM_PENDING | ||
elif self._info['status']['alpha']: | ||
elif self._info['status']['armed_away'] and |
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.
trailing whitespace
SyntaxError: invalid syntax
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) | ||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, | ||
STATE_ALARM_ARMED_MAX, STATE_ALARM_DISARMED, STATE_UNKNOWN, | ||
STATE_ALARM_ARMING, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, |
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.
trailing whitespace
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, | ||
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) | ||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, | ||
STATE_ALARM_ARMED_MAX, STATE_ALARM_DISARMED, STATE_UNKNOWN, |
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.
trailing whitespace
@@ -17,8 +17,10 @@ | |||
DATA_EVL, EnvisalinkDevice, PARTITION_SCHEMA, CONF_CODE, CONF_PANIC, | |||
CONF_PARTITIONNAME, SIGNAL_KEYPAD_UPDATE, SIGNAL_PARTITION_UPDATE) | |||
from homeassistant.const import ( | |||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, | |||
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID) | |||
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, |
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.
trailing whitespace
@@ -13,7 +13,8 @@ | |||
from homeassistant.const import ( | |||
ATTR_CODE, ATTR_CODE_FORMAT, ATTR_ENTITY_ID, SERVICE_ALARM_TRIGGER, | |||
SERVICE_ALARM_DISARM, SERVICE_ALARM_ARM_HOME, SERVICE_ALARM_ARM_AWAY, | |||
SERVICE_ALARM_ARM_NIGHT, SERVICE_ALARM_ARM_CUSTOM_BYPASS) | |||
SERVICE_ALARM_ARM_NIGHT, SERVICE_ALARM_ARM_MAX, |
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.
trailing whitespace
This PR seems to have gone stale. Closing it. |
Description:
I reworked the status reporting on envisalink boards. This should now correctly report for ARMING and differentiate between ARM HOME and ARM NIGHT.
I also started to add support for ARM MAX which is when you arm away and have no exit delay (some systems call this "vacation mode"). The capability already seems to be present in pyenvisalink but not sure if it's exposed in the home assistant components yet. For now, it's only status, so it's reported correctly if you arm that mode from the envisalink app.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: