Minor deCONZ clean up (#76323)
* Rename secondary_temperature with internal_temperature * Prefix binary and sensor descriptions matching on all sensor devices with COMMON_ * Always create entities in the same order Its been reported previously that if the integration is removed and setup again that entity IDs can change if not sorted in the numerical order * Rename alarmsystems to alarm_systems * Use websocket enums * Don't use legacy pydeconz constants * Bump pydeconz to v103 * unsub -> unsubscribe
This commit is contained in:
parent
742877f79b
commit
c2f026d0a7
12 changed files with 38 additions and 35 deletions
|
@ -48,7 +48,7 @@ def get_alarm_system_id_for_unique_id(
|
|||
gateway: DeconzGateway, unique_id: str
|
||||
) -> str | None:
|
||||
"""Retrieve alarm system ID the unique ID is registered to."""
|
||||
for alarm_system in gateway.api.alarmsystems.values():
|
||||
for alarm_system in gateway.api.alarm_systems.values():
|
||||
if unique_id in alarm_system.devices:
|
||||
return alarm_system.resource_id
|
||||
return None
|
||||
|
@ -122,27 +122,27 @@ class DeconzAlarmControlPanel(DeconzDevice[AncillaryControl], AlarmControlPanelE
|
|||
async def async_alarm_arm_away(self, code: str | None = None) -> None:
|
||||
"""Send arm away command."""
|
||||
if code:
|
||||
await self.gateway.api.alarmsystems.arm(
|
||||
await self.gateway.api.alarm_systems.arm(
|
||||
self.alarm_system_id, AlarmSystemArmAction.AWAY, code
|
||||
)
|
||||
|
||||
async def async_alarm_arm_home(self, code: str | None = None) -> None:
|
||||
"""Send arm home command."""
|
||||
if code:
|
||||
await self.gateway.api.alarmsystems.arm(
|
||||
await self.gateway.api.alarm_systems.arm(
|
||||
self.alarm_system_id, AlarmSystemArmAction.STAY, code
|
||||
)
|
||||
|
||||
async def async_alarm_arm_night(self, code: str | None = None) -> None:
|
||||
"""Send arm night command."""
|
||||
if code:
|
||||
await self.gateway.api.alarmsystems.arm(
|
||||
await self.gateway.api.alarm_systems.arm(
|
||||
self.alarm_system_id, AlarmSystemArmAction.NIGHT, code
|
||||
)
|
||||
|
||||
async def async_alarm_disarm(self, code: str | None = None) -> None:
|
||||
"""Send disarm command."""
|
||||
if code:
|
||||
await self.gateway.api.alarmsystems.arm(
|
||||
await self.gateway.api.alarm_systems.arm(
|
||||
self.alarm_system_id, AlarmSystemArmAction.DISARM, code
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue