diff --git a/custom_components/nhc2/entities/alarms_action_alarm_control_panel.py b/custom_components/nhc2/entities/alarms_action_alarm_control_panel.py index 2ce92da..8a38bb5 100644 --- a/custom_components/nhc2/entities/alarms_action_alarm_control_panel.py +++ b/custom_components/nhc2/entities/alarms_action_alarm_control_panel.py @@ -1,5 +1,5 @@ -from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity, AlarmControlPanelEntityFeature -from homeassistant.const import STATE_ALARM_DISARMED, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMING +from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity, AlarmControlPanelEntityFeature, \ + AlarmControlPanelState from ..nhccoco.devices.alarms_action import CocoAlarmsAction from .nhc_entity import NHCBaseEntity @@ -21,11 +21,11 @@ def __init__(self, device_instance: CocoAlarmsAction, hub, gateway): @property def state(self) -> str: if self._device.is_basic_state_off: - return STATE_ALARM_DISARMED + return AlarmControlPanelState.DISARMED if self._device.is_basic_state_on: - return STATE_ALARM_ARMED_AWAY + return AlarmControlPanelState.ARMED_AWAY if self._device.is_basic_state_intermediate: - return STATE_ALARM_ARMING + return AlarmControlPanelState.ARMING async def async_alarm_arm_away(self, code=None) -> None: self._device.arm(self._gateway) diff --git a/custom_components/nhc2/nhccoco/coco.py b/custom_components/nhc2/nhccoco/coco.py index 0c42c6d..7744e68 100755 --- a/custom_components/nhc2/nhccoco/coco.py +++ b/custom_components/nhc2/nhccoco/coco.py @@ -372,6 +372,7 @@ def _process_devices_list(self, response): 'CocoMoodbuttonPanel', 'CocoMotorcontrollerfeedbackPanel', 'CocoMotorcontrollerPanel', + 'CocoMotorcontrollerSmartpanel', 'CocoMotorcontrollerx2FeedbackPanel', 'CocoMotorcontrollerx2Panel', 'CocoNhc2301RTouchswitch', @@ -397,6 +398,7 @@ def _process_devices_list(self, response): 'CocoRolldownshutterMotor', 'CocoSocketRelay', 'CocoSunblindMotor', + 'CocoSunblindSmartmotor', 'CocoSwitchedFanRelay', 'CocoSwitchedGenericRelay', 'CocoVdsVds',