diff --git a/homeassistant/components/renault/manifest.json b/homeassistant/components/renault/manifest.json index 82b6f82867d1..276d72012f1b 100644 --- a/homeassistant/components/renault/manifest.json +++ b/homeassistant/components/renault/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_polling", "loggers": ["renault_api"], "quality_scale": "silver", - "requirements": ["renault-api==0.4.1"] + "requirements": ["renault-api==0.4.4"] } diff --git a/requirements_all.txt b/requirements_all.txt index a4ab6ed66eab..7237904f0eae 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2704,7 +2704,7 @@ refoss-ha==1.2.5 regenmaschine==2024.03.0 # homeassistant.components.renault -renault-api==0.4.1 +renault-api==0.4.4 # homeassistant.components.renson renson-endura-delta==1.7.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index ee6adfcdd93e..88f9f3dd5aa9 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2250,7 +2250,7 @@ refoss-ha==1.2.5 regenmaschine==2024.03.0 # homeassistant.components.renault -renault-api==0.4.1 +renault-api==0.4.4 # homeassistant.components.renson renson-endura-delta==1.7.2 diff --git a/tests/components/renault/snapshots/test_binary_sensor.ambr b/tests/components/renault/snapshots/test_binary_sensor.ambr index cee29a76dca1..10537d48064b 100644 --- a/tests/components/renault/snapshots/test_binary_sensor.ambr +++ b/tests/components/renault/snapshots/test_binary_sensor.ambr @@ -291,7 +291,7 @@ 'state': 'unavailable', }) # --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_driver_door-entry] +# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_hvac-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -304,7 +304,7 @@ 'disabled_by': None, 'domain': 'binary_sensor', 'entity_category': None, - 'entity_id': 'binary_sensor.reg_captur_fuel_driver_door', + 'entity_id': 'binary_sensor.reg_captur_fuel_hvac', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -314,275 +314,29 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Driver door', + 'original_name': 'HVAC', 'platform': 'renault', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'driver_door_status', - 'unique_id': 'vf1capturfuelvin_driver_door_status', + 'translation_key': 'hvac_status', + 'unique_id': 'vf1capturfuelvin_hvac_status', 'unit_of_measurement': None, }) # --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_driver_door-state] +# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_hvac-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR-FUEL Driver door', + 'friendly_name': 'REG-CAPTUR-FUEL HVAC', }), 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_driver_door', + 'entity_id': 'binary_sensor.reg_captur_fuel_hvac', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_hatch-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.reg_captur_fuel_hatch', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Hatch', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'hatch_status', - 'unique_id': 'vf1capturfuelvin_hatch_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_hatch-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR-FUEL Hatch', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_hatch', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_lock-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.reg_captur_fuel_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'vf1capturfuelvin_lock_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'friendly_name': 'REG-CAPTUR-FUEL Lock', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_passenger_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.reg_captur_fuel_passenger_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Passenger door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'passenger_door_status', - 'unique_id': 'vf1capturfuelvin_passenger_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_passenger_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR-FUEL Passenger door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_passenger_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_rear_left_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.reg_captur_fuel_rear_left_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_door_status', - 'unique_id': 'vf1capturfuelvin_rear_left_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_rear_left_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR-FUEL Rear left door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_rear_left_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_rear_right_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.reg_captur_fuel_rear_right_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_door_status', - 'unique_id': 'vf1capturfuelvin_rear_right_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_fuel][binary_sensor.reg_captur_fuel_rear_right_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR-FUEL Rear right door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_fuel_rear_right_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', + 'state': 'unknown', }) # --- # name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_charging-entry] @@ -634,7 +388,7 @@ 'state': 'on', }) # --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_driver_door-entry] +# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_hvac-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -647,7 +401,7 @@ 'disabled_by': None, 'domain': 'binary_sensor', 'entity_category': None, - 'entity_id': 'binary_sensor.reg_captur_phev_driver_door', + 'entity_id': 'binary_sensor.reg_captur_phev_hvac', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -657,177 +411,29 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Driver door', + 'original_name': 'HVAC', 'platform': 'renault', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'driver_door_status', - 'unique_id': 'vf1capturphevvin_driver_door_status', + 'translation_key': 'hvac_status', + 'unique_id': 'vf1capturphevvin_hvac_status', 'unit_of_measurement': None, }) # --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_driver_door-state] +# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_hvac-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR_PHEV Driver door', + 'friendly_name': 'REG-CAPTUR_PHEV HVAC', }), 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_driver_door', + 'entity_id': 'binary_sensor.reg_captur_phev_hvac', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_hatch-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.reg_captur_phev_hatch', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Hatch', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'hatch_status', - 'unique_id': 'vf1capturphevvin_hatch_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_hatch-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR_PHEV Hatch', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_hatch', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_lock-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.reg_captur_phev_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'vf1capturphevvin_lock_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'friendly_name': 'REG-CAPTUR_PHEV Lock', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_passenger_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.reg_captur_phev_passenger_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Passenger door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'passenger_door_status', - 'unique_id': 'vf1capturphevvin_passenger_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_passenger_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR_PHEV Passenger door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_passenger_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', + 'state': 'unknown', }) # --- # name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_plug-entry] @@ -879,104 +485,6 @@ 'state': 'on', }) # --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_rear_left_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.reg_captur_phev_rear_left_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_door_status', - 'unique_id': 'vf1capturphevvin_rear_left_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_rear_left_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR_PHEV Rear left door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_rear_left_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_rear_right_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.reg_captur_phev_rear_right_door', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right door', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_door_status', - 'unique_id': 'vf1capturphevvin_rear_right_door_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[captur_phev][binary_sensor.reg_captur_phev_rear_right_door-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'door', - 'friendly_name': 'REG-CAPTUR_PHEV Rear right door', - }), - 'context': , - 'entity_id': 'binary_sensor.reg_captur_phev_rear_right_door', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_binary_sensors[twingo_3_electric][binary_sensor.reg_twingo_iii_charging-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/renault/snapshots/test_select.ambr b/tests/components/renault/snapshots/test_select.ambr index e0a1c779fc8b..ad6e44b3923c 100644 --- a/tests/components/renault/snapshots/test_select.ambr +++ b/tests/components/renault/snapshots/test_select.ambr @@ -121,67 +121,6 @@ 'state': 'unavailable', }) # --- -# name: test_selects[captur_phev][select.reg_captur_phev_charge_mode-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'always', - 'always_charging', - 'schedule_mode', - 'scheduled', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.reg_captur_phev_charge_mode', - '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': 'Charge mode', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charge_mode', - 'unique_id': 'vf1capturphevvin_charge_mode', - 'unit_of_measurement': None, - }) -# --- -# name: test_selects[captur_phev][select.reg_captur_phev_charge_mode-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-CAPTUR_PHEV Charge mode', - 'options': list([ - 'always', - 'always_charging', - 'schedule_mode', - 'scheduled', - ]), - }), - 'context': , - 'entity_id': 'select.reg_captur_phev_charge_mode', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'always', - }) -# --- # name: test_selects[twingo_3_electric][select.reg_twingo_iii_charge_mode-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -304,64 +243,3 @@ 'state': 'always', }) # --- -# name: test_selects[zoe_50][select.reg_zoe_50_charge_mode-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'always', - 'always_charging', - 'schedule_mode', - 'scheduled', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.reg_zoe_50_charge_mode', - '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': 'Charge mode', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charge_mode', - 'unique_id': 'vf1zoe50vin_charge_mode', - 'unit_of_measurement': None, - }) -# --- -# name: test_selects[zoe_50][select.reg_zoe_50_charge_mode-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-ZOE-50 Charge mode', - 'options': list([ - 'always', - 'always_charging', - 'schedule_mode', - 'scheduled', - ]), - }), - 'context': , - 'entity_id': 'select.reg_zoe_50_charge_mode', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'schedule_mode', - }) -# --- diff --git a/tests/components/renault/snapshots/test_sensor.ambr b/tests/components/renault/snapshots/test_sensor.ambr index 908b3ab90321..3f7c0b637d85 100644 --- a/tests/components/renault/snapshots/test_sensor.ambr +++ b/tests/components/renault/snapshots/test_sensor.ambr @@ -1563,6 +1563,104 @@ 'state': '3', }) # --- +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_hvac_soc_threshold-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.reg_captur_fuel_hvac_soc_threshold', + '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': 'HVAC SoC threshold', + 'platform': 'renault', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hvac_soc_threshold', + 'unique_id': 'vf1capturfuelvin_hvac_soc_threshold', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_hvac_soc_threshold-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'REG-CAPTUR-FUEL HVAC SoC threshold', + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.reg_captur_fuel_hvac_soc_threshold', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_last_hvac_activity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.reg_captur_fuel_last_hvac_activity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Last HVAC activity', + 'platform': 'renault', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hvac_last_activity', + 'unique_id': 'vf1capturfuelvin_hvac_last_activity', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_last_hvac_activity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'timestamp', + 'friendly_name': 'REG-CAPTUR-FUEL Last HVAC activity', + }), + 'context': , + 'entity_id': 'sensor.reg_captur_fuel_last_hvac_activity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_sensors[captur_fuel][sensor.reg_captur_fuel_last_location_activity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -1668,12 +1766,14 @@ 'state': '5567', }) # --- -# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_remote_engine_start-entry] +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_outside_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -1681,7 +1781,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.reg_captur_fuel_remote_engine_start', + 'entity_id': 'sensor.reg_captur_fuel_outside_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1690,78 +1790,36 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Remote engine start', + 'original_name': 'Outside temperature', 'platform': 'renault', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'res_state', - 'unique_id': 'vf1capturfuelvin_res_state', - 'unit_of_measurement': None, + 'translation_key': 'outside_temperature', + 'unique_id': 'vf1capturfuelvin_outside_temperature', + 'unit_of_measurement': , }) # --- -# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_remote_engine_start-state] +# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_outside_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-CAPTUR-FUEL Remote engine start', + 'device_class': 'temperature', + 'friendly_name': 'REG-CAPTUR-FUEL Outside temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.reg_captur_fuel_remote_engine_start', + 'entity_id': 'sensor.reg_captur_fuel_outside_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'Stopped, ready for RES', - }) -# --- -# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_remote_engine_start_code-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.reg_captur_fuel_remote_engine_start_code', - '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': 'Remote engine start code', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'res_state_code', - 'unique_id': 'vf1capturfuelvin_res_state_code', - 'unit_of_measurement': None, - }) -# --- -# name: test_sensors[captur_fuel][sensor.reg_captur_fuel_remote_engine_start_code-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-CAPTUR-FUEL Remote engine start code', - }), - 'context': , - 'entity_id': 'sensor.reg_captur_fuel_remote_engine_start_code', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '10', + 'state': 'unknown', }) # --- # name: test_sensors[captur_phev][sensor.reg_captur_phev_admissible_charging_power-entry] @@ -2279,6 +2337,55 @@ 'state': '3', }) # --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_hvac_soc_threshold-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.reg_captur_phev_hvac_soc_threshold', + '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': 'HVAC SoC threshold', + 'platform': 'renault', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hvac_soc_threshold', + 'unique_id': 'vf1capturphevvin_hvac_soc_threshold', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_hvac_soc_threshold-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'REG-CAPTUR_PHEV HVAC SoC threshold', + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.reg_captur_phev_hvac_soc_threshold', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_sensors[captur_phev][sensor.reg_captur_phev_last_battery_activity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2328,6 +2435,55 @@ 'state': '2020-01-12T21:40:16+00:00', }) # --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_last_hvac_activity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.reg_captur_phev_last_hvac_activity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Last HVAC activity', + 'platform': 'renault', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hvac_last_activity', + 'unique_id': 'vf1capturphevvin_hvac_last_activity', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_last_hvac_activity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'timestamp', + 'friendly_name': 'REG-CAPTUR_PHEV Last HVAC activity', + }), + 'context': , + 'entity_id': 'sensor.reg_captur_phev_last_hvac_activity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_sensors[captur_phev][sensor.reg_captur_phev_last_location_activity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2433,6 +2589,62 @@ 'state': '5567', }) # --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_outside_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.reg_captur_phev_outside_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Outside temperature', + 'platform': 'renault', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'outside_temperature', + 'unique_id': 'vf1capturphevvin_outside_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[captur_phev][sensor.reg_captur_phev_outside_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'REG-CAPTUR_PHEV Outside temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.reg_captur_phev_outside_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_sensors[captur_phev][sensor.reg_captur_phev_plug_state-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2497,102 +2709,6 @@ 'state': 'plugged', }) # --- -# name: test_sensors[captur_phev][sensor.reg_captur_phev_remote_engine_start-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.reg_captur_phev_remote_engine_start', - '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': 'Remote engine start', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'res_state', - 'unique_id': 'vf1capturphevvin_res_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_sensors[captur_phev][sensor.reg_captur_phev_remote_engine_start-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-CAPTUR_PHEV Remote engine start', - }), - 'context': , - 'entity_id': 'sensor.reg_captur_phev_remote_engine_start', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'Stopped, ready for RES', - }) -# --- -# name: test_sensors[captur_phev][sensor.reg_captur_phev_remote_engine_start_code-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.reg_captur_phev_remote_engine_start_code', - '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': 'Remote engine start code', - 'platform': 'renault', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'res_state_code', - 'unique_id': 'vf1capturphevvin_res_state_code', - 'unit_of_measurement': None, - }) -# --- -# name: test_sensors[captur_phev][sensor.reg_captur_phev_remote_engine_start_code-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'REG-CAPTUR_PHEV Remote engine start code', - }), - 'context': , - 'entity_id': 'sensor.reg_captur_phev_remote_engine_start_code', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '10', - }) -# --- # name: test_sensors[twingo_3_electric][sensor.reg_twingo_iii_admissible_charging_power-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/renault/test_select.py b/tests/components/renault/test_select.py index 73013999e7ab..cddb06913450 100644 --- a/tests/components/renault/test_select.py +++ b/tests/components/renault/test_select.py @@ -26,7 +26,10 @@ pytestmark = pytest.mark.usefixtures("patch_renault_account", "patch_get_vehicle # Captur (fuel version) does not have a charge mode select -_TEST_VEHICLES = [v for v in MOCK_VEHICLES if v != "captur_fuel"] +# charge mode is also not available for all vehicles +_TEST_VEHICLES = [ + v for v in MOCK_VEHICLES if v not in ("captur_fuel", "captur_phev", "zoe_50") +] @pytest.fixture(autouse=True) diff --git a/tests/components/renault/test_sensor.py b/tests/components/renault/test_sensor.py index e75d0558f190..fe2f63331e07 100644 --- a/tests/components/renault/test_sensor.py +++ b/tests/components/renault/test_sensor.py @@ -197,9 +197,9 @@ async def test_sensor_throttling_after_init( @pytest.mark.parametrize( ("vehicle_type", "vehicle_count", "scan_interval"), [ - ("zoe_50", 1, 300), # 5 coordinators => 5 minutes interval - ("captur_fuel", 1, 240), # 4 coordinators => 4 minutes interval - ("multi", 2, 480), # 8 coordinators => 8 minutes interval + ("zoe_50", 1, 240), # 4 coordinators => 4 minutes interval + ("captur_fuel", 1, 180), # 3 coordinators => 3 minutes interval + ("multi", 2, 420), # 7 coordinators => 8 minutes interval ], indirect=["vehicle_type"], ) @@ -236,7 +236,7 @@ async def test_dynamic_scan_interval( @pytest.mark.parametrize( ("vehicle_type", "vehicle_count", "scan_interval"), [ - ("zoe_50", 1, 240), # (6-2) coordinators => 4 minutes interval + ("zoe_50", 1, 180), # (6-1) coordinators => 3 minutes interval ("captur_fuel", 1, 180), # (4-1) coordinators => 3 minutes interval ("multi", 2, 360), # (8-2) coordinators => 6 minutes interval ],