From dbdffbba233c743d32239aefc3dea0da1be1b2c9 Mon Sep 17 00:00:00 2001 From: Sanjay Govind Date: Thu, 15 May 2025 06:56:08 +1200 Subject: [PATCH] Add binary sensors to bosch_alarm (#142147) * Add binary sensors to bosch_alarm * make one device per sensor, remove device class guessing * fix tests * update tests * Apply suggested changes * add binary sensors * make fault sensors diagnostic * update tests * update binary sensors to use base entity * fix strings * fix icons * add state translations for area ready sensors * use constants in tests * apply changes from review * remove fault prefix, use default translation for battery low * update tests --- .../components/bosch_alarm/__init__.py | 1 + .../components/bosch_alarm/binary_sensor.py | 220 ++ .../components/bosch_alarm/entity.py | 37 +- .../components/bosch_alarm/icons.json | 38 + .../components/bosch_alarm/strings.json | 46 + tests/components/bosch_alarm/conftest.py | 1 + .../snapshots/test_binary_sensor.ambr | 2995 +++++++++++++++++ .../bosch_alarm/test_binary_sensor.py | 78 + 8 files changed, 3415 insertions(+), 1 deletion(-) create mode 100644 homeassistant/components/bosch_alarm/binary_sensor.py create mode 100644 tests/components/bosch_alarm/snapshots/test_binary_sensor.ambr create mode 100644 tests/components/bosch_alarm/test_binary_sensor.py diff --git a/homeassistant/components/bosch_alarm/__init__.py b/homeassistant/components/bosch_alarm/__init__.py index 19debe10549..06ec98e91ba 100644 --- a/homeassistant/components/bosch_alarm/__init__.py +++ b/homeassistant/components/bosch_alarm/__init__.py @@ -16,6 +16,7 @@ from .const import CONF_INSTALLER_CODE, CONF_USER_CODE, DOMAIN PLATFORMS: list[Platform] = [ Platform.ALARM_CONTROL_PANEL, + Platform.BINARY_SENSOR, Platform.SENSOR, Platform.SWITCH, ] diff --git a/homeassistant/components/bosch_alarm/binary_sensor.py b/homeassistant/components/bosch_alarm/binary_sensor.py new file mode 100644 index 00000000000..ced97f04686 --- /dev/null +++ b/homeassistant/components/bosch_alarm/binary_sensor.py @@ -0,0 +1,220 @@ +"""Support for Bosch Alarm Panel binary sensors.""" + +from __future__ import annotations + +from dataclasses import dataclass + +from bosch_alarm_mode2 import Panel +from bosch_alarm_mode2.const import ALARM_PANEL_FAULTS + +from homeassistant.components.binary_sensor import ( + BinarySensorDeviceClass, + BinarySensorEntity, + BinarySensorEntityDescription, +) +from homeassistant.const import EntityCategory +from homeassistant.core import HomeAssistant +from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback + +from . import BoschAlarmConfigEntry +from .entity import BoschAlarmAreaEntity, BoschAlarmEntity, BoschAlarmPointEntity + + +@dataclass(kw_only=True, frozen=True) +class BoschAlarmFaultEntityDescription(BinarySensorEntityDescription): + """Describes Bosch Alarm sensor entity.""" + + fault: int + + +FAULT_TYPES = [ + BoschAlarmFaultEntityDescription( + key="panel_fault_battery_low", + entity_registry_enabled_default=True, + device_class=BinarySensorDeviceClass.BATTERY, + fault=ALARM_PANEL_FAULTS.BATTERY_LOW, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_battery_mising", + translation_key="panel_fault_battery_mising", + entity_registry_enabled_default=True, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.BATTERY_MISING, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_ac_fail", + translation_key="panel_fault_ac_fail", + entity_registry_enabled_default=True, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.AC_FAIL, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_phone_line_failure", + translation_key="panel_fault_phone_line_failure", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.CONNECTIVITY, + fault=ALARM_PANEL_FAULTS.PHONE_LINE_FAILURE, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_parameter_crc_fail_in_pif", + translation_key="panel_fault_parameter_crc_fail_in_pif", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.PARAMETER_CRC_FAIL_IN_PIF, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_communication_fail_since_rps_hang_up", + translation_key="panel_fault_communication_fail_since_rps_hang_up", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.COMMUNICATION_FAIL_SINCE_RPS_HANG_UP, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_sdi_fail_since_rps_hang_up", + translation_key="panel_fault_sdi_fail_since_rps_hang_up", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.SDI_FAIL_SINCE_RPS_HANG_UP, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_user_code_tamper_since_rps_hang_up", + translation_key="panel_fault_user_code_tamper_since_rps_hang_up", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.USER_CODE_TAMPER_SINCE_RPS_HANG_UP, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_fail_to_call_rps_since_rps_hang_up", + translation_key="panel_fault_fail_to_call_rps_since_rps_hang_up", + entity_registry_enabled_default=False, + fault=ALARM_PANEL_FAULTS.FAIL_TO_CALL_RPS_SINCE_RPS_HANG_UP, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_point_bus_fail_since_rps_hang_up", + translation_key="panel_fault_point_bus_fail_since_rps_hang_up", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.POINT_BUS_FAIL_SINCE_RPS_HANG_UP, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_log_overflow", + translation_key="panel_fault_log_overflow", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.LOG_OVERFLOW, + ), + BoschAlarmFaultEntityDescription( + key="panel_fault_log_threshold", + translation_key="panel_fault_log_threshold", + entity_registry_enabled_default=False, + device_class=BinarySensorDeviceClass.PROBLEM, + fault=ALARM_PANEL_FAULTS.LOG_THRESHOLD, + ), +] + + +async def async_setup_entry( + hass: HomeAssistant, + config_entry: BoschAlarmConfigEntry, + async_add_entities: AddConfigEntryEntitiesCallback, +) -> None: + """Set up binary sensors for alarm points and the connection status.""" + panel = config_entry.runtime_data + + entities: list[BinarySensorEntity] = [ + PointSensor(panel, point_id, config_entry.unique_id or config_entry.entry_id) + for point_id in panel.points + ] + + entities.extend( + PanelFaultsSensor( + panel, + config_entry.unique_id or config_entry.entry_id, + fault_type, + ) + for fault_type in FAULT_TYPES + ) + + entities.extend( + AreaReadyToArmSensor( + panel, area_id, config_entry.unique_id or config_entry.entry_id, "away" + ) + for area_id in panel.areas + ) + + entities.extend( + AreaReadyToArmSensor( + panel, area_id, config_entry.unique_id or config_entry.entry_id, "home" + ) + for area_id in panel.areas + ) + + async_add_entities(entities) + + +PARALLEL_UPDATES = 0 + + +class PanelFaultsSensor(BoschAlarmEntity, BinarySensorEntity): + """A binary sensor entity for each fault type in a bosch alarm panel.""" + + _attr_entity_category = EntityCategory.DIAGNOSTIC + entity_description: BoschAlarmFaultEntityDescription + + def __init__( + self, + panel: Panel, + unique_id: str, + entity_description: BoschAlarmFaultEntityDescription, + ) -> None: + """Set up a binary sensor entity for each fault type in a bosch alarm panel.""" + super().__init__(panel, unique_id, True) + self.entity_description = entity_description + self._fault_type = entity_description.fault + self._attr_unique_id = f"{unique_id}_fault_{entity_description.key}" + + @property + def is_on(self) -> bool: + """Return if this fault has occurred.""" + return self._fault_type in self.panel.panel_faults_ids + + +class AreaReadyToArmSensor(BoschAlarmAreaEntity, BinarySensorEntity): + """A binary sensor entity showing if a panel is ready to arm.""" + + _attr_entity_category = EntityCategory.DIAGNOSTIC + + def __init__( + self, panel: Panel, area_id: int, unique_id: str, arm_type: str + ) -> None: + """Set up a binary sensor entity for the arming status in a bosch alarm panel.""" + super().__init__(panel, area_id, unique_id, False, False, True) + self.panel = panel + self._arm_type = arm_type + self._attr_translation_key = f"area_ready_to_arm_{arm_type}" + self._attr_unique_id = f"{self._area_unique_id}_ready_to_arm_{arm_type}" + + @property + def is_on(self) -> bool: + """Return if this panel is ready to arm.""" + if self._arm_type == "away": + return self._area.all_ready + if self._arm_type == "home": + return self._area.all_ready or self._area.part_ready + return False + + +class PointSensor(BoschAlarmPointEntity, BinarySensorEntity): + """A binary sensor entity for a point in a bosch alarm panel.""" + + _attr_name = None + + def __init__(self, panel: Panel, point_id: int, unique_id: str) -> None: + """Set up a binary sensor entity for a point in a bosch alarm panel.""" + super().__init__(panel, point_id, unique_id) + self._attr_unique_id = self._point_unique_id + + @property + def is_on(self) -> bool: + """Return if this point sensor is on.""" + return self._point.is_open() diff --git a/homeassistant/components/bosch_alarm/entity.py b/homeassistant/components/bosch_alarm/entity.py index e9223b729c4..537ee412e47 100644 --- a/homeassistant/components/bosch_alarm/entity.py +++ b/homeassistant/components/bosch_alarm/entity.py @@ -17,9 +17,13 @@ class BoschAlarmEntity(Entity): _attr_has_entity_name = True - def __init__(self, panel: Panel, unique_id: str) -> None: + def __init__( + self, panel: Panel, unique_id: str, observe_faults: bool = False + ) -> None: """Set up a entity for a bosch alarm panel.""" self.panel = panel + self._observe_faults = observe_faults + self._attr_should_poll = False self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, unique_id)}, name=f"Bosch {panel.model}", @@ -34,10 +38,14 @@ class BoschAlarmEntity(Entity): async def async_added_to_hass(self) -> None: """Observe state changes.""" self.panel.connection_status_observer.attach(self.schedule_update_ha_state) + if self._observe_faults: + self.panel.faults_observer.attach(self.schedule_update_ha_state) async def async_will_remove_from_hass(self) -> None: """Stop observing state changes.""" self.panel.connection_status_observer.detach(self.schedule_update_ha_state) + if self._observe_faults: + self.panel.faults_observer.attach(self.schedule_update_ha_state) class BoschAlarmAreaEntity(BoschAlarmEntity): @@ -88,6 +96,33 @@ class BoschAlarmAreaEntity(BoschAlarmEntity): self._area.status_observer.detach(self.schedule_update_ha_state) +class BoschAlarmPointEntity(BoschAlarmEntity): + """A base entity for point related entities within a bosch alarm panel.""" + + def __init__(self, panel: Panel, point_id: int, unique_id: str) -> None: + """Set up a area related entity for a bosch alarm panel.""" + super().__init__(panel, unique_id) + self._point_id = point_id + self._point_unique_id = f"{unique_id}_point_{point_id}" + self._point = panel.points[point_id] + self._attr_device_info = DeviceInfo( + identifiers={(DOMAIN, self._point_unique_id)}, + name=self._point.name, + manufacturer="Bosch Security Systems", + via_device=(DOMAIN, unique_id), + ) + + async def async_added_to_hass(self) -> None: + """Observe state changes.""" + await super().async_added_to_hass() + self._point.status_observer.attach(self.schedule_update_ha_state) + + async def async_will_remove_from_hass(self) -> None: + """Stop observing state changes.""" + await super().async_added_to_hass() + self._point.status_observer.detach(self.schedule_update_ha_state) + + class BoschAlarmDoorEntity(BoschAlarmEntity): """A base entity for area related entities within a bosch alarm panel.""" diff --git a/homeassistant/components/bosch_alarm/icons.json b/homeassistant/components/bosch_alarm/icons.json index 44a94fdc570..43f6f33e066 100644 --- a/homeassistant/components/bosch_alarm/icons.json +++ b/homeassistant/components/bosch_alarm/icons.json @@ -24,6 +24,44 @@ "on": "mdi:lock-open" } } + }, + "binary_sensor": { + "panel_fault_parameter_crc_fail_in_pif": { + "default": "mdi:alert-circle" + }, + "panel_fault_phone_line_failure": { + "default": "mdi:alert-circle" + }, + "panel_fault_sdi_fail_since_rps_hang_up": { + "default": "mdi:alert-circle" + }, + "panel_fault_user_code_tamper_since_rps_hang_up": { + "default": "mdi:alert-circle" + }, + "panel_fault_fail_to_call_rps_since_rps_hang_up": { + "default": "mdi:alert-circle" + }, + "panel_fault_point_bus_fail_since_rps_hang_up": { + "default": "mdi:alert-circle" + }, + "panel_fault_log_overflow": { + "default": "mdi:alert-circle" + }, + "panel_fault_log_threshold": { + "default": "mdi:alert-circle" + }, + "area_ready_to_arm_away": { + "default": "mdi:shield", + "state": { + "on": "mdi:shield-lock" + } + }, + "area_ready_to_arm_home": { + "default": "mdi:shield", + "state": { + "on": "mdi:shield-home" + } + } } } } diff --git a/homeassistant/components/bosch_alarm/strings.json b/homeassistant/components/bosch_alarm/strings.json index 4e71d14fe4a..3a6604c2634 100644 --- a/homeassistant/components/bosch_alarm/strings.json +++ b/homeassistant/components/bosch_alarm/strings.json @@ -60,6 +60,52 @@ } }, "entity": { + "binary_sensor": { + "panel_fault_battery_mising": { + "name": "Battery missing" + }, + "panel_fault_ac_fail": { + "name": "AC Failure" + }, + "panel_fault_parameter_crc_fail_in_pif": { + "name": "CRC failure in panel configuration" + }, + "panel_fault_phone_line_failure": { + "name": "Phone line failure" + }, + "panel_fault_sdi_fail_since_rps_hang_up": { + "name": "SDI failure since RPS hang up" + }, + "panel_fault_user_code_tamper_since_rps_hang_up": { + "name": "User code tamper since RPS hang up" + }, + "panel_fault_fail_to_call_rps_since_rps_hang_up": { + "name": "Failure to call RPS since RPS hang up" + }, + "panel_fault_point_bus_fail_since_rps_hang_up": { + "name": "Point bus failure since RPS hang up" + }, + "panel_fault_log_overflow": { + "name": "Log overflow" + }, + "panel_fault_log_threshold": { + "name": "Log threshold reached" + }, + "area_ready_to_arm_away": { + "name": "Area ready to arm away", + "state": { + "on": "Ready", + "off": "Not ready" + } + }, + "area_ready_to_arm_home": { + "name": "Area ready to arm home", + "state": { + "on": "Ready", + "off": "Not ready" + } + } + }, "switch": { "secured": { "name": "Secured" diff --git a/tests/components/bosch_alarm/conftest.py b/tests/components/bosch_alarm/conftest.py index 76bb896daf5..3be4ba2c816 100644 --- a/tests/components/bosch_alarm/conftest.py +++ b/tests/components/bosch_alarm/conftest.py @@ -171,6 +171,7 @@ def mock_panel( client.model = model_name client.faults = [] client.events = [] + client.panel_faults_ids = [] client.firmware_version = "1.0.0" client.protocol_version = "1.0.0" client.serial_number = serial_number diff --git a/tests/components/bosch_alarm/snapshots/test_binary_sensor.ambr b/tests/components/bosch_alarm/snapshots/test_binary_sensor.ambr new file mode 100644 index 00000000000..e5396b662f3 --- /dev/null +++ b/tests/components/bosch_alarm/snapshots/test_binary_sensor.ambr @@ -0,0 +1,2995 @@ +# serializer version: 1 +# name: test_binary_sensor[amax_3000][binary_sensor.area1_area_ready_to_arm_away-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm away', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_away', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_area_1_ready_to_arm_away', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.area1_area_ready_to_arm_away-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm away', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.area1_area_ready_to_arm_home-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm home', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_home', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_area_1_ready_to_arm_home', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.area1_area_ready_to_arm_home-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm home', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bedroom-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.bedroom', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_6', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bedroom-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bedroom', + }), + 'context': , + 'entity_id': 'binary_sensor.bedroom', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_ac_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_ac_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'AC Failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_ac_fail', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_ac_fail', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_ac_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 AC Failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_ac_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_battery_low', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Bosch AMAX 3000 Battery', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_battery_missing-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_battery_missing', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery missing', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_battery_mising', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_battery_mising', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_battery_missing-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 Battery missing', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_battery_missing', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_crc_failure_in_panel_configuration-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_crc_failure_in_panel_configuration', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'CRC failure in panel configuration', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_parameter_crc_fail_in_pif', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_parameter_crc_fail_in_pif', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_crc_failure_in_panel_configuration-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 CRC failure in panel configuration', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_crc_failure_in_panel_configuration', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_failure_to_call_rps_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_failure_to_call_rps_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Failure to call RPS since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_failure_to_call_rps_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bosch AMAX 3000 Failure to call RPS since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_failure_to_call_rps_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_log_overflow-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_log_overflow', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log overflow', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_overflow', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_log_overflow', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_log_overflow-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 Log overflow', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_log_overflow', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_log_threshold_reached-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_log_threshold_reached', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log threshold reached', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_threshold', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_log_threshold', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_log_threshold_reached-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 Log threshold reached', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_log_threshold_reached', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_phone_line_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_phone_line_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Phone line failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_phone_line_failure', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_phone_line_failure', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_phone_line_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'connectivity', + 'friendly_name': 'Bosch AMAX 3000 Phone line failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_phone_line_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_point_bus_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_point_bus_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Point bus failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_point_bus_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_point_bus_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_point_bus_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 Point bus failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_point_bus_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_problem-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_problem', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Problem', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_communication_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_communication_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_problem-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 Problem', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_problem', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_sdi_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_sdi_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'SDI failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_sdi_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_sdi_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_sdi_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 SDI failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_sdi_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_user_code_tamper_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_amax_3000_user_code_tamper_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'User code tamper since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_user_code_tamper_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_user_code_tamper_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.bosch_amax_3000_user_code_tamper_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch AMAX 3000 User code tamper since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_amax_3000_user_code_tamper_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.co_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.co_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_3', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.co_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'CO Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.co_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Door', + }), + 'context': , + 'entity_id': 'binary_sensor.door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.glassbreak_sensor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_5', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.glassbreak_sensor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Glassbreak Sensor', + }), + 'context': , + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.motion_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.motion_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_2', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.motion_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Motion Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.motion_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.smoke_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.smoke_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_4', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.smoke_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Smoke Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.smoke_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.window-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.window', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_0', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[amax_3000][binary_sensor.window-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Window', + }), + 'context': , + 'entity_id': 'binary_sensor.window', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.area1_area_ready_to_arm_away-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm away', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_away', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_area_1_ready_to_arm_away', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.area1_area_ready_to_arm_away-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm away', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.area1_area_ready_to_arm_home-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm home', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_home', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_area_1_ready_to_arm_home', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.area1_area_ready_to_arm_home-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm home', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bedroom-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.bedroom', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_6', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bedroom-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bedroom', + }), + 'context': , + 'entity_id': 'binary_sensor.bedroom', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_ac_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_ac_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'AC Failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_ac_fail', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_ac_fail', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_ac_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) AC Failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_ac_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_battery_low', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Bosch B5512 (US1B) Battery', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_battery_missing-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_battery_missing', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery missing', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_battery_mising', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_battery_mising', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_battery_missing-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) Battery missing', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_battery_missing', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_crc_failure_in_panel_configuration-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_crc_failure_in_panel_configuration', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'CRC failure in panel configuration', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_parameter_crc_fail_in_pif', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_parameter_crc_fail_in_pif', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_crc_failure_in_panel_configuration-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) CRC failure in panel configuration', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_crc_failure_in_panel_configuration', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_failure_to_call_rps_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_failure_to_call_rps_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Failure to call RPS since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_failure_to_call_rps_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bosch B5512 (US1B) Failure to call RPS since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_failure_to_call_rps_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_log_overflow-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_log_overflow', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log overflow', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_overflow', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_log_overflow', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_log_overflow-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) Log overflow', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_log_overflow', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_log_threshold_reached-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_log_threshold_reached', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log threshold reached', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_threshold', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_log_threshold', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_log_threshold_reached-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) Log threshold reached', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_log_threshold_reached', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_phone_line_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_phone_line_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Phone line failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_phone_line_failure', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_phone_line_failure', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_phone_line_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'connectivity', + 'friendly_name': 'Bosch B5512 (US1B) Phone line failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_phone_line_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_point_bus_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_point_bus_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Point bus failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_point_bus_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_point_bus_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_point_bus_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) Point bus failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_point_bus_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_problem-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_problem', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Problem', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_communication_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_communication_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_problem-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) Problem', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_problem', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_sdi_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_sdi_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'SDI failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_sdi_fail_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_sdi_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_sdi_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) SDI failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_sdi_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_user_code_tamper_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_user_code_tamper_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'User code tamper since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_user_code_tamper_since_rps_hang_up', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_fault_panel_fault_user_code_tamper_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.bosch_b5512_us1b_user_code_tamper_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch B5512 (US1B) User code tamper since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_b5512_us1b_user_code_tamper_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.co_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.co_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_3', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.co_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'CO Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.co_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Door', + }), + 'context': , + 'entity_id': 'binary_sensor.door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.glassbreak_sensor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_5', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.glassbreak_sensor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Glassbreak Sensor', + }), + 'context': , + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.motion_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.motion_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_2', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.motion_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Motion Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.motion_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.smoke_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.smoke_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_4', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.smoke_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Smoke Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.smoke_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.window-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.window', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_point_0', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[b5512][binary_sensor.window-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Window', + }), + 'context': , + 'entity_id': 'binary_sensor.window', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.area1_area_ready_to_arm_away-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm away', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_away', + 'unique_id': '1234567890_area_1_ready_to_arm_away', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.area1_area_ready_to_arm_away-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm away', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_away', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.area1_area_ready_to_arm_home-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Area ready to arm home', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'area_ready_to_arm_home', + 'unique_id': '1234567890_area_1_ready_to_arm_home', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.area1_area_ready_to_arm_home-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Area1 Area ready to arm home', + }), + 'context': , + 'entity_id': 'binary_sensor.area1_area_ready_to_arm_home', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bedroom-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.bedroom', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_6', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bedroom-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bedroom', + }), + 'context': , + 'entity_id': 'binary_sensor.bedroom', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_ac_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_ac_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'AC Failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_ac_fail', + 'unique_id': '1234567890_fault_panel_fault_ac_fail', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_ac_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 AC Failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_ac_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_fault_panel_fault_battery_low', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Bosch Solution 3000 Battery', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_battery_missing-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_battery_missing', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery missing', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_battery_mising', + 'unique_id': '1234567890_fault_panel_fault_battery_mising', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_battery_missing-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 Battery missing', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_battery_missing', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_crc_failure_in_panel_configuration-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_crc_failure_in_panel_configuration', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'CRC failure in panel configuration', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_parameter_crc_fail_in_pif', + 'unique_id': '1234567890_fault_panel_fault_parameter_crc_fail_in_pif', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_crc_failure_in_panel_configuration-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 CRC failure in panel configuration', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_crc_failure_in_panel_configuration', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_failure_to_call_rps_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_failure_to_call_rps_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Failure to call RPS since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unique_id': '1234567890_fault_panel_fault_fail_to_call_rps_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_failure_to_call_rps_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Bosch Solution 3000 Failure to call RPS since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_failure_to_call_rps_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_log_overflow-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_log_overflow', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log overflow', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_overflow', + 'unique_id': '1234567890_fault_panel_fault_log_overflow', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_log_overflow-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 Log overflow', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_log_overflow', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_log_threshold_reached-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_log_threshold_reached', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Log threshold reached', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_log_threshold', + 'unique_id': '1234567890_fault_panel_fault_log_threshold', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_log_threshold_reached-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 Log threshold reached', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_log_threshold_reached', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_phone_line_failure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_phone_line_failure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Phone line failure', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_phone_line_failure', + 'unique_id': '1234567890_fault_panel_fault_phone_line_failure', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_phone_line_failure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'connectivity', + 'friendly_name': 'Bosch Solution 3000 Phone line failure', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_phone_line_failure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_point_bus_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_point_bus_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Point bus failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_point_bus_fail_since_rps_hang_up', + 'unique_id': '1234567890_fault_panel_fault_point_bus_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_point_bus_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 Point bus failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_point_bus_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_problem-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_problem', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Problem', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_communication_fail_since_rps_hang_up', + 'unique_id': '1234567890_fault_panel_fault_communication_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_problem-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 Problem', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_problem', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_sdi_failure_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_sdi_failure_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'SDI failure since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_sdi_fail_since_rps_hang_up', + 'unique_id': '1234567890_fault_panel_fault_sdi_fail_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_sdi_failure_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 SDI failure since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_sdi_failure_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_user_code_tamper_since_rps_hang_up-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.bosch_solution_3000_user_code_tamper_since_rps_hang_up', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'User code tamper since RPS hang up', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'panel_fault_user_code_tamper_since_rps_hang_up', + 'unique_id': '1234567890_fault_panel_fault_user_code_tamper_since_rps_hang_up', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.bosch_solution_3000_user_code_tamper_since_rps_hang_up-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Bosch Solution 3000 User code tamper since RPS hang up', + }), + 'context': , + 'entity_id': 'binary_sensor.bosch_solution_3000_user_code_tamper_since_rps_hang_up', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.co_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.co_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_3', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.co_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'CO Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.co_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Door', + }), + 'context': , + 'entity_id': 'binary_sensor.door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.glassbreak_sensor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_5', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.glassbreak_sensor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Glassbreak Sensor', + }), + 'context': , + 'entity_id': 'binary_sensor.glassbreak_sensor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.motion_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.motion_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_2', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.motion_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Motion Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.motion_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.smoke_detector-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.smoke_detector', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_4', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.smoke_detector-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Smoke Detector', + }), + 'context': , + 'entity_id': 'binary_sensor.smoke_detector', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.window-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.window', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1234567890_point_0', + 'unit_of_measurement': None, + }) +# --- +# name: test_binary_sensor[solution_3000][binary_sensor.window-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Window', + }), + 'context': , + 'entity_id': 'binary_sensor.window', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- diff --git a/tests/components/bosch_alarm/test_binary_sensor.py b/tests/components/bosch_alarm/test_binary_sensor.py new file mode 100644 index 00000000000..e788d7c5eda --- /dev/null +++ b/tests/components/bosch_alarm/test_binary_sensor.py @@ -0,0 +1,78 @@ +"""Tests for Bosch Alarm component.""" + +from collections.abc import AsyncGenerator +from unittest.mock import AsyncMock, patch + +from bosch_alarm_mode2.const import ALARM_PANEL_FAULTS +import pytest +from syrupy.assertion import SnapshotAssertion + +from homeassistant.const import STATE_OFF, STATE_ON, Platform +from homeassistant.core import HomeAssistant +from homeassistant.helpers import entity_registry as er + +from . import call_observable, setup_integration + +from tests.common import MockConfigEntry, snapshot_platform + + +@pytest.fixture(autouse=True) +async def platforms() -> AsyncGenerator[None]: + """Return the platforms to be loaded for this test.""" + with patch( + "homeassistant.components.bosch_alarm.PLATFORMS", [Platform.BINARY_SENSOR] + ): + yield + + +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +async def test_binary_sensor( + hass: HomeAssistant, + entity_registry: er.EntityRegistry, + snapshot: SnapshotAssertion, + mock_panel: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test the binary sensor state.""" + await setup_integration(hass, mock_config_entry) + + await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) + + +@pytest.mark.parametrize("model", ["b5512"]) +async def test_panel_faults( + hass: HomeAssistant, + mock_panel: AsyncMock, + area: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test that fault sensor state changes after inducing a fault.""" + await setup_integration(hass, mock_config_entry) + entity_id = "binary_sensor.bosch_b5512_us1b_battery" + assert hass.states.get(entity_id).state == STATE_OFF + mock_panel.panel_faults_ids = [ALARM_PANEL_FAULTS.BATTERY_LOW] + await call_observable(hass, mock_panel.faults_observer) + assert hass.states.get(entity_id).state == STATE_ON + + +@pytest.mark.parametrize("model", ["b5512"]) +async def test_area_ready_to_arm( + hass: HomeAssistant, + mock_panel: AsyncMock, + area: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test that fault sensor state changes after inducing a fault.""" + await setup_integration(hass, mock_config_entry) + entity_id = "binary_sensor.area1_area_ready_to_arm_away" + entity_id_2 = "binary_sensor.area1_area_ready_to_arm_home" + assert hass.states.get(entity_id).state == STATE_ON + assert hass.states.get(entity_id_2).state == STATE_ON + area.all_ready = False + await call_observable(hass, area.status_observer) + assert hass.states.get(entity_id).state == STATE_OFF + assert hass.states.get(entity_id_2).state == STATE_ON + area.part_ready = False + await call_observable(hass, area.status_observer) + assert hass.states.get(entity_id).state == STATE_OFF + assert hass.states.get(entity_id_2).state == STATE_OFF