Move deCONZ alarm system imports to reflect the changes in pydeconz (#70453)
parent
83fde83279
commit
009111151d
|
@ -1,7 +1,7 @@
|
|||
"""Support for deCONZ alarm control panel devices."""
|
||||
from __future__ import annotations
|
||||
|
||||
from pydeconz.alarm_system import AlarmSystem
|
||||
from pydeconz.models.alarm_system import AlarmSystem
|
||||
from pydeconz.models.sensor.ancillary_control import (
|
||||
ANCILLARY_CONTROL_ARMED_AWAY,
|
||||
ANCILLARY_CONTROL_ARMED_NIGHT,
|
||||
|
|
|
@ -8,9 +8,9 @@ from typing import TYPE_CHECKING, Any, cast
|
|||
|
||||
import async_timeout
|
||||
from pydeconz import DeconzSession, errors
|
||||
from pydeconz.alarm_system import AlarmSystem as DeconzAlarmSystem
|
||||
from pydeconz.light import LightBase as DeconzLight
|
||||
from pydeconz.models import ResourceGroup
|
||||
from pydeconz.models.alarm_system import AlarmSystem as DeconzAlarmSystem
|
||||
from pydeconz.models.group import Group as DeconzGroup
|
||||
from pydeconz.models.sensor import SensorBase as DeconzSensor
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ from homeassistant.const import (
|
|||
STATE_ALARM_PENDING,
|
||||
STATE_ALARM_TRIGGERED,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
|
||||
from .test_gateway import (
|
||||
|
@ -99,7 +100,7 @@ async def test_alarm_control_panel(hass, aioclient_mock, mock_deconz_websocket):
|
|||
"action": "armed_stay",
|
||||
"lastupdated": "2021-07-25T18:02:51.172",
|
||||
"lowbattery": False,
|
||||
"panel": "exit_delay",
|
||||
"panel": "none",
|
||||
"seconds_remaining": 55,
|
||||
"tampered": False,
|
||||
},
|
||||
|
@ -113,7 +114,7 @@ async def test_alarm_control_panel(hass, aioclient_mock, mock_deconz_websocket):
|
|||
config_entry = await setup_deconz_integration(hass, aioclient_mock)
|
||||
|
||||
assert len(hass.states.async_all()) == 4
|
||||
assert hass.states.get("alarm_control_panel.keypad").state == STATE_ALARM_PENDING
|
||||
assert hass.states.get("alarm_control_panel.keypad").state == STATE_UNKNOWN
|
||||
|
||||
# Event signals alarm control panel armed away
|
||||
|
||||
|
|
Loading…
Reference in New Issue