home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.55k stars 30.35k forks source link

Envisalink Alarm Control Panel does not accurately reflect arming or pending states #127766

Open arifeinberg opened 1 week ago

arifeinberg commented 1 week ago

The problem

When arming the alarm (i.e. exit_delay is true), the alarm control panel should show state arming, but just shows armed. Likewise, when alarm is pending but not yet triggered, the ACP should show state as pending, but just shows armed.

What version of Home Assistant Core has the issue?

core-2024.9.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

envisalink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/envisalink

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 week ago

envisalink documentation envisalink source

arifeinberg commented 1 week ago

I believe editing alarm_control_panel.py as follows will solve the issue. I can't do a PR because I don't have the wherewithal to do all the necessary tests.

Recommend changing order of logic in def state. During pending alarm, both status.armed and status.entry_delay are true, so entry_delay should be evaluated first. During arming/exit delay, both status.armed and status.exit_delay are true, so evaluated exit_delay first. Also, at least on my system, the exit_delay property doesn't get set during arming, so I added an additional criterion to check for the substring "May Exit" in keypad display.

https://github.com/home-assistant/core/compare/dev...arifeinberg:core:patch-1?diff=unified&w=#diff-851adde4559b396457e107321e0e2b13c36e1d83f0d07ab1b87d0615ba396fc4