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

Commit

Permalink
make alarm panel always available/fix property name in base entity
Browse files Browse the repository at this point in the history
  • Loading branch information
rlippmann committed Oct 12, 2023
1 parent 5e7a15c commit 85032e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions custom_components/adtpulse/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ def code_format(self) -> None:
"""
return None

@property
def available(self) -> bool:
"""Alarm panel is always available even if gateway isn't."""
return True

@callback
def _handle_coordinator_update(self) -> None:
LOG.debug(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/adtpulse/base_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
return self._attrs

@property
def is_available(self) -> bool:
def available(self) -> bool:
"""Returns whether an entity is available.
Generally false if gateway is offline."""
Expand Down

0 comments on commit 85032e6

Please sign in to comment.