mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Add check on disarm code for Alarm Control Panel - Elmax (#91158)
This commit is contained in:
parent
792ea92e55
commit
dae05a0c93
@ -83,6 +83,9 @@ class ElmaxArea(ElmaxEntity, AlarmControlPanelEntity):
|
|||||||
|
|
||||||
async def async_alarm_disarm(self, code: str | None = None) -> None:
|
async def async_alarm_disarm(self, code: str | None = None) -> None:
|
||||||
"""Send disarm command."""
|
"""Send disarm command."""
|
||||||
|
# Elmax alarm panels do always require a code to be passed for disarm operations
|
||||||
|
if code is None or code == "":
|
||||||
|
raise ValueError("Please input the disarm code.")
|
||||||
await self.coordinator.http_client.execute_command(
|
await self.coordinator.http_client.execute_command(
|
||||||
endpoint_id=self._device.endpoint_id,
|
endpoint_id=self._device.endpoint_id,
|
||||||
command=AreaCommand.DISARM,
|
command=AreaCommand.DISARM,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user