diff --git a/homeassistant/components/bosch_alarm/strings.json b/homeassistant/components/bosch_alarm/strings.json index 8edc4ba60b8..7a9d291a67f 100644 --- a/homeassistant/components/bosch_alarm/strings.json +++ b/homeassistant/components/bosch_alarm/strings.json @@ -58,7 +58,7 @@ "message": "Incorrect credentials for panel." }, "incorrect_door_state": { - "message": "Door cannot be manipulated while it is being cycled." + "message": "Door cannot be manipulated while it is momentarily unlocked." } }, "entity": { @@ -113,7 +113,7 @@ "name": "Secured" }, "cycling": { - "name": "Cycling" + "name": "Momentarily unlocked" }, "locked": { "name": "Locked" diff --git a/tests/components/bosch_alarm/snapshots/test_switch.ambr b/tests/components/bosch_alarm/snapshots/test_switch.ambr index ad508f257ba..0604787924f 100644 --- a/tests/components/bosch_alarm/snapshots/test_switch.ambr +++ b/tests/components/bosch_alarm/snapshots/test_switch.ambr @@ -1,51 +1,4 @@ # serializer version: 1 -# name: test_switch[None-amax_3000][switch.main_door_cycling-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'switch', - 'entity_category': None, - 'entity_id': 'switch.main_door_cycling', - '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': 'Cycling', - 'platform': 'bosch_alarm', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'cycling', - 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_door_1_cycling', - 'unit_of_measurement': None, - }) -# --- -# name: test_switch[None-amax_3000][switch.main_door_cycling-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Main Door Cycling', - }), - 'context': , - 'entity_id': 'switch.main_door_cycling', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_switch[None-amax_3000][switch.main_door_locked-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -93,6 +46,53 @@ 'state': 'on', }) # --- +# name: test_switch[None-amax_3000][switch.main_door_momentarily_unlocked-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.main_door_momentarily_unlocked', + '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': 'Momentarily unlocked', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'cycling', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_door_1_cycling', + 'unit_of_measurement': None, + }) +# --- +# name: test_switch[None-amax_3000][switch.main_door_momentarily_unlocked-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Main Door Momentarily unlocked', + }), + 'context': , + 'entity_id': 'switch.main_door_momentarily_unlocked', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_switch[None-amax_3000][switch.main_door_secured-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -187,53 +187,6 @@ 'state': 'off', }) # --- -# name: test_switch[None-b5512][switch.main_door_cycling-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'switch', - 'entity_category': None, - 'entity_id': 'switch.main_door_cycling', - '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': 'Cycling', - 'platform': 'bosch_alarm', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'cycling', - 'unique_id': '1234567890_door_1_cycling', - 'unit_of_measurement': None, - }) -# --- -# name: test_switch[None-b5512][switch.main_door_cycling-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Main Door Cycling', - }), - 'context': , - 'entity_id': 'switch.main_door_cycling', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_switch[None-b5512][switch.main_door_locked-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -281,6 +234,53 @@ 'state': 'on', }) # --- +# name: test_switch[None-b5512][switch.main_door_momentarily_unlocked-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.main_door_momentarily_unlocked', + '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': 'Momentarily unlocked', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'cycling', + 'unique_id': '1234567890_door_1_cycling', + 'unit_of_measurement': None, + }) +# --- +# name: test_switch[None-b5512][switch.main_door_momentarily_unlocked-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Main Door Momentarily unlocked', + }), + 'context': , + 'entity_id': 'switch.main_door_momentarily_unlocked', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_switch[None-b5512][switch.main_door_secured-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -375,53 +375,6 @@ 'state': 'off', }) # --- -# name: test_switch[None-solution_3000][switch.main_door_cycling-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'switch', - 'entity_category': None, - 'entity_id': 'switch.main_door_cycling', - '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': 'Cycling', - 'platform': 'bosch_alarm', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'cycling', - 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_door_1_cycling', - 'unit_of_measurement': None, - }) -# --- -# name: test_switch[None-solution_3000][switch.main_door_cycling-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Main Door Cycling', - }), - 'context': , - 'entity_id': 'switch.main_door_cycling', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_switch[None-solution_3000][switch.main_door_locked-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -469,6 +422,53 @@ 'state': 'on', }) # --- +# name: test_switch[None-solution_3000][switch.main_door_momentarily_unlocked-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.main_door_momentarily_unlocked', + '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': 'Momentarily unlocked', + 'platform': 'bosch_alarm', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'cycling', + 'unique_id': '01JQ917ACKQ33HHM7YCFXYZX51_door_1_cycling', + 'unit_of_measurement': None, + }) +# --- +# name: test_switch[None-solution_3000][switch.main_door_momentarily_unlocked-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Main Door Momentarily unlocked', + }), + 'context': , + 'entity_id': 'switch.main_door_momentarily_unlocked', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_switch[None-solution_3000][switch.main_door_secured-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/bosch_alarm/test_switch.py b/tests/components/bosch_alarm/test_switch.py index 6f25624dcbb..2c52c21099a 100644 --- a/tests/components/bosch_alarm/test_switch.py +++ b/tests/components/bosch_alarm/test_switch.py @@ -121,7 +121,7 @@ async def test_cycle_door( ) -> None: """Test that door state changes after unlocking the door.""" await setup_integration(hass, mock_config_entry) - entity_id = "switch.main_door_cycling" + entity_id = "switch.main_door_momentarily_unlocked" assert hass.states.get(entity_id).state == STATE_OFF await hass.services.async_call( SWITCH_DOMAIN,