Skip to content

Envisalink: wake DSC panel from keypad blanking before arm/disarm#165286

Open
nopoz wants to merge 1 commit intohome-assistant:devfrom
nopoz:envisalink_blanking_fix
Open

Envisalink: wake DSC panel from keypad blanking before arm/disarm#165286
nopoz wants to merge 1 commit intohome-assistant:devfrom
nopoz:envisalink_blanking_fix

Conversation

@nopoz
Copy link
Contributor

@nopoz nopoz commented Mar 10, 2026

Proposed change

DSC alarm panels can enter a low-power display-off ("keypad blanking") mode after a period of inactivity. When the panel is in this state, TPI arm/disarm commands (030/031/032/040) sent via the Envisalink are silently rejected because the EVL pre-validates the panel state and sees it as "not ready."

This PR sends a # keypress to the partition before each arm/disarm command on DSC panels, which wakes the panel from blanking — equivalent to pressing # on the physical keypad. A 1-second delay follows the keypress to allow the panel to become ready before the actual command is sent.

The wakeup is only applied to DSC panels; Honeywell panels are unaffected. The panic alarm command is intentionally excluded since TPI command 060 bypasses normal partition validation.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

To help with the load of incoming pull requests:

DSC panels enter a low-power display-off (blanking) mode after
inactivity. TPI arm/disarm commands sent while blanked are silently
rejected by the EVL because it pre-validates panel state. Send a '#'
keypress to wake the panel before each arm/disarm command, equivalent
to pressing # on the physical keypad.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Envisalink alarm control panel integration to handle DSC keypad “blanking” mode by waking the panel before sending arm/disarm commands, preventing TPI commands from being silently rejected when the keypad display is off.

Changes:

  • Pass the configured panel type through platform discovery to the alarm control panel entities.
  • Add a DSC-only wake step (send # + delay) before arm/disarm (home/away/night/disarm) commands.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
homeassistant/components/envisalink/alarm_control_panel.py Adds DSC wake-before-command behavior and threads panel type into the entity.
homeassistant/components/envisalink/__init__.py Includes panel_type in discovery info when loading the alarm platform.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +171 to +183
async def _async_wake_panel(self) -> None:
"""Wake DSC panel from keypad blanking state before sending commands.

DSC panels enter a low-power display-off (blanking) mode after
inactivity. TPI arm/disarm commands sent while blanked are silently
rejected. Sending '#' wakes the panel, equivalent to pressing # on
the physical keypad.
"""
if self._panel_type != PANEL_TYPE_DSC:
return
_LOGGER.debug("Sending '#' keypress to wake panel from possible blanking state")
self.hass.data[DATA_EVL].keypresses_to_partition(self._partition_number, "#")
await asyncio.sleep(1)
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_async_wake_panel introduces an unconditional 1s delay for every arm/disarm on DSC panels (even when keypad blanking may not be active). This will slow service calls/automations; consider making the delay conditional (if there is a reliable state signal) or at least extracting the keypress/delay into named constants so the behavior is easy to tune.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants