From 700531b1a67de83d55459b4e60f649a6bacc515a Mon Sep 17 00:00:00 2001 From: JEMcats Date: Sun, 22 Sep 2024 15:57:05 +0000 Subject: [PATCH 1/8] Make Changes. --- homeassistant/components/tesla_fleet/icons.json | 12 ++++++++++++ homeassistant/components/tesla_fleet/sensor.py | 8 ++++++++ homeassistant/components/tesla_fleet/strings.json | 12 ++++++++++++ 3 files changed, 32 insertions(+) diff --git a/homeassistant/components/tesla_fleet/icons.json b/homeassistant/components/tesla_fleet/icons.json index 21e6cc46f6069e..ef43a5ea3f59da 100644 --- a/homeassistant/components/tesla_fleet/icons.json +++ b/homeassistant/components/tesla_fleet/icons.json @@ -185,6 +185,18 @@ }, "wall_connector_state": { "default": "mdi:ev-station" + }, + "storm_mode_active": { + "default": "mdi:weather-lightning" + }, + "island_status": { + "default": "mdi:help-circle", + "state": { + "on_grid": "mdi:transmission-tower", + "off_grid": "mdi:transmission-tower-off", + "island_status_unknown": "mdi:help-circle", + "off_grid_intentional": "mdi:account-cancel" + } } }, "switch": { diff --git a/homeassistant/components/tesla_fleet/sensor.py b/homeassistant/components/tesla_fleet/sensor.py index 4d30a509e1aff1..9043a4311e1cfd 100644 --- a/homeassistant/components/tesla_fleet/sensor.py +++ b/homeassistant/components/tesla_fleet/sensor.py @@ -378,6 +378,14 @@ class TeslaFleetTimeEntityDescription(SensorEntityDescription): device_class=SensorDeviceClass.POWER, entity_registry_enabled_default=False, ), + SensorEntityDescription( + key="island_status", + entity_registry_enabled_default=True, + ), + SensorEntityDescription( + key="storm_mode_active", + entity_registry_enabled_default=True, + ), ) WALL_CONNECTOR_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = ( diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index 0b2971733635c5..57dfaeb956dfd0 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -381,6 +381,18 @@ "vehicle_state_odometer": { "name": "Odometer" }, + "island_status": { + "name": "Grid Status", + "state": { + "island_status_unknown": "Unknown", + "on_grid": "Connected", + "off_grid": "Disconnected", + "off_grid_intentional": "Disconnected intentionally" + } + }, + "storm_mode_active": { + "name": "Storm Watch active" + }, "vehicle_state_tpms_pressure_fl": { "name": "Tire pressure front left" }, From a682d2504606bbb38b4dfe8fe27fea06a36a81ea Mon Sep 17 00:00:00 2001 From: JEMcats Date: Sun, 22 Sep 2024 21:05:17 +0000 Subject: [PATCH 2/8] Change to match suggested changes. --- homeassistant/components/tesla_fleet/icons.json | 1 + homeassistant/components/tesla_fleet/sensor.py | 2 -- homeassistant/components/tesla_fleet/strings.json | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tesla_fleet/icons.json b/homeassistant/components/tesla_fleet/icons.json index ef43a5ea3f59da..5f7b3a871b6da2 100644 --- a/homeassistant/components/tesla_fleet/icons.json +++ b/homeassistant/components/tesla_fleet/icons.json @@ -194,6 +194,7 @@ "state": { "on_grid": "mdi:transmission-tower", "off_grid": "mdi:transmission-tower-off", + "off_grid_unintentional": "mdi:transmission-tower-off", "island_status_unknown": "mdi:help-circle", "off_grid_intentional": "mdi:account-cancel" } diff --git a/homeassistant/components/tesla_fleet/sensor.py b/homeassistant/components/tesla_fleet/sensor.py index 9043a4311e1cfd..e02ed5343608a8 100644 --- a/homeassistant/components/tesla_fleet/sensor.py +++ b/homeassistant/components/tesla_fleet/sensor.py @@ -380,11 +380,9 @@ class TeslaFleetTimeEntityDescription(SensorEntityDescription): ), SensorEntityDescription( key="island_status", - entity_registry_enabled_default=True, ), SensorEntityDescription( key="storm_mode_active", - entity_registry_enabled_default=True, ), ) diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index 57dfaeb956dfd0..2c7569e1cab04e 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -387,6 +387,7 @@ "island_status_unknown": "Unknown", "on_grid": "Connected", "off_grid": "Disconnected", + "off_grid_unintentional": "Disconnected", "off_grid_intentional": "Disconnected intentionally" } }, From 8ef08a5931e400dc877e3df7bc3eec4f2987d832 Mon Sep 17 00:00:00 2001 From: JEMcats Date: Sun, 22 Sep 2024 22:07:09 +0000 Subject: [PATCH 3/8] add Possible States to island status --- homeassistant/components/tesla_fleet/sensor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/homeassistant/components/tesla_fleet/sensor.py b/homeassistant/components/tesla_fleet/sensor.py index e02ed5343608a8..2d08210fd48729 100644 --- a/homeassistant/components/tesla_fleet/sensor.py +++ b/homeassistant/components/tesla_fleet/sensor.py @@ -380,6 +380,14 @@ class TeslaFleetTimeEntityDescription(SensorEntityDescription): ), SensorEntityDescription( key="island_status", + options=[ + "island_status_unknown", + "on_grid", + "off_grid", + "off_grid_unintentional", + "off_grid_intentional", + ], + device_class=SensorDeviceClass.ENUM, ), SensorEntityDescription( key="storm_mode_active", From 6eb19f642ab0d519430f8aded5d829f24e5a86ba Mon Sep 17 00:00:00 2001 From: JEMcats Date: Tue, 24 Sep 2024 23:55:18 +0000 Subject: [PATCH 4/8] remove storm watch active sensor. --- homeassistant/components/tesla_fleet/sensor.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/homeassistant/components/tesla_fleet/sensor.py b/homeassistant/components/tesla_fleet/sensor.py index 2d08210fd48729..a4f86468f0a9e0 100644 --- a/homeassistant/components/tesla_fleet/sensor.py +++ b/homeassistant/components/tesla_fleet/sensor.py @@ -389,9 +389,6 @@ class TeslaFleetTimeEntityDescription(SensorEntityDescription): ], device_class=SensorDeviceClass.ENUM, ), - SensorEntityDescription( - key="storm_mode_active", - ), ) WALL_CONNECTOR_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = ( From 5791fb18fe73d72fb0d6dd23f0d8b6bccd2b0551 Mon Sep 17 00:00:00 2001 From: JEMcats Date: Wed, 25 Sep 2024 00:19:04 +0000 Subject: [PATCH 5/8] Update the test_*.ambr files --- .../tesla_fleet/snapshots/test_button.ambr | 276 ++++++++++++++++++ .../tesla_fleet/snapshots/test_lock.ambr | 94 ++++++ .../tesla_fleet/snapshots/test_sensor.ambr | 83 ++++++ 3 files changed, 453 insertions(+) diff --git a/tests/components/tesla_fleet/snapshots/test_button.ambr b/tests/components/tesla_fleet/snapshots/test_button.ambr index 8b5270d4852276..000ec9e7c0ce33 100644 --- a/tests/components/tesla_fleet/snapshots/test_button.ambr +++ b/tests/components/tesla_fleet/snapshots/test_button.ambr @@ -183,6 +183,282 @@ 'state': 'unknown', }) # --- +# name: test_button[button.test_none-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'wake', + 'unique_id': 'LRWXF7EK4KC700000-wake', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button[button.test_none_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none_2', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'flash_lights', + 'unique_id': 'LRWXF7EK4KC700000-flash_lights', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button[button.test_none_3-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none_3', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'honk', + 'unique_id': 'LRWXF7EK4KC700000-honk', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none_3', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button[button.test_none_4-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none_4', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'enable_keyless_driving', + 'unique_id': 'LRWXF7EK4KC700000-enable_keyless_driving', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none_4', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button[button.test_none_5-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none_5', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'boombox', + 'unique_id': 'LRWXF7EK4KC700000-boombox', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none_5', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button[button.test_none_6-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.test_none_6', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'homelink', + 'unique_id': 'LRWXF7EK4KC700000-homelink', + 'unit_of_measurement': None, + }) +# --- +# name: test_button[button.test_none_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + }), + 'context': , + 'entity_id': 'button.test_none_6', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_button[button.test_play_fart-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tesla_fleet/snapshots/test_lock.ambr b/tests/components/tesla_fleet/snapshots/test_lock.ambr index 3384bb0eb9774a..50cbda280ec313 100644 --- a/tests/components/tesla_fleet/snapshots/test_lock.ambr +++ b/tests/components/tesla_fleet/snapshots/test_lock.ambr @@ -93,3 +93,97 @@ 'state': 'unlocked', }) # --- +# name: test_lock[lock.test_none-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'lock', + 'entity_category': None, + 'entity_id': 'lock.test_none', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'vehicle_state_locked', + 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_locked', + 'unit_of_measurement': None, + }) +# --- +# name: test_lock[lock.test_none-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + 'supported_features': , + }), + 'context': , + 'entity_id': 'lock.test_none', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unlocked', + }) +# --- +# name: test_lock[lock.test_none_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'lock', + 'entity_category': None, + 'entity_id': 'lock.test_none_2', + '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': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'charge_state_charge_port_latch', + 'unique_id': 'LRWXF7EK4KC700000-charge_state_charge_port_latch', + 'unit_of_measurement': None, + }) +# --- +# name: test_lock[lock.test_none_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Test None', + 'supported_features': , + }), + 'context': , + 'entity_id': 'lock.test_none_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'locked', + }) +# --- diff --git a/tests/components/tesla_fleet/snapshots/test_sensor.ambr b/tests/components/tesla_fleet/snapshots/test_sensor.ambr index c6a4860056ac74..2c3780749ca48e 100644 --- a/tests/components/tesla_fleet/snapshots/test_sensor.ambr +++ b/tests/components/tesla_fleet/snapshots/test_sensor.ambr @@ -364,6 +364,89 @@ 'state': '0.0', }) # --- +# name: test_sensors[sensor.energy_site_grid_status-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'island_status_unknown', + 'on_grid', + 'off_grid', + 'off_grid_unintentional', + 'off_grid_intentional', + ]), + }), + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.energy_site_grid_status', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Grid Status', + 'platform': 'tesla_fleet', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'island_status', + 'unique_id': '123456-island_status', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[sensor.energy_site_grid_status-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Energy Site Grid Status', + 'options': list([ + 'island_status_unknown', + 'on_grid', + 'off_grid', + 'off_grid_unintentional', + 'off_grid_intentional', + ]), + }), + 'context': , + 'entity_id': 'sensor.energy_site_grid_status', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on_grid', + }) +# --- +# name: test_sensors[sensor.energy_site_grid_status-statealt] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Energy Site Grid Status', + 'options': list([ + 'island_status_unknown', + 'on_grid', + 'off_grid', + 'off_grid_unintentional', + 'off_grid_intentional', + ]), + }), + 'context': , + 'entity_id': 'sensor.energy_site_grid_status', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on_grid', + }) +# --- # name: test_sensors[sensor.energy_site_load_power-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ From d8f61c07936433361382b9a43648c3235a7e5bdc Mon Sep 17 00:00:00 2001 From: JEMcats Date: Wed, 25 Sep 2024 19:59:57 +0000 Subject: [PATCH 6/8] Update *.ambr files --- .../tesla_fleet/snapshots/test_button.ambr | 276 ---------- .../tesla_fleet/snapshots/test_cover.ambr | 480 ------------------ .../tesla_fleet/snapshots/test_lock.ambr | 94 ---- 3 files changed, 850 deletions(-) diff --git a/tests/components/tesla_fleet/snapshots/test_button.ambr b/tests/components/tesla_fleet/snapshots/test_button.ambr index 000ec9e7c0ce33..8b5270d4852276 100644 --- a/tests/components/tesla_fleet/snapshots/test_button.ambr +++ b/tests/components/tesla_fleet/snapshots/test_button.ambr @@ -183,282 +183,6 @@ 'state': 'unknown', }) # --- -# name: test_button[button.test_none-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'wake', - 'unique_id': 'LRWXF7EK4KC700000-wake', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button[button.test_none_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none_2', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'flash_lights', - 'unique_id': 'LRWXF7EK4KC700000-flash_lights', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button[button.test_none_3-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none_3', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'honk', - 'unique_id': 'LRWXF7EK4KC700000-honk', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none_3-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none_3', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button[button.test_none_4-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none_4', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'enable_keyless_driving', - 'unique_id': 'LRWXF7EK4KC700000-enable_keyless_driving', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none_4-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none_4', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button[button.test_none_5-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none_5', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'boombox', - 'unique_id': 'LRWXF7EK4KC700000-boombox', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none_5-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none_5', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button[button.test_none_6-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.test_none_6', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'homelink', - 'unique_id': 'LRWXF7EK4KC700000-homelink', - 'unit_of_measurement': None, - }) -# --- -# name: test_button[button.test_none_6-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - }), - 'context': , - 'entity_id': 'button.test_none_6', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- # name: test_button[button.test_play_fart-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tesla_fleet/snapshots/test_cover.ambr b/tests/components/tesla_fleet/snapshots/test_cover.ambr index c8eb9fb257ebea..dbdb003d802384 100644 --- a/tests/components/tesla_fleet/snapshots/test_cover.ambr +++ b/tests/components/tesla_fleet/snapshots/test_cover.ambr @@ -95,246 +95,6 @@ 'state': 'closed', }) # --- -# name: test_cover[cover.test_none-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'windows', - 'unique_id': 'LRWXF7EK4KC700000-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover[cover.test_none-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'window', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'closed', - }) -# --- -# name: test_cover[cover.test_none_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_2', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'charge_state_charge_port_door_open', - 'unique_id': 'LRWXF7EK4KC700000-charge_state_charge_port_door_open', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover[cover.test_none_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- -# name: test_cover[cover.test_none_3-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_3', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_ft', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_ft', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover[cover.test_none_3-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_3', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'closed', - }) -# --- -# name: test_cover[cover.test_none_4-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_4', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_rt', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_rt', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover[cover.test_none_4-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_4', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'closed', - }) -# --- -# name: test_cover[cover.test_none_5-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_5', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_sun_roof_state', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_sun_roof_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover[cover.test_none_5-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'window', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_5', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- # name: test_cover[cover.test_sunroof-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -575,246 +335,6 @@ 'state': 'open', }) # --- -# name: test_cover_alt[cover.test_none-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'windows', - 'unique_id': 'LRWXF7EK4KC700000-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_alt[cover.test_none-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'window', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- -# name: test_cover_alt[cover.test_none_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_2', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'charge_state_charge_port_door_open', - 'unique_id': 'LRWXF7EK4KC700000-charge_state_charge_port_door_open', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_alt[cover.test_none_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- -# name: test_cover_alt[cover.test_none_3-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_3', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_ft', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_ft', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_alt[cover.test_none_3-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_3', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- -# name: test_cover_alt[cover.test_none_4-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_4', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_rt', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_rt', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_alt[cover.test_none_4-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_4', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'open', - }) -# --- -# name: test_cover_alt[cover.test_none_5-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'cover', - 'entity_category': None, - 'entity_id': 'cover.test_none_5', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': None, - 'platform': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': , - 'translation_key': 'vehicle_state_sun_roof_state', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_sun_roof_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_alt[cover.test_none_5-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'window', - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.test_none_5', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- # name: test_cover_alt[cover.test_sunroof-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tesla_fleet/snapshots/test_lock.ambr b/tests/components/tesla_fleet/snapshots/test_lock.ambr index 50cbda280ec313..3384bb0eb9774a 100644 --- a/tests/components/tesla_fleet/snapshots/test_lock.ambr +++ b/tests/components/tesla_fleet/snapshots/test_lock.ambr @@ -93,97 +93,3 @@ 'state': 'unlocked', }) # --- -# name: test_lock[lock.test_none-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'lock', - 'entity_category': None, - 'entity_id': 'lock.test_none', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'vehicle_state_locked', - 'unique_id': 'LRWXF7EK4KC700000-vehicle_state_locked', - 'unit_of_measurement': None, - }) -# --- -# name: test_lock[lock.test_none-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.test_none', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unlocked', - }) -# --- -# name: test_lock[lock.test_none_2-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'lock', - 'entity_category': None, - 'entity_id': 'lock.test_none_2', - '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': 'tesla_fleet', - 'previous_unique_id': None, - 'supported_features': 0, - 'translation_key': 'charge_state_charge_port_latch', - 'unique_id': 'LRWXF7EK4KC700000-charge_state_charge_port_latch', - 'unit_of_measurement': None, - }) -# --- -# name: test_lock[lock.test_none_2-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Test None', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.test_none_2', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'locked', - }) -# --- From d492c2853a95900020ae322b1b451ecdf5f8d535 Mon Sep 17 00:00:00 2001 From: JEMcats Date: Sat, 5 Oct 2024 11:49:51 +0000 Subject: [PATCH 7/8] Add more infromation to Grid Status --- homeassistant/components/tesla_fleet/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index 6e6e6994f24764..73d66df70d2c2b 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -418,7 +418,7 @@ "island_status_unknown": "Unknown", "on_grid": "Connected", "off_grid": "Disconnected", - "off_grid_unintentional": "Disconnected", + "off_grid_unintentional": "Disconnected unintentionally", "off_grid_intentional": "Disconnected intentionally" } }, From 932914d6198e7087bd3bbd90a8d30f00ad7d4590 Mon Sep 17 00:00:00 2001 From: JEMcats Date: Mon, 7 Oct 2024 20:07:41 +0000 Subject: [PATCH 8/8] Remove storm mode strings and icons --- homeassistant/components/tesla_fleet/icons.json | 3 --- homeassistant/components/tesla_fleet/strings.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/homeassistant/components/tesla_fleet/icons.json b/homeassistant/components/tesla_fleet/icons.json index 653e849d934a36..449dda93c62a8d 100644 --- a/homeassistant/components/tesla_fleet/icons.json +++ b/homeassistant/components/tesla_fleet/icons.json @@ -223,9 +223,6 @@ "wall_connector_state": { "default": "mdi:ev-station" }, - "storm_mode_active": { - "default": "mdi:weather-lightning" - }, "island_status": { "default": "mdi:help-circle", "state": { diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index 73d66df70d2c2b..9b10344ba7d7da 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -422,9 +422,6 @@ "off_grid_intentional": "Disconnected intentionally" } }, - "storm_mode_active": { - "name": "Storm Watch active" - }, "vehicle_state_tpms_pressure_fl": { "name": "Tire pressure front left" },