From 802aa991a9676e1fa22078d3d4fcb575a164dfdc Mon Sep 17 00:00:00 2001 From: Richard Kroegel <42204099+rikroe@users.noreply.github.com> Date: Sun, 8 Mar 2026 01:00:03 +0100 Subject: [PATCH] Remove broken BMW & Mini integrations (#165075) --- .strict-typing | 1 - CODEOWNERS | 2 - .../bmw_connected_drive/__init__.py | 177 - .../bmw_connected_drive/binary_sensor.py | 254 - .../components/bmw_connected_drive/button.py | 127 - .../bmw_connected_drive/config_flow.py | 277 - .../components/bmw_connected_drive/const.py | 34 - .../bmw_connected_drive/coordinator.py | 113 - .../bmw_connected_drive/device_tracker.py | 86 - .../bmw_connected_drive/diagnostics.py | 100 - .../components/bmw_connected_drive/entity.py | 40 - .../components/bmw_connected_drive/icons.json | 102 - .../components/bmw_connected_drive/lock.py | 121 - .../bmw_connected_drive/manifest.json | 11 - .../components/bmw_connected_drive/notify.py | 113 - .../components/bmw_connected_drive/number.py | 118 - .../bmw_connected_drive/quality_scale.yaml | 107 - .../components/bmw_connected_drive/select.py | 132 - .../components/bmw_connected_drive/sensor.py | 250 - .../bmw_connected_drive/strings.json | 248 - .../components/bmw_connected_drive/switch.py | 133 - .../components/mini_connected/__init__.py | 1 - .../components/mini_connected/manifest.json | 6 - homeassistant/generated/config_flows.py | 1 - homeassistant/generated/integrations.json | 11 - mypy.ini | 10 - requirements_all.txt | 3 - requirements_test_all.txt | 3 - script/hassfest/quality_scale.py | 1 - .../bmw_connected_drive/__init__.py | 128 - .../bmw_connected_drive/conftest.py | 37 - .../snapshots/test_binary_sensor.ambr | 1541 --- .../snapshots/test_button.ambr | 932 -- .../snapshots/test_diagnostics.ambr | 9014 ----------------- .../snapshots/test_lock.ambr | 205 - .../snapshots/test_number.ambr | 119 - .../snapshots/test_select.ambr | 343 - .../snapshots/test_sensor.ambr | 3632 ------- .../snapshots/test_switch.ambr | 197 - .../bmw_connected_drive/test_binary_sensor.py | 34 - .../bmw_connected_drive/test_button.py | 210 - .../bmw_connected_drive/test_config_flow.py | 311 - .../bmw_connected_drive/test_coordinator.py | 244 - .../bmw_connected_drive/test_diagnostics.py | 92 - .../bmw_connected_drive/test_init.py | 261 - .../bmw_connected_drive/test_lock.py | 143 - .../bmw_connected_drive/test_notify.py | 154 - .../bmw_connected_drive/test_number.py | 164 - .../bmw_connected_drive/test_select.py | 199 - .../bmw_connected_drive/test_sensor.py | 149 - .../bmw_connected_drive/test_switch.py | 145 - 51 files changed, 20836 deletions(-) delete mode 100644 homeassistant/components/bmw_connected_drive/__init__.py delete mode 100644 homeassistant/components/bmw_connected_drive/binary_sensor.py delete mode 100644 homeassistant/components/bmw_connected_drive/button.py delete mode 100644 homeassistant/components/bmw_connected_drive/config_flow.py delete mode 100644 homeassistant/components/bmw_connected_drive/const.py delete mode 100644 homeassistant/components/bmw_connected_drive/coordinator.py delete mode 100644 homeassistant/components/bmw_connected_drive/device_tracker.py delete mode 100644 homeassistant/components/bmw_connected_drive/diagnostics.py delete mode 100644 homeassistant/components/bmw_connected_drive/entity.py delete mode 100644 homeassistant/components/bmw_connected_drive/icons.json delete mode 100644 homeassistant/components/bmw_connected_drive/lock.py delete mode 100644 homeassistant/components/bmw_connected_drive/manifest.json delete mode 100644 homeassistant/components/bmw_connected_drive/notify.py delete mode 100644 homeassistant/components/bmw_connected_drive/number.py delete mode 100644 homeassistant/components/bmw_connected_drive/quality_scale.yaml delete mode 100644 homeassistant/components/bmw_connected_drive/select.py delete mode 100644 homeassistant/components/bmw_connected_drive/sensor.py delete mode 100644 homeassistant/components/bmw_connected_drive/strings.json delete mode 100644 homeassistant/components/bmw_connected_drive/switch.py delete mode 100644 homeassistant/components/mini_connected/__init__.py delete mode 100644 homeassistant/components/mini_connected/manifest.json delete mode 100644 tests/components/bmw_connected_drive/__init__.py delete mode 100644 tests/components/bmw_connected_drive/conftest.py delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_binary_sensor.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_button.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_diagnostics.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_lock.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_number.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_select.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_sensor.ambr delete mode 100644 tests/components/bmw_connected_drive/snapshots/test_switch.ambr delete mode 100644 tests/components/bmw_connected_drive/test_binary_sensor.py delete mode 100644 tests/components/bmw_connected_drive/test_button.py delete mode 100644 tests/components/bmw_connected_drive/test_config_flow.py delete mode 100644 tests/components/bmw_connected_drive/test_coordinator.py delete mode 100644 tests/components/bmw_connected_drive/test_diagnostics.py delete mode 100644 tests/components/bmw_connected_drive/test_init.py delete mode 100644 tests/components/bmw_connected_drive/test_lock.py delete mode 100644 tests/components/bmw_connected_drive/test_notify.py delete mode 100644 tests/components/bmw_connected_drive/test_number.py delete mode 100644 tests/components/bmw_connected_drive/test_select.py delete mode 100644 tests/components/bmw_connected_drive/test_sensor.py delete mode 100644 tests/components/bmw_connected_drive/test_switch.py diff --git a/.strict-typing b/.strict-typing index ed9b74594fc..f2467024094 100644 --- a/.strict-typing +++ b/.strict-typing @@ -123,7 +123,6 @@ homeassistant.components.blueprint.* homeassistant.components.bluesound.* homeassistant.components.bluetooth.* homeassistant.components.bluetooth_adapters.* -homeassistant.components.bmw_connected_drive.* homeassistant.components.bond.* homeassistant.components.bosch_alarm.* homeassistant.components.braviatv.* diff --git a/CODEOWNERS b/CODEOWNERS index 39874c3b65e..2e92234a2e5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -234,8 +234,6 @@ build.json @home-assistant/supervisor /tests/components/bluetooth/ @bdraco /homeassistant/components/bluetooth_adapters/ @bdraco /tests/components/bluetooth_adapters/ @bdraco -/homeassistant/components/bmw_connected_drive/ @gerard33 @rikroe -/tests/components/bmw_connected_drive/ @gerard33 @rikroe /homeassistant/components/bond/ @bdraco @prystupa @joshs85 @marciogranzotto /tests/components/bond/ @bdraco @prystupa @joshs85 @marciogranzotto /homeassistant/components/bosch_alarm/ @mag1024 @sanjay900 diff --git a/homeassistant/components/bmw_connected_drive/__init__.py b/homeassistant/components/bmw_connected_drive/__init__.py deleted file mode 100644 index 287cb226b51..00000000000 --- a/homeassistant/components/bmw_connected_drive/__init__.py +++ /dev/null @@ -1,177 +0,0 @@ -"""Reads vehicle status from MyBMW portal.""" - -from __future__ import annotations - -import logging - -import voluptuous as vol - -from homeassistant.const import CONF_DEVICE_ID, CONF_ENTITY_ID, CONF_NAME, Platform -from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers import ( - config_validation as cv, - device_registry as dr, - discovery, - entity_registry as er, -) - -from .const import ATTR_VIN, CONF_READ_ONLY, DOMAIN -from .coordinator import BMWConfigEntry, BMWDataUpdateCoordinator - -_LOGGER = logging.getLogger(__name__) - - -SERVICE_SCHEMA = vol.Schema( - vol.Any( - {vol.Required(ATTR_VIN): cv.string}, - {vol.Required(CONF_DEVICE_ID): cv.string}, - ) -) - -DEFAULT_OPTIONS = { - CONF_READ_ONLY: False, -} - -PLATFORMS = [ - Platform.BINARY_SENSOR, - Platform.BUTTON, - Platform.DEVICE_TRACKER, - Platform.LOCK, - Platform.NOTIFY, - Platform.NUMBER, - Platform.SELECT, - Platform.SENSOR, - Platform.SWITCH, -] - -SERVICE_UPDATE_STATE = "update_state" - - -@callback -def _async_migrate_options_from_data_if_missing( - hass: HomeAssistant, entry: BMWConfigEntry -) -> None: - data = dict(entry.data) - options = dict(entry.options) - - if CONF_READ_ONLY in data or list(options) != list(DEFAULT_OPTIONS): - options = dict( - DEFAULT_OPTIONS, - **{k: v for k, v in options.items() if k in DEFAULT_OPTIONS}, - ) - options[CONF_READ_ONLY] = data.pop(CONF_READ_ONLY, False) - - hass.config_entries.async_update_entry(entry, data=data, options=options) - - -async def _async_migrate_entries( - hass: HomeAssistant, config_entry: BMWConfigEntry -) -> bool: - """Migrate old entry.""" - entity_registry = er.async_get(hass) - - @callback - def update_unique_id(entry: er.RegistryEntry) -> dict[str, str] | None: - replacements = { - Platform.SENSOR.value: { - "charging_level_hv": "fuel_and_battery.remaining_battery_percent", - "fuel_percent": "fuel_and_battery.remaining_fuel_percent", - "ac_current_limit": "charging_profile.ac_current_limit", - "charging_start_time": "fuel_and_battery.charging_start_time", - "charging_end_time": "fuel_and_battery.charging_end_time", - "charging_status": "fuel_and_battery.charging_status", - "charging_target": "fuel_and_battery.charging_target", - "remaining_battery_percent": "fuel_and_battery.remaining_battery_percent", - "remaining_range_total": "fuel_and_battery.remaining_range_total", - "remaining_range_electric": "fuel_and_battery.remaining_range_electric", - "remaining_range_fuel": "fuel_and_battery.remaining_range_fuel", - "remaining_fuel": "fuel_and_battery.remaining_fuel", - "remaining_fuel_percent": "fuel_and_battery.remaining_fuel_percent", - "activity": "climate.activity", - } - } - if (key := entry.unique_id.split("-")[-1]) in replacements.get( - entry.domain, [] - ): - new_unique_id = entry.unique_id.replace( - key, replacements[entry.domain][key] - ) - _LOGGER.debug( - "Migrating entity '%s' unique_id from '%s' to '%s'", - entry.entity_id, - entry.unique_id, - new_unique_id, - ) - if existing_entity_id := entity_registry.async_get_entity_id( - entry.domain, entry.platform, new_unique_id - ): - _LOGGER.debug( - "Cannot migrate to unique_id '%s', already exists for '%s'", - new_unique_id, - existing_entity_id, - ) - return None - return { - "new_unique_id": new_unique_id, - } - return None - - await er.async_migrate_entries(hass, config_entry.entry_id, update_unique_id) - - return True - - -async def async_setup_entry(hass: HomeAssistant, entry: BMWConfigEntry) -> bool: - """Set up BMW Connected Drive from a config entry.""" - - _async_migrate_options_from_data_if_missing(hass, entry) - - await _async_migrate_entries(hass, entry) - - # Set up one data coordinator per account/config entry - coordinator = BMWDataUpdateCoordinator( - hass, - config_entry=entry, - ) - await coordinator.async_config_entry_first_refresh() - - entry.runtime_data = coordinator - - # Set up all platforms except notify - await hass.config_entries.async_forward_entry_setups( - entry, [platform for platform in PLATFORMS if platform != Platform.NOTIFY] - ) - - # set up notify platform, no entry support for notify platform yet, - # have to use discovery to load platform. - hass.async_create_task( - discovery.async_load_platform( - hass, - Platform.NOTIFY, - DOMAIN, - {CONF_NAME: DOMAIN, CONF_ENTITY_ID: entry.entry_id}, - {}, - ) - ) - - # Clean up vehicles which are not assigned to the account anymore - account_vehicles = {(DOMAIN, v.vin) for v in coordinator.account.vehicles} - device_registry = dr.async_get(hass) - device_entries = dr.async_entries_for_config_entry( - device_registry, config_entry_id=entry.entry_id - ) - for device in device_entries: - if not device.identifiers.intersection(account_vehicles): - device_registry.async_update_device( - device.id, remove_config_entry_id=entry.entry_id - ) - - return True - - -async def async_unload_entry(hass: HomeAssistant, entry: BMWConfigEntry) -> bool: - """Unload a config entry.""" - - return await hass.config_entries.async_unload_platforms( - entry, [platform for platform in PLATFORMS if platform != Platform.NOTIFY] - ) diff --git a/homeassistant/components/bmw_connected_drive/binary_sensor.py b/homeassistant/components/bmw_connected_drive/binary_sensor.py deleted file mode 100644 index b96450c3b5a..00000000000 --- a/homeassistant/components/bmw_connected_drive/binary_sensor.py +++ /dev/null @@ -1,254 +0,0 @@ -"""Reads vehicle status from BMW MyBMW portal.""" - -from __future__ import annotations - -from collections.abc import Callable -from dataclasses import dataclass -import logging -from typing import Any - -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.doors_windows import LockState -from bimmer_connected.vehicle.fuel_and_battery import ChargingState -from bimmer_connected.vehicle.reports import ConditionBasedService - -from homeassistant.components.binary_sensor import ( - BinarySensorDeviceClass, - BinarySensorEntity, - BinarySensorEntityDescription, -) -from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback -from homeassistant.util.unit_system import UnitSystem - -from . import BMWConfigEntry -from .const import UNIT_MAP -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 0 - -_LOGGER = logging.getLogger(__name__) - - -ALLOWED_CONDITION_BASED_SERVICE_KEYS = { - "BRAKE_FLUID", - "BRAKE_PADS_FRONT", - "BRAKE_PADS_REAR", - "EMISSION_CHECK", - "ENGINE_OIL", - "OIL", - "TIRE_WEAR_FRONT", - "TIRE_WEAR_REAR", - "VEHICLE_CHECK", - "VEHICLE_TUV", -} -LOGGED_CONDITION_BASED_SERVICE_WARNINGS: set[str] = set() - -ALLOWED_CHECK_CONTROL_MESSAGE_KEYS = { - "ENGINE_OIL", - "TIRE_PRESSURE", - "WASHING_FLUID", -} -LOGGED_CHECK_CONTROL_MESSAGE_WARNINGS: set[str] = set() - - -def _condition_based_services( - vehicle: MyBMWVehicle, unit_system: UnitSystem -) -> dict[str, Any]: - extra_attributes = {} - for report in vehicle.condition_based_services.messages: - if ( - report.service_type not in ALLOWED_CONDITION_BASED_SERVICE_KEYS - and report.service_type not in LOGGED_CONDITION_BASED_SERVICE_WARNINGS - ): - _LOGGER.warning( - "'%s' not an allowed condition based service (%s)", - report.service_type, - report, - ) - LOGGED_CONDITION_BASED_SERVICE_WARNINGS.add(report.service_type) - continue - - extra_attributes.update(_format_cbs_report(report, unit_system)) - return extra_attributes - - -def _check_control_messages(vehicle: MyBMWVehicle) -> dict[str, Any]: - extra_attributes: dict[str, Any] = {} - for message in vehicle.check_control_messages.messages: - if ( - message.description_short not in ALLOWED_CHECK_CONTROL_MESSAGE_KEYS - and message.description_short not in LOGGED_CHECK_CONTROL_MESSAGE_WARNINGS - ): - _LOGGER.warning( - "'%s' not an allowed check control message (%s)", - message.description_short, - message, - ) - LOGGED_CHECK_CONTROL_MESSAGE_WARNINGS.add(message.description_short) - continue - - extra_attributes[message.description_short.lower()] = message.state.value - return extra_attributes - - -def _format_cbs_report( - report: ConditionBasedService, unit_system: UnitSystem -) -> dict[str, Any]: - result: dict[str, Any] = {} - service_type = report.service_type.lower() - result[service_type] = report.state.value - if report.due_date is not None: - result[f"{service_type}_date"] = report.due_date.strftime("%Y-%m-%d") - if report.due_distance.value and report.due_distance.unit: - distance = round( - unit_system.length( - report.due_distance.value, - UNIT_MAP.get(report.due_distance.unit, report.due_distance.unit), - ) - ) - result[f"{service_type}_distance"] = f"{distance} {unit_system.length_unit}" - return result - - -@dataclass(frozen=True, kw_only=True) -class BMWBinarySensorEntityDescription(BinarySensorEntityDescription): - """Describes BMW binary_sensor entity.""" - - value_fn: Callable[[MyBMWVehicle], bool] - attr_fn: Callable[[MyBMWVehicle, UnitSystem], dict[str, Any]] | None = None - is_available: Callable[[MyBMWVehicle], bool] = lambda v: v.is_lsc_enabled - - -SENSOR_TYPES: tuple[BMWBinarySensorEntityDescription, ...] = ( - BMWBinarySensorEntityDescription( - key="lids", - translation_key="lids", - device_class=BinarySensorDeviceClass.OPENING, - # device class opening: On means open, Off means closed - value_fn=lambda v: not v.doors_and_windows.all_lids_closed, - attr_fn=lambda v, u: { - lid.name: lid.state.value for lid in v.doors_and_windows.lids - }, - ), - BMWBinarySensorEntityDescription( - key="windows", - translation_key="windows", - device_class=BinarySensorDeviceClass.OPENING, - # device class opening: On means open, Off means closed - value_fn=lambda v: not v.doors_and_windows.all_windows_closed, - attr_fn=lambda v, u: { - window.name: window.state.value for window in v.doors_and_windows.windows - }, - ), - BMWBinarySensorEntityDescription( - key="door_lock_state", - translation_key="door_lock_state", - device_class=BinarySensorDeviceClass.LOCK, - # device class lock: On means unlocked, Off means locked - # Possible values: LOCKED, SECURED, SELECTIVE_LOCKED, UNLOCKED - value_fn=lambda v: ( - v.doors_and_windows.door_lock_state - not in {LockState.LOCKED, LockState.SECURED} - ), - attr_fn=lambda v, u: { - "door_lock_state": v.doors_and_windows.door_lock_state.value - }, - ), - BMWBinarySensorEntityDescription( - key="condition_based_services", - translation_key="condition_based_services", - device_class=BinarySensorDeviceClass.PROBLEM, - # device class problem: On means problem detected, Off means no problem - value_fn=lambda v: v.condition_based_services.is_service_required, - attr_fn=_condition_based_services, - ), - BMWBinarySensorEntityDescription( - key="check_control_messages", - translation_key="check_control_messages", - device_class=BinarySensorDeviceClass.PROBLEM, - # device class problem: On means problem detected, Off means no problem - value_fn=lambda v: v.check_control_messages.has_check_control_messages, - attr_fn=lambda v, u: _check_control_messages(v), - ), - # electric - BMWBinarySensorEntityDescription( - key="charging_status", - translation_key="charging_status", - device_class=BinarySensorDeviceClass.BATTERY_CHARGING, - # device class power: On means power detected, Off means no power - value_fn=lambda v: v.fuel_and_battery.charging_status == ChargingState.CHARGING, - is_available=lambda v: v.has_electric_drivetrain, - ), - BMWBinarySensorEntityDescription( - key="connection_status", - translation_key="connection_status", - device_class=BinarySensorDeviceClass.PLUG, - value_fn=lambda v: v.fuel_and_battery.is_charger_connected, - is_available=lambda v: v.has_electric_drivetrain, - ), - BMWBinarySensorEntityDescription( - key="is_pre_entry_climatization_enabled", - translation_key="is_pre_entry_climatization_enabled", - value_fn=lambda v: ( - v.charging_profile.is_pre_entry_climatization_enabled - if v.charging_profile - else False - ), - is_available=lambda v: v.has_electric_drivetrain, - ), -) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the BMW binary sensors from config entry.""" - coordinator = config_entry.runtime_data - - entities = [ - BMWBinarySensor(coordinator, vehicle, description, hass.config.units) - for vehicle in coordinator.account.vehicles - for description in SENSOR_TYPES - if description.is_available(vehicle) - ] - async_add_entities(entities) - - -class BMWBinarySensor(BMWBaseEntity, BinarySensorEntity): - """Representation of a BMW vehicle binary sensor.""" - - entity_description: BMWBinarySensorEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWBinarySensorEntityDescription, - unit_system: UnitSystem, - ) -> None: - """Initialize sensor.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._unit_system = unit_system - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - - @callback - def _handle_coordinator_update(self) -> None: - """Handle updated data from the coordinator.""" - _LOGGER.debug( - "Updating binary sensor '%s' of %s", - self.entity_description.key, - self.vehicle.name, - ) - self._attr_is_on = self.entity_description.value_fn(self.vehicle) - - if self.entity_description.attr_fn: - self._attr_extra_state_attributes = self.entity_description.attr_fn( - self.vehicle, self._unit_system - ) - - super()._handle_coordinator_update() diff --git a/homeassistant/components/bmw_connected_drive/button.py b/homeassistant/components/bmw_connected_drive/button.py deleted file mode 100644 index 250b54100dd..00000000000 --- a/homeassistant/components/bmw_connected_drive/button.py +++ /dev/null @@ -1,127 +0,0 @@ -"""Support for MyBMW button entities.""" - -from __future__ import annotations - -from collections.abc import Callable, Coroutine -from dataclasses import dataclass -import logging -from typing import TYPE_CHECKING, Any - -from bimmer_connected.models import MyBMWAPIError -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.remote_services import RemoteServiceStatus - -from homeassistant.components.button import ButtonEntity, ButtonEntityDescription -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import DOMAIN, BMWConfigEntry -from .entity import BMWBaseEntity - -if TYPE_CHECKING: - from .coordinator import BMWDataUpdateCoordinator - -PARALLEL_UPDATES = 1 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True, kw_only=True) -class BMWButtonEntityDescription(ButtonEntityDescription): - """Class describing BMW button entities.""" - - remote_function: Callable[[MyBMWVehicle], Coroutine[Any, Any, RemoteServiceStatus]] - enabled_when_read_only: bool = False - is_available: Callable[[MyBMWVehicle], bool] = lambda _: True - - -BUTTON_TYPES: tuple[BMWButtonEntityDescription, ...] = ( - BMWButtonEntityDescription( - key="light_flash", - translation_key="light_flash", - remote_function=lambda vehicle: ( - vehicle.remote_services.trigger_remote_light_flash() - ), - ), - BMWButtonEntityDescription( - key="sound_horn", - translation_key="sound_horn", - remote_function=lambda vehicle: vehicle.remote_services.trigger_remote_horn(), - ), - BMWButtonEntityDescription( - key="activate_air_conditioning", - translation_key="activate_air_conditioning", - remote_function=lambda vehicle: ( - vehicle.remote_services.trigger_remote_air_conditioning() - ), - ), - BMWButtonEntityDescription( - key="deactivate_air_conditioning", - translation_key="deactivate_air_conditioning", - remote_function=lambda vehicle: ( - vehicle.remote_services.trigger_remote_air_conditioning_stop() - ), - is_available=lambda vehicle: vehicle.is_remote_climate_stop_enabled, - ), - BMWButtonEntityDescription( - key="find_vehicle", - translation_key="find_vehicle", - remote_function=lambda vehicle: ( - vehicle.remote_services.trigger_remote_vehicle_finder() - ), - ), -) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the BMW buttons from config entry.""" - coordinator = config_entry.runtime_data - - entities: list[BMWButton] = [] - - for vehicle in coordinator.account.vehicles: - entities.extend( - [ - BMWButton(coordinator, vehicle, description) - for description in BUTTON_TYPES - if (not coordinator.read_only and description.is_available(vehicle)) - or (coordinator.read_only and description.enabled_when_read_only) - ] - ) - - async_add_entities(entities) - - -class BMWButton(BMWBaseEntity, ButtonEntity): - """Representation of a MyBMW button.""" - - entity_description: BMWButtonEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWButtonEntityDescription, - ) -> None: - """Initialize BMW vehicle sensor.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - - async def async_press(self) -> None: - """Press the button.""" - try: - await self.entity_description.remote_function(self.vehicle) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - - self.coordinator.async_update_listeners() diff --git a/homeassistant/components/bmw_connected_drive/config_flow.py b/homeassistant/components/bmw_connected_drive/config_flow.py deleted file mode 100644 index 5a067d23474..00000000000 --- a/homeassistant/components/bmw_connected_drive/config_flow.py +++ /dev/null @@ -1,277 +0,0 @@ -"""Config flow for BMW ConnectedDrive integration.""" - -from __future__ import annotations - -from collections.abc import Mapping -from typing import Any - -from bimmer_connected.api.authentication import MyBMWAuthentication -from bimmer_connected.api.regions import get_region_from_name -from bimmer_connected.models import ( - MyBMWAPIError, - MyBMWAuthError, - MyBMWCaptchaMissingError, -) -from httpx import RequestError -import voluptuous as vol - -from homeassistant.config_entries import ( - SOURCE_REAUTH, - SOURCE_RECONFIGURE, - ConfigFlow, - ConfigFlowResult, - OptionsFlow, -) -from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_SOURCE, CONF_USERNAME -from homeassistant.core import HomeAssistant, callback -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.selector import SelectSelector, SelectSelectorConfig -from homeassistant.util.ssl import get_default_context - -from . import DOMAIN -from .const import ( - CONF_ALLOWED_REGIONS, - CONF_CAPTCHA_REGIONS, - CONF_CAPTCHA_TOKEN, - CONF_CAPTCHA_URL, - CONF_GCID, - CONF_READ_ONLY, - CONF_REFRESH_TOKEN, -) -from .coordinator import BMWConfigEntry - -DATA_SCHEMA = vol.Schema( - { - vol.Required(CONF_USERNAME): str, - vol.Required(CONF_PASSWORD): str, - vol.Required(CONF_REGION): SelectSelector( - SelectSelectorConfig( - options=CONF_ALLOWED_REGIONS, - translation_key="regions", - ) - ), - }, - extra=vol.REMOVE_EXTRA, -) -RECONFIGURE_SCHEMA = vol.Schema( - { - vol.Required(CONF_PASSWORD): str, - }, - extra=vol.REMOVE_EXTRA, -) -CAPTCHA_SCHEMA = vol.Schema( - { - vol.Required(CONF_CAPTCHA_TOKEN): str, - }, - extra=vol.REMOVE_EXTRA, -) - - -async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, str]: - """Validate the user input allows us to connect. - - Data has the keys from DATA_SCHEMA with values provided by the user. - """ - auth = MyBMWAuthentication( - data[CONF_USERNAME], - data[CONF_PASSWORD], - get_region_from_name(data[CONF_REGION]), - hcaptcha_token=data.get(CONF_CAPTCHA_TOKEN), - verify=get_default_context(), - ) - - try: - await auth.login() - except MyBMWCaptchaMissingError as ex: - raise MissingCaptcha from ex - except MyBMWAuthError as ex: - raise InvalidAuth from ex - except (MyBMWAPIError, RequestError) as ex: - raise CannotConnect from ex - - # Return info that you want to store in the config entry. - retval = {"title": f"{data[CONF_USERNAME]}{data.get(CONF_SOURCE, '')}"} - if auth.refresh_token: - retval[CONF_REFRESH_TOKEN] = auth.refresh_token - if auth.gcid: - retval[CONF_GCID] = auth.gcid - return retval - - -class BMWConfigFlow(ConfigFlow, domain=DOMAIN): - """Handle a config flow for MyBMW.""" - - VERSION = 1 - - def __init__(self) -> None: - """Initialize the config flow.""" - self.data: dict[str, Any] = {} - self._existing_entry_data: dict[str, Any] = {} - - async def async_step_user( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle the initial step.""" - errors: dict[str, str] = self.data.pop("errors", {}) - - if user_input is not None and not errors: - unique_id = f"{user_input[CONF_REGION]}-{user_input[CONF_USERNAME]}" - await self.async_set_unique_id(unique_id) - - # Unique ID cannot change for reauth/reconfigure - if self.source not in {SOURCE_REAUTH, SOURCE_RECONFIGURE}: - self._abort_if_unique_id_configured() - - # Store user input for later use - self.data.update(user_input) - - # North America and Rest of World require captcha token - if ( - self.data.get(CONF_REGION) in CONF_CAPTCHA_REGIONS - and CONF_CAPTCHA_TOKEN not in self.data - ): - return await self.async_step_captcha() - - info = None - try: - info = await validate_input(self.hass, self.data) - except MissingCaptcha: - errors["base"] = "missing_captcha" - except CannotConnect: - errors["base"] = "cannot_connect" - except InvalidAuth: - errors["base"] = "invalid_auth" - finally: - self.data.pop(CONF_CAPTCHA_TOKEN, None) - - if info: - entry_data = { - **self.data, - CONF_REFRESH_TOKEN: info.get(CONF_REFRESH_TOKEN), - CONF_GCID: info.get(CONF_GCID), - } - - if self.source == SOURCE_REAUTH: - return self.async_update_reload_and_abort( - self._get_reauth_entry(), data=entry_data - ) - if self.source == SOURCE_RECONFIGURE: - return self.async_update_reload_and_abort( - self._get_reconfigure_entry(), - data=entry_data, - ) - return self.async_create_entry( - title=info["title"], - data=entry_data, - ) - - schema = self.add_suggested_values_to_schema( - DATA_SCHEMA, - self._existing_entry_data or self.data, - ) - - return self.async_show_form(step_id="user", data_schema=schema, errors=errors) - - async def async_step_change_password( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Show the change password step.""" - if user_input is not None: - return await self.async_step_user(self._existing_entry_data | user_input) - - return self.async_show_form( - step_id="change_password", - data_schema=RECONFIGURE_SCHEMA, - description_placeholders={ - CONF_USERNAME: self._existing_entry_data[CONF_USERNAME], - CONF_REGION: self._existing_entry_data[CONF_REGION], - }, - ) - - async def async_step_reauth( - self, entry_data: Mapping[str, Any] - ) -> ConfigFlowResult: - """Handle configuration by re-auth.""" - self._existing_entry_data = dict(entry_data) - return await self.async_step_change_password() - - async def async_step_reconfigure( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - self._existing_entry_data = dict(self._get_reconfigure_entry().data) - return await self.async_step_change_password() - - async def async_step_captcha( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Show captcha form.""" - if user_input and user_input.get(CONF_CAPTCHA_TOKEN): - self.data[CONF_CAPTCHA_TOKEN] = user_input[CONF_CAPTCHA_TOKEN].strip() - return await self.async_step_user(self.data) - - return self.async_show_form( - step_id="captcha", - data_schema=CAPTCHA_SCHEMA, - description_placeholders={ - "captcha_url": CONF_CAPTCHA_URL.format(region=self.data[CONF_REGION]) - }, - ) - - @staticmethod - @callback - def async_get_options_flow( - config_entry: BMWConfigEntry, - ) -> BMWOptionsFlow: - """Return a MyBMW option flow.""" - return BMWOptionsFlow() - - -class BMWOptionsFlow(OptionsFlow): - """Handle a option flow for MyBMW.""" - - async def async_step_init( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Manage the options.""" - return await self.async_step_account_options() - - async def async_step_account_options( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle the initial step.""" - if user_input is not None: - # Manually update & reload the config entry after options change. - # Required as each successful login will store the latest refresh_token - # using async_update_entry, which would otherwise trigger a full reload - # if the options would be refreshed using a listener. - changed = self.hass.config_entries.async_update_entry( - self.config_entry, - options=user_input, - ) - if changed: - await self.hass.config_entries.async_reload(self.config_entry.entry_id) - return self.async_create_entry(title="", data=user_input) - return self.async_show_form( - step_id="account_options", - data_schema=vol.Schema( - { - vol.Optional( - CONF_READ_ONLY, - default=self.config_entry.options.get(CONF_READ_ONLY, False), - ): bool, - } - ), - ) - - -class CannotConnect(HomeAssistantError): - """Error to indicate we cannot connect.""" - - -class InvalidAuth(HomeAssistantError): - """Error to indicate there is invalid auth.""" - - -class MissingCaptcha(HomeAssistantError): - """Error to indicate the captcha token is missing.""" diff --git a/homeassistant/components/bmw_connected_drive/const.py b/homeassistant/components/bmw_connected_drive/const.py deleted file mode 100644 index 750289e9d0a..00000000000 --- a/homeassistant/components/bmw_connected_drive/const.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Const file for the MyBMW integration.""" - -from homeassistant.const import UnitOfLength, UnitOfVolume - -DOMAIN = "bmw_connected_drive" - -ATTR_DIRECTION = "direction" -ATTR_VIN = "vin" - -CONF_ALLOWED_REGIONS = ["china", "north_america", "rest_of_world"] -CONF_CAPTCHA_REGIONS = ["north_america", "rest_of_world"] -CONF_READ_ONLY = "read_only" -CONF_ACCOUNT = "account" -CONF_REFRESH_TOKEN = "refresh_token" -CONF_GCID = "gcid" -CONF_CAPTCHA_TOKEN = "captcha_token" -CONF_CAPTCHA_URL = ( - "https://bimmer-connected.readthedocs.io/en/stable/captcha/{region}.html" -) - -DATA_HASS_CONFIG = "hass_config" - -UNIT_MAP = { - "KILOMETERS": UnitOfLength.KILOMETERS, - "MILES": UnitOfLength.MILES, - "LITERS": UnitOfVolume.LITERS, - "GALLONS": UnitOfVolume.GALLONS, -} - -SCAN_INTERVALS = { - "china": 300, - "north_america": 600, - "rest_of_world": 300, -} diff --git a/homeassistant/components/bmw_connected_drive/coordinator.py b/homeassistant/components/bmw_connected_drive/coordinator.py deleted file mode 100644 index 73e19ca7af5..00000000000 --- a/homeassistant/components/bmw_connected_drive/coordinator.py +++ /dev/null @@ -1,113 +0,0 @@ -"""Coordinator for BMW.""" - -from __future__ import annotations - -from datetime import timedelta -import logging - -from bimmer_connected.account import MyBMWAccount -from bimmer_connected.api.regions import get_region_from_name -from bimmer_connected.models import ( - GPSPosition, - MyBMWAPIError, - MyBMWAuthError, - MyBMWCaptchaMissingError, -) -from httpx import RequestError - -from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryAuthFailed -from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed -from homeassistant.util.ssl import get_default_context - -from .const import CONF_GCID, CONF_READ_ONLY, CONF_REFRESH_TOKEN, DOMAIN, SCAN_INTERVALS - -_LOGGER = logging.getLogger(__name__) - - -type BMWConfigEntry = ConfigEntry[BMWDataUpdateCoordinator] - - -class BMWDataUpdateCoordinator(DataUpdateCoordinator[None]): - """Class to manage fetching BMW data.""" - - account: MyBMWAccount - config_entry: BMWConfigEntry - - def __init__(self, hass: HomeAssistant, *, config_entry: BMWConfigEntry) -> None: - """Initialize account-wide BMW data updater.""" - self.account = MyBMWAccount( - config_entry.data[CONF_USERNAME], - config_entry.data[CONF_PASSWORD], - get_region_from_name(config_entry.data[CONF_REGION]), - observer_position=GPSPosition(hass.config.latitude, hass.config.longitude), - verify=get_default_context(), - ) - self.read_only: bool = config_entry.options[CONF_READ_ONLY] - - if CONF_REFRESH_TOKEN in config_entry.data: - self.account.set_refresh_token( - refresh_token=config_entry.data[CONF_REFRESH_TOKEN], - gcid=config_entry.data.get(CONF_GCID), - ) - - super().__init__( - hass, - _LOGGER, - config_entry=config_entry, - name=f"{DOMAIN}-{config_entry.data[CONF_USERNAME]}", - update_interval=timedelta( - seconds=SCAN_INTERVALS[config_entry.data[CONF_REGION]] - ), - ) - - # Default to false on init so _async_update_data logic works - self.last_update_success = False - - async def _async_update_data(self) -> None: - """Fetch data from BMW.""" - old_refresh_token = self.account.refresh_token - - try: - await self.account.get_vehicles() - except MyBMWCaptchaMissingError as err: - # If a captcha is required (user/password login flow), always trigger the reauth flow - raise ConfigEntryAuthFailed( - translation_domain=DOMAIN, - translation_key="missing_captcha", - ) from err - except MyBMWAuthError as err: - # Allow one retry interval before raising AuthFailed to avoid flaky API issues - if self.last_update_success: - raise UpdateFailed( - translation_domain=DOMAIN, - translation_key="update_failed", - translation_placeholders={"exception": str(err)}, - ) from err - # Clear refresh token and trigger reauth if previous update failed as well - self._update_config_entry_refresh_token(None) - raise ConfigEntryAuthFailed( - translation_domain=DOMAIN, - translation_key="invalid_auth", - ) from err - except (MyBMWAPIError, RequestError) as err: - raise UpdateFailed( - translation_domain=DOMAIN, - translation_key="update_failed", - translation_placeholders={"exception": str(err)}, - ) from err - - if self.account.refresh_token != old_refresh_token: - self._update_config_entry_refresh_token(self.account.refresh_token) - - def _update_config_entry_refresh_token(self, refresh_token: str | None) -> None: - """Update or delete the refresh_token in the Config Entry.""" - data = { - **self.config_entry.data, - CONF_REFRESH_TOKEN: refresh_token, - } - if not refresh_token: - data.pop(CONF_REFRESH_TOKEN) - self.hass.config_entries.async_update_entry(self.config_entry, data=data) diff --git a/homeassistant/components/bmw_connected_drive/device_tracker.py b/homeassistant/components/bmw_connected_drive/device_tracker.py deleted file mode 100644 index 23273cc8ba9..00000000000 --- a/homeassistant/components/bmw_connected_drive/device_tracker.py +++ /dev/null @@ -1,86 +0,0 @@ -"""Device tracker for MyBMW vehicles.""" - -from __future__ import annotations - -import logging -from typing import Any - -from bimmer_connected.vehicle import MyBMWVehicle - -from homeassistant.components.device_tracker import TrackerEntity -from homeassistant.core import HomeAssistant -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import BMWConfigEntry -from .const import ATTR_DIRECTION -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 0 - -_LOGGER = logging.getLogger(__name__) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW tracker from config entry.""" - coordinator = config_entry.runtime_data - entities: list[BMWDeviceTracker] = [] - - for vehicle in coordinator.account.vehicles: - entities.append(BMWDeviceTracker(coordinator, vehicle)) - if not vehicle.is_vehicle_tracking_enabled: - _LOGGER.info( - ( - "Tracking is (currently) disabled for vehicle %s (%s), defaulting" - " to unknown" - ), - vehicle.name, - vehicle.vin, - ) - async_add_entities(entities) - - -class BMWDeviceTracker(BMWBaseEntity, TrackerEntity): - """MyBMW device tracker.""" - - _attr_force_update = False - _attr_translation_key = "car" - _attr_name = None - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - ) -> None: - """Initialize the Tracker.""" - super().__init__(coordinator, vehicle) - self._attr_unique_id = vehicle.vin - - @property - def extra_state_attributes(self) -> dict[str, Any]: - """Return entity specific state attributes.""" - return {ATTR_DIRECTION: self.vehicle.vehicle_location.heading} - - @property - def latitude(self) -> float | None: - """Return latitude value of the device.""" - return ( - self.vehicle.vehicle_location.location[0] - if self.vehicle.is_vehicle_tracking_enabled - and self.vehicle.vehicle_location.location - else None - ) - - @property - def longitude(self) -> float | None: - """Return longitude value of the device.""" - return ( - self.vehicle.vehicle_location.location[1] - if self.vehicle.is_vehicle_tracking_enabled - and self.vehicle.vehicle_location.location - else None - ) diff --git a/homeassistant/components/bmw_connected_drive/diagnostics.py b/homeassistant/components/bmw_connected_drive/diagnostics.py deleted file mode 100644 index 3f357c3ae79..00000000000 --- a/homeassistant/components/bmw_connected_drive/diagnostics.py +++ /dev/null @@ -1,100 +0,0 @@ -"""Diagnostics support for the BMW Connected Drive integration.""" - -from __future__ import annotations - -from dataclasses import asdict -import json -from typing import TYPE_CHECKING, Any - -from bimmer_connected.utils import MyBMWJSONEncoder - -from homeassistant.components.diagnostics import async_redact_data -from homeassistant.const import CONF_PASSWORD, CONF_USERNAME -from homeassistant.core import HomeAssistant -from homeassistant.helpers.device_registry import DeviceEntry - -from . import BMWConfigEntry -from .const import CONF_REFRESH_TOKEN - -PARALLEL_UPDATES = 1 - -if TYPE_CHECKING: - from bimmer_connected.vehicle import MyBMWVehicle - - -TO_REDACT_INFO = [CONF_USERNAME, CONF_PASSWORD, CONF_REFRESH_TOKEN] -TO_REDACT_DATA = [ - "lat", - "latitude", - "lon", - "longitude", - "heading", - "vin", - "licensePlate", - "city", - "street", - "streetNumber", - "postalCode", - "phone", - "formatted", - "subtitle", -] - - -def vehicle_to_dict(vehicle: MyBMWVehicle | None) -> dict: - """Convert a MyBMWVehicle to a dictionary using MyBMWJSONEncoder.""" - retval: dict = json.loads(json.dumps(vehicle, cls=MyBMWJSONEncoder)) - return retval - - -async def async_get_config_entry_diagnostics( - hass: HomeAssistant, config_entry: BMWConfigEntry -) -> dict[str, Any]: - """Return diagnostics for a config entry.""" - coordinator = config_entry.runtime_data - - coordinator.account.config.log_responses = True - await coordinator.account.get_vehicles(force_init=True) - - diagnostics_data = { - "info": async_redact_data(config_entry.data, TO_REDACT_INFO), - "data": [ - async_redact_data(vehicle_to_dict(vehicle), TO_REDACT_DATA) - for vehicle in coordinator.account.vehicles - ], - "fingerprint": async_redact_data( - [asdict(r) for r in coordinator.account.get_stored_responses()], - TO_REDACT_DATA, - ), - } - - coordinator.account.config.log_responses = False - - return diagnostics_data - - -async def async_get_device_diagnostics( - hass: HomeAssistant, config_entry: BMWConfigEntry, device: DeviceEntry -) -> dict[str, Any]: - """Return diagnostics for a device.""" - coordinator = config_entry.runtime_data - - coordinator.account.config.log_responses = True - await coordinator.account.get_vehicles(force_init=True) - - vin = next(iter(device.identifiers))[1] - vehicle = coordinator.account.get_vehicle(vin) - - diagnostics_data = { - "info": async_redact_data(config_entry.data, TO_REDACT_INFO), - "data": async_redact_data(vehicle_to_dict(vehicle), TO_REDACT_DATA), - # Always have to get the full fingerprint as the VIN is redacted beforehand by the library - "fingerprint": async_redact_data( - [asdict(r) for r in coordinator.account.get_stored_responses()], - TO_REDACT_DATA, - ), - } - - coordinator.account.config.log_responses = False - - return diagnostics_data diff --git a/homeassistant/components/bmw_connected_drive/entity.py b/homeassistant/components/bmw_connected_drive/entity.py deleted file mode 100644 index 806312170eb..00000000000 --- a/homeassistant/components/bmw_connected_drive/entity.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Base for all BMW entities.""" - -from __future__ import annotations - -from bimmer_connected.vehicle import MyBMWVehicle - -from homeassistant.helpers.device_registry import DeviceInfo -from homeassistant.helpers.update_coordinator import CoordinatorEntity - -from .const import DOMAIN -from .coordinator import BMWDataUpdateCoordinator - - -class BMWBaseEntity(CoordinatorEntity[BMWDataUpdateCoordinator]): - """Common base for BMW entities.""" - - _attr_has_entity_name = True - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - ) -> None: - """Initialize entity.""" - super().__init__(coordinator) - - self.vehicle = vehicle - - self._attr_device_info = DeviceInfo( - identifiers={(DOMAIN, vehicle.vin)}, - manufacturer=vehicle.brand.name, - model=vehicle.name, - name=vehicle.name, - serial_number=vehicle.vin, - ) - - async def async_added_to_hass(self) -> None: - """When entity is added to hass.""" - await super().async_added_to_hass() - self._handle_coordinator_update() diff --git a/homeassistant/components/bmw_connected_drive/icons.json b/homeassistant/components/bmw_connected_drive/icons.json deleted file mode 100644 index 8d3c1e03294..00000000000 --- a/homeassistant/components/bmw_connected_drive/icons.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "entity": { - "binary_sensor": { - "charging_status": { - "default": "mdi:ev-station" - }, - "check_control_messages": { - "default": "mdi:car-tire-alert" - }, - "condition_based_services": { - "default": "mdi:wrench" - }, - "connection_status": { - "default": "mdi:car-electric" - }, - "door_lock_state": { - "default": "mdi:car-key" - }, - "is_pre_entry_climatization_enabled": { - "default": "mdi:car-seat-heater" - }, - "lids": { - "default": "mdi:car-door-lock" - }, - "windows": { - "default": "mdi:car-door" - } - }, - "button": { - "activate_air_conditioning": { - "default": "mdi:hvac" - }, - "deactivate_air_conditioning": { - "default": "mdi:hvac-off" - }, - "find_vehicle": { - "default": "mdi:crosshairs-question" - }, - "light_flash": { - "default": "mdi:car-light-alert" - }, - "sound_horn": { - "default": "mdi:bullhorn" - } - }, - "device_tracker": { - "car": { - "default": "mdi:car" - } - }, - "number": { - "target_soc": { - "default": "mdi:battery-charging-medium" - } - }, - "select": { - "ac_limit": { - "default": "mdi:current-ac" - }, - "charging_mode": { - "default": "mdi:vector-point-select" - } - }, - "sensor": { - "charging_status": { - "default": "mdi:ev-station" - }, - "charging_target": { - "default": "mdi:battery-charging-high" - }, - "climate_status": { - "default": "mdi:fan" - }, - "mileage": { - "default": "mdi:speedometer" - }, - "remaining_fuel": { - "default": "mdi:gas-station" - }, - "remaining_fuel_percent": { - "default": "mdi:gas-station" - }, - "remaining_range_electric": { - "default": "mdi:map-marker-distance" - }, - "remaining_range_fuel": { - "default": "mdi:map-marker-distance" - }, - "remaining_range_total": { - "default": "mdi:map-marker-distance" - } - }, - "switch": { - "charging": { - "default": "mdi:ev-station" - }, - "climate": { - "default": "mdi:fan" - } - } - } -} diff --git a/homeassistant/components/bmw_connected_drive/lock.py b/homeassistant/components/bmw_connected_drive/lock.py deleted file mode 100644 index 149647a3397..00000000000 --- a/homeassistant/components/bmw_connected_drive/lock.py +++ /dev/null @@ -1,121 +0,0 @@ -"""Support for BMW car locks with BMW ConnectedDrive.""" - -from __future__ import annotations - -import logging -from typing import Any - -from bimmer_connected.models import MyBMWAPIError -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.doors_windows import LockState - -from homeassistant.components.lock import LockEntity -from homeassistant.core import HomeAssistant, callback -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import DOMAIN, BMWConfigEntry -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 1 - -DOOR_LOCK_STATE = "door_lock_state" - -_LOGGER = logging.getLogger(__name__) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW lock from config entry.""" - coordinator = config_entry.runtime_data - - if not coordinator.read_only: - async_add_entities( - BMWLock(coordinator, vehicle) for vehicle in coordinator.account.vehicles - ) - - -class BMWLock(BMWBaseEntity, LockEntity): - """Representation of a MyBMW vehicle lock.""" - - _attr_translation_key = "lock" - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - ) -> None: - """Initialize the lock.""" - super().__init__(coordinator, vehicle) - - self._attr_unique_id = f"{vehicle.vin}-lock" - self.door_lock_state_available = vehicle.is_lsc_enabled - - async def async_lock(self, **kwargs: Any) -> None: - """Lock the car.""" - _LOGGER.debug("%s: locking doors", self.vehicle.name) - # Only update the HA state machine if the vehicle reliably reports its lock state - if self.door_lock_state_available: - # Optimistic state set here because it takes some time before the - # update callback response - self._attr_is_locked = True - self.async_write_ha_state() - try: - await self.vehicle.remote_services.trigger_remote_door_lock() - except MyBMWAPIError as ex: - # Set the state to unknown if the command fails - self._attr_is_locked = None - self.async_write_ha_state() - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - finally: - # Always update the listeners to get the latest state - self.coordinator.async_update_listeners() - - async def async_unlock(self, **kwargs: Any) -> None: - """Unlock the car.""" - _LOGGER.debug("%s: unlocking doors", self.vehicle.name) - # Only update the HA state machine if the vehicle reliably reports its lock state - if self.door_lock_state_available: - # Optimistic state set here because it takes some time before the - # update callback response - self._attr_is_locked = False - self.async_write_ha_state() - try: - await self.vehicle.remote_services.trigger_remote_door_unlock() - except MyBMWAPIError as ex: - # Set the state to unknown if the command fails - self._attr_is_locked = None - self.async_write_ha_state() - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - finally: - # Always update the listeners to get the latest state - self.coordinator.async_update_listeners() - - @callback - def _handle_coordinator_update(self) -> None: - """Handle updated data from the coordinator.""" - _LOGGER.debug("Updating lock data of %s", self.vehicle.name) - - # Only update the HA state machine if the vehicle reliably reports its lock state - if self.door_lock_state_available: - self._attr_is_locked = self.vehicle.doors_and_windows.door_lock_state in { - LockState.LOCKED, - LockState.SECURED, - } - self._attr_extra_state_attributes = { - DOOR_LOCK_STATE: self.vehicle.doors_and_windows.door_lock_state.value - } - - super()._handle_coordinator_update() diff --git a/homeassistant/components/bmw_connected_drive/manifest.json b/homeassistant/components/bmw_connected_drive/manifest.json deleted file mode 100644 index e23c710b869..00000000000 --- a/homeassistant/components/bmw_connected_drive/manifest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "domain": "bmw_connected_drive", - "name": "BMW Connected Drive", - "codeowners": ["@gerard33", "@rikroe"], - "config_flow": true, - "documentation": "https://www.home-assistant.io/integrations/bmw_connected_drive", - "integration_type": "hub", - "iot_class": "cloud_polling", - "loggers": ["bimmer_connected"], - "requirements": ["bimmer-connected[china]==0.17.3"] -} diff --git a/homeassistant/components/bmw_connected_drive/notify.py b/homeassistant/components/bmw_connected_drive/notify.py deleted file mode 100644 index 2a94cf42853..00000000000 --- a/homeassistant/components/bmw_connected_drive/notify.py +++ /dev/null @@ -1,113 +0,0 @@ -"""Support for BMW notifications.""" - -from __future__ import annotations - -import logging -from typing import Any, cast - -from bimmer_connected.models import MyBMWAPIError, PointOfInterest -from bimmer_connected.vehicle import MyBMWVehicle -import voluptuous as vol - -from homeassistant.components.notify import ( - ATTR_DATA, - ATTR_TARGET, - BaseNotificationService, -) -from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE, CONF_ENTITY_ID -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError, ServiceValidationError -from homeassistant.helpers import config_validation as cv -from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType - -from . import DOMAIN, BMWConfigEntry - -PARALLEL_UPDATES = 1 - -ATTR_LOCATION_ATTRIBUTES = ["street", "city", "postal_code", "country"] - -POI_SCHEMA = vol.Schema( - { - vol.Required(ATTR_LATITUDE): cv.latitude, - vol.Required(ATTR_LONGITUDE): cv.longitude, - vol.Optional("street"): cv.string, - vol.Optional("city"): cv.string, - vol.Optional("postal_code"): cv.string, - vol.Optional("country"): cv.string, - } -) - -_LOGGER = logging.getLogger(__name__) - - -def get_service( - hass: HomeAssistant, - config: ConfigType, - discovery_info: DiscoveryInfoType | None = None, -) -> BMWNotificationService: - """Get the BMW notification service.""" - config_entry: BMWConfigEntry | None = hass.config_entries.async_get_entry( - (discovery_info or {})[CONF_ENTITY_ID] - ) - - targets = {} - if ( - config_entry - and (coordinator := config_entry.runtime_data) - and not coordinator.read_only - ): - targets.update({v.name: v for v in coordinator.account.vehicles}) - return BMWNotificationService(targets) - - -class BMWNotificationService(BaseNotificationService): - """Send Notifications to BMW.""" - - vehicle_targets: dict[str, MyBMWVehicle] - - def __init__(self, targets: dict[str, MyBMWVehicle]) -> None: - """Set up the notification service.""" - self.vehicle_targets = targets - - @property - def targets(self) -> dict[str, Any] | None: - """Return a dictionary of registered targets.""" - return self.vehicle_targets - - async def async_send_message(self, message: str = "", **kwargs: Any) -> None: - """Send a message or POI to the car.""" - - try: - # Verify data schema - poi_data = kwargs.get(ATTR_DATA) or {} - POI_SCHEMA(poi_data) - - # Create the POI object - poi = PointOfInterest( - lat=poi_data.pop(ATTR_LATITUDE), - lon=poi_data.pop(ATTR_LONGITUDE), - name=(message or None), - **poi_data, - ) - - except (vol.Invalid, TypeError, ValueError) as ex: - raise ServiceValidationError( - translation_domain=DOMAIN, - translation_key="invalid_poi", - translation_placeholders={ - "poi_exception": str(ex), - }, - ) from ex - - for vehicle in kwargs[ATTR_TARGET]: - vehicle = cast(MyBMWVehicle, vehicle) - _LOGGER.debug("Sending message to %s", vehicle.name) - - try: - await vehicle.remote_services.trigger_send_poi(poi) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex diff --git a/homeassistant/components/bmw_connected_drive/number.py b/homeassistant/components/bmw_connected_drive/number.py deleted file mode 100644 index a30775caf60..00000000000 --- a/homeassistant/components/bmw_connected_drive/number.py +++ /dev/null @@ -1,118 +0,0 @@ -"""Number platform for BMW.""" - -from collections.abc import Callable, Coroutine -from dataclasses import dataclass -import logging -from typing import Any - -from bimmer_connected.models import MyBMWAPIError -from bimmer_connected.vehicle import MyBMWVehicle - -from homeassistant.components.number import ( - NumberDeviceClass, - NumberEntity, - NumberEntityDescription, - NumberMode, -) -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import DOMAIN, BMWConfigEntry -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 1 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True, kw_only=True) -class BMWNumberEntityDescription(NumberEntityDescription): - """Describes BMW number entity.""" - - value_fn: Callable[[MyBMWVehicle], float | int | None] - remote_service: Callable[[MyBMWVehicle, float | int], Coroutine[Any, Any, Any]] - is_available: Callable[[MyBMWVehicle], bool] = lambda _: False - dynamic_options: Callable[[MyBMWVehicle], list[str]] | None = None - - -NUMBER_TYPES: list[BMWNumberEntityDescription] = [ - BMWNumberEntityDescription( - key="target_soc", - translation_key="target_soc", - device_class=NumberDeviceClass.BATTERY, - is_available=lambda v: v.is_remote_set_target_soc_enabled, - native_max_value=100.0, - native_min_value=20.0, - native_step=5.0, - mode=NumberMode.SLIDER, - value_fn=lambda v: v.fuel_and_battery.charging_target, - remote_service=lambda v, o: v.remote_services.trigger_charging_settings_update( - target_soc=int(o) - ), - ), -] - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW number from config entry.""" - coordinator = config_entry.runtime_data - - entities: list[BMWNumber] = [] - - for vehicle in coordinator.account.vehicles: - if not coordinator.read_only: - entities.extend( - [ - BMWNumber(coordinator, vehicle, description) - for description in NUMBER_TYPES - if description.is_available(vehicle) - ] - ) - async_add_entities(entities) - - -class BMWNumber(BMWBaseEntity, NumberEntity): - """Representation of BMW Number entity.""" - - entity_description: BMWNumberEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWNumberEntityDescription, - ) -> None: - """Initialize an BMW Number.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - - @property - def native_value(self) -> float | None: - """Return the entity value to represent the entity state.""" - return self.entity_description.value_fn(self.vehicle) - - async def async_set_native_value(self, value: float) -> None: - """Update to the vehicle.""" - _LOGGER.debug( - "Executing '%s' on vehicle '%s' to value '%s'", - self.entity_description.key, - self.vehicle.vin, - value, - ) - try: - await self.entity_description.remote_service(self.vehicle, value) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - - self.coordinator.async_update_listeners() diff --git a/homeassistant/components/bmw_connected_drive/quality_scale.yaml b/homeassistant/components/bmw_connected_drive/quality_scale.yaml deleted file mode 100644 index bc3bd517662..00000000000 --- a/homeassistant/components/bmw_connected_drive/quality_scale.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# + in comment indicates requirement for quality scale -# - in comment indicates issue to be fixed, not impacting quality scale -rules: - # Bronze - action-setup: - status: exempt - comment: | - Does not have custom services - appropriate-polling: done - brands: done - common-modules: - status: done - comment: | - - 2 states writes in async_added_to_hass() required for platforms that redefine _handle_coordinator_update() - config-flow-test-coverage: - status: todo - comment: | - - test_show_form doesn't really add anything - - Patch bimmer_connected imports with homeassistant.components.bmw_connected_drive.bimmer_connected imports - + Ensure that configs flows end in CREATE_ENTRY or ABORT - - Parameterize test_authentication_error, test_api_error and test_connection_error - + test_full_user_flow_implementation doesn't assert unique id of created entry - + test that aborts when a mocked config entry already exists - + don't test on internals (e.g. `coordinator.last_update_success`) but rather on the resulting state (change) - config-flow: done - dependency-transparency: done - docs-actions: - status: exempt - comment: | - Does not have custom services - docs-high-level-description: done - docs-installation-instructions: done - docs-removal-instructions: done - entity-event-setup: - status: exempt - comment: | - This integration doesn't have any events. - entity-unique-id: done - has-entity-name: done - runtime-data: done - test-before-configure: done - test-before-setup: done - unique-config-entry: done - - # Silver - action-exceptions: - status: exempt - comment: | - Does not have custom services - config-entry-unloading: done - docs-configuration-parameters: done - docs-installation-parameters: done - entity-unavailable: done - integration-owner: done - log-when-unavailable: done - parallel-updates: done - reauthentication-flow: done - test-coverage: - status: done - comment: | - - Use constants in tests where possible - - # Gold - devices: done - diagnostics: done - discovery-update-info: - status: exempt - comment: This integration doesn't use discovery. - discovery: - status: exempt - comment: This integration doesn't use discovery. - docs-data-update: done - docs-examples: todo - docs-known-limitations: done - docs-supported-devices: done - docs-supported-functions: done - docs-troubleshooting: done - docs-use-cases: todo - dynamic-devices: - status: todo - comment: > - To be discussed. - We cannot regularly get new devices/vehicles due to API quota limitations. - entity-category: done - entity-device-class: done - entity-disabled-by-default: done - entity-translations: done - exception-translations: done - icon-translations: done - reconfiguration-flow: done - repair-issues: - status: exempt - comment: | - Other than reauthentication, this integration doesn't have any cases where raising an issue is needed. - stale-devices: - status: todo - comment: > - To be discussed. - We cannot regularly check for stale devices/vehicles due to API quota limitations. - # Platinum - async-dependency: done - inject-websession: - status: todo - comment: > - To be discussed. - The library requires a custom client for API authentication, with custom auth lifecycle and user agents. - strict-typing: done diff --git a/homeassistant/components/bmw_connected_drive/select.py b/homeassistant/components/bmw_connected_drive/select.py deleted file mode 100644 index 81e01b2bfad..00000000000 --- a/homeassistant/components/bmw_connected_drive/select.py +++ /dev/null @@ -1,132 +0,0 @@ -"""Select platform for BMW.""" - -from collections.abc import Callable, Coroutine -from dataclasses import dataclass -import logging -from typing import Any - -from bimmer_connected.models import MyBMWAPIError -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.charging_profile import ChargingMode - -from homeassistant.components.select import SelectEntity, SelectEntityDescription -from homeassistant.const import UnitOfElectricCurrent -from homeassistant.core import HomeAssistant, callback -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import DOMAIN, BMWConfigEntry -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 1 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True, kw_only=True) -class BMWSelectEntityDescription(SelectEntityDescription): - """Describes BMW sensor entity.""" - - current_option: Callable[[MyBMWVehicle], str] - remote_service: Callable[[MyBMWVehicle, str], Coroutine[Any, Any, Any]] - is_available: Callable[[MyBMWVehicle], bool] = lambda _: False - dynamic_options: Callable[[MyBMWVehicle], list[str]] | None = None - - -SELECT_TYPES: tuple[BMWSelectEntityDescription, ...] = ( - BMWSelectEntityDescription( - key="ac_limit", - translation_key="ac_limit", - is_available=lambda v: v.is_remote_set_ac_limit_enabled, - dynamic_options=lambda v: [ - str(lim) - for lim in v.charging_profile.ac_available_limits # type: ignore[union-attr] - ], - current_option=lambda v: str(v.charging_profile.ac_current_limit), # type: ignore[union-attr] - remote_service=lambda v, o: v.remote_services.trigger_charging_settings_update( - ac_limit=int(o) - ), - unit_of_measurement=UnitOfElectricCurrent.AMPERE, - ), - BMWSelectEntityDescription( - key="charging_mode", - translation_key="charging_mode", - is_available=lambda v: v.is_charging_plan_supported, - options=[c.value.lower() for c in ChargingMode if c != ChargingMode.UNKNOWN], - current_option=lambda v: v.charging_profile.charging_mode.value.lower(), # type: ignore[union-attr] - remote_service=lambda v, o: v.remote_services.trigger_charging_profile_update( - charging_mode=ChargingMode(o) - ), - ), -) - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW lock from config entry.""" - coordinator = config_entry.runtime_data - - entities: list[BMWSelect] = [] - - for vehicle in coordinator.account.vehicles: - if not coordinator.read_only: - entities.extend( - [ - BMWSelect(coordinator, vehicle, description) - for description in SELECT_TYPES - if description.is_available(vehicle) - ] - ) - async_add_entities(entities) - - -class BMWSelect(BMWBaseEntity, SelectEntity): - """Representation of BMW select entity.""" - - entity_description: BMWSelectEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWSelectEntityDescription, - ) -> None: - """Initialize an BMW select.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - if description.dynamic_options: - self._attr_options = description.dynamic_options(vehicle) - self._attr_current_option = description.current_option(vehicle) - - @callback - def _handle_coordinator_update(self) -> None: - """Handle updated data from the coordinator.""" - _LOGGER.debug( - "Updating select '%s' of %s", self.entity_description.key, self.vehicle.name - ) - self._attr_current_option = self.entity_description.current_option(self.vehicle) - super()._handle_coordinator_update() - - async def async_select_option(self, option: str) -> None: - """Update to the vehicle.""" - _LOGGER.debug( - "Executing '%s' on vehicle '%s' to value '%s'", - self.entity_description.key, - self.vehicle.vin, - option, - ) - try: - await self.entity_description.remote_service(self.vehicle, option) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - - self.coordinator.async_update_listeners() diff --git a/homeassistant/components/bmw_connected_drive/sensor.py b/homeassistant/components/bmw_connected_drive/sensor.py deleted file mode 100644 index 114412ef9f2..00000000000 --- a/homeassistant/components/bmw_connected_drive/sensor.py +++ /dev/null @@ -1,250 +0,0 @@ -"""Support for reading vehicle status from MyBMW portal.""" - -from __future__ import annotations - -from collections.abc import Callable -from dataclasses import dataclass -import datetime -import logging - -from bimmer_connected.models import StrEnum, ValueWithUnit -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.climate import ClimateActivityState -from bimmer_connected.vehicle.fuel_and_battery import ChargingState - -from homeassistant.components.sensor import ( - SensorDeviceClass, - SensorEntity, - SensorEntityDescription, - SensorStateClass, -) -from homeassistant.const import ( - PERCENTAGE, - STATE_UNKNOWN, - UnitOfElectricCurrent, - UnitOfLength, - UnitOfPressure, - UnitOfVolume, -) -from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback -from homeassistant.util import dt as dt_util - -from . import BMWConfigEntry -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 0 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True) -class BMWSensorEntityDescription(SensorEntityDescription): - """Describes BMW sensor entity.""" - - key_class: str | None = None - is_available: Callable[[MyBMWVehicle], bool] = lambda v: v.is_lsc_enabled - - -TIRES = ["front_left", "front_right", "rear_left", "rear_right"] - -SENSOR_TYPES: list[BMWSensorEntityDescription] = [ - BMWSensorEntityDescription( - key="charging_profile.ac_current_limit", - translation_key="ac_current_limit", - device_class=SensorDeviceClass.CURRENT, - native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, - entity_registry_enabled_default=False, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.charging_start_time", - translation_key="charging_start_time", - device_class=SensorDeviceClass.TIMESTAMP, - entity_registry_enabled_default=False, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.charging_end_time", - translation_key="charging_end_time", - device_class=SensorDeviceClass.TIMESTAMP, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.charging_status", - translation_key="charging_status", - device_class=SensorDeviceClass.ENUM, - options=[s.value.lower() for s in ChargingState if s != ChargingState.UNKNOWN], - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.charging_target", - translation_key="charging_target", - native_unit_of_measurement=PERCENTAGE, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_battery_percent", - translation_key="remaining_battery_percent", - device_class=SensorDeviceClass.BATTERY, - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="mileage", - translation_key="mileage", - device_class=SensorDeviceClass.DISTANCE, - native_unit_of_measurement=UnitOfLength.KILOMETERS, - state_class=SensorStateClass.TOTAL_INCREASING, - suggested_display_precision=0, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_range_total", - translation_key="remaining_range_total", - device_class=SensorDeviceClass.DISTANCE, - native_unit_of_measurement=UnitOfLength.KILOMETERS, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_range_electric", - translation_key="remaining_range_electric", - device_class=SensorDeviceClass.DISTANCE, - native_unit_of_measurement=UnitOfLength.KILOMETERS, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_electric_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_range_fuel", - translation_key="remaining_range_fuel", - device_class=SensorDeviceClass.DISTANCE, - native_unit_of_measurement=UnitOfLength.KILOMETERS, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_combustion_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_fuel", - translation_key="remaining_fuel", - device_class=SensorDeviceClass.VOLUME_STORAGE, - native_unit_of_measurement=UnitOfVolume.LITERS, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_combustion_drivetrain, - ), - BMWSensorEntityDescription( - key="fuel_and_battery.remaining_fuel_percent", - translation_key="remaining_fuel_percent", - native_unit_of_measurement=PERCENTAGE, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=0, - is_available=lambda v: v.is_lsc_enabled and v.has_combustion_drivetrain, - ), - BMWSensorEntityDescription( - key="climate.activity", - translation_key="climate_status", - device_class=SensorDeviceClass.ENUM, - options=[ - s.value.lower() - for s in ClimateActivityState - if s != ClimateActivityState.UNKNOWN - ], - is_available=lambda v: v.is_remote_climate_stop_enabled, - ), - *[ - BMWSensorEntityDescription( - key=f"tires.{tire}.current_pressure", - translation_key=f"{tire}_current_pressure", - device_class=SensorDeviceClass.PRESSURE, - native_unit_of_measurement=UnitOfPressure.KPA, - suggested_unit_of_measurement=UnitOfPressure.BAR, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=2, - is_available=lambda v: v.is_lsc_enabled and v.tires is not None, - ) - for tire in TIRES - ], - *[ - BMWSensorEntityDescription( - key=f"tires.{tire}.target_pressure", - translation_key=f"{tire}_target_pressure", - device_class=SensorDeviceClass.PRESSURE, - native_unit_of_measurement=UnitOfPressure.KPA, - suggested_unit_of_measurement=UnitOfPressure.BAR, - state_class=SensorStateClass.MEASUREMENT, - suggested_display_precision=2, - entity_registry_enabled_default=False, - is_available=lambda v: v.is_lsc_enabled and v.tires is not None, - ) - for tire in TIRES - ], -] - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW sensors from config entry.""" - coordinator = config_entry.runtime_data - - entities = [ - BMWSensor(coordinator, vehicle, description) - for vehicle in coordinator.account.vehicles - for description in SENSOR_TYPES - if description.is_available(vehicle) - ] - - async_add_entities(entities) - - -class BMWSensor(BMWBaseEntity, SensorEntity): - """Representation of a BMW vehicle sensor.""" - - entity_description: BMWSensorEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWSensorEntityDescription, - ) -> None: - """Initialize BMW vehicle sensor.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - - @callback - def _handle_coordinator_update(self) -> None: - """Handle updated data from the coordinator.""" - _LOGGER.debug( - "Updating sensor '%s' of %s", self.entity_description.key, self.vehicle.name - ) - - key_path = self.entity_description.key.split(".") - state = getattr(self.vehicle, key_path.pop(0)) - - for key in key_path: - state = getattr(state, key) - - # For datetime without tzinfo, we assume it to be the same timezone as the HA instance - if isinstance(state, datetime.datetime) and state.tzinfo is None: - state = state.replace(tzinfo=dt_util.get_default_time_zone()) - # For enum types, we only want the value - elif isinstance(state, ValueWithUnit): - state = state.value - # Get lowercase values from StrEnum - elif isinstance(state, StrEnum): - state = state.value.lower() - if state == STATE_UNKNOWN: - state = None - - self._attr_native_value = state - super()._handle_coordinator_update() diff --git a/homeassistant/components/bmw_connected_drive/strings.json b/homeassistant/components/bmw_connected_drive/strings.json deleted file mode 100644 index 5271d1d6d54..00000000000 --- a/homeassistant/components/bmw_connected_drive/strings.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "config": { - "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_account%]", - "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]", - "reconfigure_successful": "[%key:common::config_flow::abort::reconfigure_successful%]" - }, - "error": { - "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", - "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", - "missing_captcha": "Captcha validation missing" - }, - "step": { - "captcha": { - "data": { - "captcha_token": "Captcha token" - }, - "data_description": { - "captcha_token": "One-time token retrieved from the captcha challenge." - }, - "description": "A captcha is required for BMW login. Visit the external website to complete the challenge and submit the form. Copy the resulting token into the field below.\n\n{captcha_url}\n\nNo data will be exposed outside of your Home Assistant instance.", - "title": "Are you a robot?" - }, - "change_password": { - "data": { - "password": "[%key:common::config_flow::data::password%]" - }, - "data_description": { - "password": "[%key:component::bmw_connected_drive::config::step::user::data_description::password%]" - }, - "description": "Update your MyBMW/MINI Connected password for account `{username}` in region `{region}`." - }, - "user": { - "data": { - "password": "[%key:common::config_flow::data::password%]", - "region": "ConnectedDrive region", - "username": "[%key:common::config_flow::data::username%]" - }, - "data_description": { - "password": "The password of your MyBMW/MINI Connected account.", - "region": "The region of your MyBMW/MINI Connected account.", - "username": "The email address of your MyBMW/MINI Connected account." - }, - "description": "Connect to your MyBMW/MINI Connected account to retrieve vehicle data." - } - } - }, - "entity": { - "binary_sensor": { - "charging_status": { - "name": "Charging status" - }, - "check_control_messages": { - "name": "Check control messages" - }, - "condition_based_services": { - "name": "Condition-based services" - }, - "connection_status": { - "name": "Connection status" - }, - "door_lock_state": { - "name": "Door lock state" - }, - "is_pre_entry_climatization_enabled": { - "name": "Pre-entry climatization" - }, - "lids": { - "name": "Lids" - }, - "windows": { - "name": "Windows" - } - }, - "button": { - "activate_air_conditioning": { - "name": "Activate air conditioning" - }, - "deactivate_air_conditioning": { - "name": "Deactivate air conditioning" - }, - "find_vehicle": { - "name": "Find vehicle" - }, - "light_flash": { - "name": "Flash lights" - }, - "sound_horn": { - "name": "Sound horn" - } - }, - "lock": { - "lock": { - "name": "[%key:component::lock::title%]" - } - }, - "number": { - "target_soc": { - "name": "Target SoC" - } - }, - "select": { - "ac_limit": { - "name": "AC charging limit" - }, - "charging_mode": { - "name": "Charging mode", - "state": { - "delayed_charging": "Delayed charging", - "immediate_charging": "Immediate charging", - "no_action": "No action" - } - } - }, - "sensor": { - "ac_current_limit": { - "name": "AC current limit" - }, - "charging_end_time": { - "name": "Charging end time" - }, - "charging_start_time": { - "name": "Charging start time" - }, - "charging_status": { - "name": "Charging status", - "state": { - "charging": "[%key:common::state::charging%]", - "complete": "Complete", - "default": "Default", - "error": "[%key:common::state::error%]", - "finished_fully_charged": "Finished, fully charged", - "finished_not_full": "Finished, not full", - "fully_charged": "Fully charged", - "invalid": "Invalid", - "not_charging": "Not charging", - "plugged_in": "Plugged in", - "target_reached": "Target reached", - "waiting_for_charging": "Waiting for charging" - } - }, - "charging_target": { - "name": "Charging target" - }, - "climate_status": { - "name": "Climate status", - "state": { - "cooling": "Cooling", - "heating": "Heating", - "inactive": "Inactive", - "standby": "[%key:common::state::standby%]", - "ventilation": "Ventilation" - } - }, - "front_left_current_pressure": { - "name": "Front left tire pressure" - }, - "front_left_target_pressure": { - "name": "Front left target pressure" - }, - "front_right_current_pressure": { - "name": "Front right tire pressure" - }, - "front_right_target_pressure": { - "name": "Front right target pressure" - }, - "mileage": { - "name": "Mileage" - }, - "rear_left_current_pressure": { - "name": "Rear left tire pressure" - }, - "rear_left_target_pressure": { - "name": "Rear left target pressure" - }, - "rear_right_current_pressure": { - "name": "Rear right tire pressure" - }, - "rear_right_target_pressure": { - "name": "Rear right target pressure" - }, - "remaining_battery_percent": { - "name": "Remaining battery percent" - }, - "remaining_fuel": { - "name": "Remaining fuel" - }, - "remaining_fuel_percent": { - "name": "Remaining fuel percent" - }, - "remaining_range_electric": { - "name": "Remaining range electric" - }, - "remaining_range_fuel": { - "name": "Remaining range fuel" - }, - "remaining_range_total": { - "name": "Remaining range total" - } - }, - "switch": { - "charging": { - "name": "Charging" - }, - "climate": { - "name": "Climate" - } - } - }, - "exceptions": { - "invalid_auth": { - "message": "[%key:common::config_flow::error::invalid_auth%]" - }, - "invalid_poi": { - "message": "Invalid data for point of interest: {poi_exception}" - }, - "missing_captcha": { - "message": "Login requires captcha validation" - }, - "remote_service_error": { - "message": "Error executing remote service on vehicle. {exception}" - }, - "update_failed": { - "message": "Error updating vehicle data. {exception}" - } - }, - "options": { - "step": { - "account_options": { - "data": { - "read_only": "Read-only mode" - }, - "data_description": { - "read_only": "Only retrieve values and send POI data, but don't offer any services that can change the vehicle state." - } - } - } - }, - "selector": { - "regions": { - "options": { - "china": "China", - "north_america": "North America", - "rest_of_world": "Rest of world" - } - } - } -} diff --git a/homeassistant/components/bmw_connected_drive/switch.py b/homeassistant/components/bmw_connected_drive/switch.py deleted file mode 100644 index 44f6eb4bbb0..00000000000 --- a/homeassistant/components/bmw_connected_drive/switch.py +++ /dev/null @@ -1,133 +0,0 @@ -"""Switch platform for BMW.""" - -from collections.abc import Callable, Coroutine -from dataclasses import dataclass -import logging -from typing import Any - -from bimmer_connected.models import MyBMWAPIError -from bimmer_connected.vehicle import MyBMWVehicle -from bimmer_connected.vehicle.fuel_and_battery import ChargingState - -from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback - -from . import DOMAIN, BMWConfigEntry -from .coordinator import BMWDataUpdateCoordinator -from .entity import BMWBaseEntity - -PARALLEL_UPDATES = 1 - -_LOGGER = logging.getLogger(__name__) - - -@dataclass(frozen=True, kw_only=True) -class BMWSwitchEntityDescription(SwitchEntityDescription): - """Describes BMW switch entity.""" - - value_fn: Callable[[MyBMWVehicle], bool] - remote_service_on: Callable[[MyBMWVehicle], Coroutine[Any, Any, Any]] - remote_service_off: Callable[[MyBMWVehicle], Coroutine[Any, Any, Any]] - is_available: Callable[[MyBMWVehicle], bool] = lambda _: False - dynamic_options: Callable[[MyBMWVehicle], list[str]] | None = None - - -CHARGING_STATE_ON = { - ChargingState.CHARGING, - ChargingState.COMPLETE, - ChargingState.FULLY_CHARGED, - ChargingState.FINISHED_FULLY_CHARGED, - ChargingState.FINISHED_NOT_FULL, - ChargingState.TARGET_REACHED, -} - -NUMBER_TYPES: list[BMWSwitchEntityDescription] = [ - BMWSwitchEntityDescription( - key="climate", - translation_key="climate", - is_available=lambda v: v.is_remote_climate_stop_enabled, - value_fn=lambda v: v.climate.is_climate_on, - remote_service_on=lambda v: v.remote_services.trigger_remote_air_conditioning(), - remote_service_off=lambda v: ( - v.remote_services.trigger_remote_air_conditioning_stop() - ), - ), - BMWSwitchEntityDescription( - key="charging", - translation_key="charging", - is_available=lambda v: v.is_remote_charge_stop_enabled, - value_fn=lambda v: v.fuel_and_battery.charging_status in CHARGING_STATE_ON, - remote_service_on=lambda v: v.remote_services.trigger_charge_start(), - remote_service_off=lambda v: v.remote_services.trigger_charge_stop(), - ), -] - - -async def async_setup_entry( - hass: HomeAssistant, - config_entry: BMWConfigEntry, - async_add_entities: AddConfigEntryEntitiesCallback, -) -> None: - """Set up the MyBMW switch from config entry.""" - coordinator = config_entry.runtime_data - - entities: list[BMWSwitch] = [] - - for vehicle in coordinator.account.vehicles: - if not coordinator.read_only: - entities.extend( - [ - BMWSwitch(coordinator, vehicle, description) - for description in NUMBER_TYPES - if description.is_available(vehicle) - ] - ) - async_add_entities(entities) - - -class BMWSwitch(BMWBaseEntity, SwitchEntity): - """Representation of BMW Switch entity.""" - - entity_description: BMWSwitchEntityDescription - - def __init__( - self, - coordinator: BMWDataUpdateCoordinator, - vehicle: MyBMWVehicle, - description: BMWSwitchEntityDescription, - ) -> None: - """Initialize an BMW Switch.""" - super().__init__(coordinator, vehicle) - self.entity_description = description - self._attr_unique_id = f"{vehicle.vin}-{description.key}" - - @property - def is_on(self) -> bool: - """Return the entity value to represent the entity state.""" - return self.entity_description.value_fn(self.vehicle) - - async def async_turn_on(self, **kwargs: Any) -> None: - """Turn the switch on.""" - try: - await self.entity_description.remote_service_on(self.vehicle) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - self.coordinator.async_update_listeners() - - async def async_turn_off(self, **kwargs: Any) -> None: - """Turn the switch off.""" - try: - await self.entity_description.remote_service_off(self.vehicle) - except MyBMWAPIError as ex: - raise HomeAssistantError( - translation_domain=DOMAIN, - translation_key="remote_service_error", - translation_placeholders={"exception": str(ex)}, - ) from ex - self.coordinator.async_update_listeners() diff --git a/homeassistant/components/mini_connected/__init__.py b/homeassistant/components/mini_connected/__init__.py deleted file mode 100644 index 4f0af581f58..00000000000 --- a/homeassistant/components/mini_connected/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Virtual integration: MINI Connected.""" diff --git a/homeassistant/components/mini_connected/manifest.json b/homeassistant/components/mini_connected/manifest.json deleted file mode 100644 index dfe9a64c9e0..00000000000 --- a/homeassistant/components/mini_connected/manifest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "domain": "mini_connected", - "name": "MINI Connected", - "integration_type": "virtual", - "supported_by": "bmw_connected_drive" -} diff --git a/homeassistant/generated/config_flows.py b/homeassistant/generated/config_flows.py index 0bc4e55eaba..b8d65c15df9 100644 --- a/homeassistant/generated/config_flows.py +++ b/homeassistant/generated/config_flows.py @@ -100,7 +100,6 @@ FLOWS = { "bluemaestro", "bluesound", "bluetooth", - "bmw_connected_drive", "bond", "bosch_alarm", "bosch_shc", diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index 7a8f71fcd9a..a08b97d5a75 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -817,12 +817,6 @@ "config_flow": false, "iot_class": "local_push" }, - "bmw_connected_drive": { - "name": "BMW Connected Drive", - "integration_type": "hub", - "config_flow": true, - "iot_class": "cloud_polling" - }, "bond": { "name": "Bond", "integration_type": "hub", @@ -4207,11 +4201,6 @@ "config_flow": true, "iot_class": "local_polling" }, - "mini_connected": { - "name": "MINI Connected", - "integration_type": "virtual", - "supported_by": "bmw_connected_drive" - }, "minio": { "name": "Minio", "integration_type": "hub", diff --git a/mypy.ini b/mypy.ini index d09d40e7904..1d8fd878241 100644 --- a/mypy.ini +++ b/mypy.ini @@ -985,16 +985,6 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true -[mypy-homeassistant.components.bmw_connected_drive.*] -check_untyped_defs = true -disallow_incomplete_defs = true -disallow_subclassing_any = true -disallow_untyped_calls = true -disallow_untyped_decorators = true -disallow_untyped_defs = true -warn_return_any = true -warn_unreachable = true - [mypy-homeassistant.components.bond.*] check_untyped_defs = true disallow_incomplete_defs = true diff --git a/requirements_all.txt b/requirements_all.txt index 5293312fa2a..8e6cebfccb5 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -631,9 +631,6 @@ beautifulsoup4==4.13.3 # homeassistant.components.beewi_smartclim # beewi-smartclim==0.0.10 -# homeassistant.components.bmw_connected_drive -bimmer-connected[china]==0.17.3 - # homeassistant.components.bizkaibus bizkaibus==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 7b5bd323767..9dd8169cf6f 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -571,9 +571,6 @@ base36==0.1.1 # homeassistant.components.scrape beautifulsoup4==4.13.3 -# homeassistant.components.bmw_connected_drive -bimmer-connected[china]==0.17.3 - # homeassistant.components.esphome bleak-esphome==3.7.1 diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index b3db4ba5b27..0a673aa4cb7 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -1186,7 +1186,6 @@ INTEGRATIONS_WITHOUT_SCALE = [ "bluetooth", "bluetooth_adapters", "bluetooth_le_tracker", - "bmw_connected_drive", "bond", "bosch_shc", "braviatv", diff --git a/tests/components/bmw_connected_drive/__init__.py b/tests/components/bmw_connected_drive/__init__.py deleted file mode 100644 index 54711619400..00000000000 --- a/tests/components/bmw_connected_drive/__init__.py +++ /dev/null @@ -1,128 +0,0 @@ -"""Tests for the for the BMW Connected Drive integration.""" - -from bimmer_connected.const import ( - REMOTE_SERVICE_V4_BASE_URL, - VEHICLE_CHARGING_BASE_URL, - VEHICLE_POI_URL, -) -import respx - -from homeassistant import config_entries -from homeassistant.components.bmw_connected_drive.const import ( - CONF_CAPTCHA_TOKEN, - CONF_GCID, - CONF_READ_ONLY, - CONF_REFRESH_TOKEN, - DOMAIN, -) -from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME -from homeassistant.core import HomeAssistant - -from tests.common import MockConfigEntry - -FIXTURE_USER_INPUT = { - CONF_USERNAME: "user@domain.com", - CONF_PASSWORD: "p4ssw0rd", - CONF_REGION: "rest_of_world", -} -FIXTURE_CAPTCHA_INPUT = { - CONF_CAPTCHA_TOKEN: "captcha_token", -} -FIXTURE_USER_INPUT_W_CAPTCHA = FIXTURE_USER_INPUT | FIXTURE_CAPTCHA_INPUT -FIXTURE_REFRESH_TOKEN = "another_token_string" -FIXTURE_GCID = "DUMMY" - -FIXTURE_CONFIG_ENTRY = { - "entry_id": "1", - "domain": DOMAIN, - "title": FIXTURE_USER_INPUT[CONF_USERNAME], - "data": { - CONF_USERNAME: FIXTURE_USER_INPUT[CONF_USERNAME], - CONF_PASSWORD: FIXTURE_USER_INPUT[CONF_PASSWORD], - CONF_REGION: FIXTURE_USER_INPUT[CONF_REGION], - CONF_REFRESH_TOKEN: FIXTURE_REFRESH_TOKEN, - CONF_GCID: FIXTURE_GCID, - }, - "options": {CONF_READ_ONLY: False}, - "source": config_entries.SOURCE_USER, - "unique_id": f"{FIXTURE_USER_INPUT[CONF_REGION]}-{FIXTURE_USER_INPUT[CONF_USERNAME]}", -} - -REMOTE_SERVICE_EXC_REASON = "HTTPStatusError: 502 Bad Gateway" -REMOTE_SERVICE_EXC_TRANSLATION = ( - "Error executing remote service on vehicle. HTTPStatusError: 502 Bad Gateway" -) - -BIMMER_CONNECTED_LOGIN_PATCH = ( - "homeassistant.components.bmw_connected_drive.config_flow.MyBMWAuthentication.login" -) -BIMMER_CONNECTED_VEHICLE_PATCH = ( - "homeassistant.components.bmw_connected_drive.coordinator.MyBMWAccount.get_vehicles" -) - - -async def setup_mocked_integration(hass: HomeAssistant) -> MockConfigEntry: - """Mock a fully setup config entry and all components based on fixtures.""" - - # Mock config entry and add to HA - mock_config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - mock_config_entry.add_to_hass(hass) - - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - return mock_config_entry - - -def check_remote_service_call( - router: respx.MockRouter, - remote_service: str | None = None, - remote_service_params: dict | None = None, - remote_service_payload: dict | None = None, -): - """Check if the last call was a successful remote service call.""" - - # Check if remote service call was made correctly - if remote_service: - # Get remote service call - first_remote_service_call: respx.models.Call = next( - c - for c in router.calls - if c.request.url.path.startswith(REMOTE_SERVICE_V4_BASE_URL) - or c.request.url.path.startswith( - VEHICLE_CHARGING_BASE_URL.replace("/{vin}", "") - ) - or c.request.url.path.endswith(VEHICLE_POI_URL.rsplit("/", maxsplit=1)[-1]) - ) - assert ( - first_remote_service_call.request.url.path.endswith(remote_service) is True - ) - assert first_remote_service_call.has_response is True - assert first_remote_service_call.response.is_success is True - - # test params. - # we don't test payload as this creates a lot of noise in the tests - # and is end-to-end tested with the HA states - if remote_service_params: - assert ( - dict(first_remote_service_call.request.url.params.items()) - == remote_service_params - ) - - # Send POI doesn't return a status response, so we can't check it - if remote_service == "send-to-car": - return - - # Now check final result - last_event_status_call = next( - c for c in reversed(router.calls) if c.request.url.path.endswith("eventStatus") - ) - - assert last_event_status_call is not None - assert ( - last_event_status_call.request.url.path - == "/eadrax-vrccs/v3/presentation/remote-commands/eventStatus" - ) - assert last_event_status_call.has_response is True - assert last_event_status_call.response.is_success is True - assert last_event_status_call.response.json() == {"eventStatus": "EXECUTED"} diff --git a/tests/components/bmw_connected_drive/conftest.py b/tests/components/bmw_connected_drive/conftest.py deleted file mode 100644 index 7581b8c6f76..00000000000 --- a/tests/components/bmw_connected_drive/conftest.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Fixtures for BMW tests.""" - -from collections.abc import Generator - -from bimmer_connected.tests import ALL_CHARGING_SETTINGS, ALL_PROFILES, ALL_STATES -from bimmer_connected.tests.common import MyBMWMockRouter -from bimmer_connected.vehicle import remote_services -import pytest -import respx - - -@pytest.fixture -def bmw_fixture(monkeypatch: pytest.MonkeyPatch) -> Generator[respx.MockRouter]: - """Patch MyBMW login API calls.""" - - # we use the library's mock router to mock the API calls, but only with a subset of vehicles - router = MyBMWMockRouter( - vehicles_to_load=[ - "WBA00000000DEMO01", - "WBA00000000DEMO02", - "WBA00000000DEMO03", - "WBY00000000REXI01", - ], - profiles=ALL_PROFILES, - states=ALL_STATES, - charging_settings=ALL_CHARGING_SETTINGS, - ) - - # we don't want to wait when triggering a remote service - monkeypatch.setattr( - remote_services, - "_POLLING_CYCLE", - 0, - ) - - with router: - yield router diff --git a/tests/components/bmw_connected_drive/snapshots/test_binary_sensor.ambr b/tests/components/bmw_connected_drive/snapshots/test_binary_sensor.ambr deleted file mode 100644 index 7290a7c7c98..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_binary_sensor.ambr +++ /dev/null @@ -1,1541 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[binary_sensor.i3_rex_charging_status-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.i3_rex_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBY00000000REXI01-charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery_charging', - 'friendly_name': 'i3 (+ REX) Charging status', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_check_control_messages-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.i3_rex_check_control_messages', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Check control messages', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Check control messages', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'check_control_messages', - 'unique_id': 'WBY00000000REXI01-check_control_messages', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_check_control_messages-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'problem', - 'friendly_name': 'i3 (+ REX) Check control messages', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_check_control_messages', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_condition_based_services-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.i3_rex_condition_based_services', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Condition-based services', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Condition-based services', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'condition_based_services', - 'unique_id': 'WBY00000000REXI01-condition_based_services', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_condition_based_services-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'brake_fluid': 'OK', - 'brake_fluid_date': '2022-10-01', - 'device_class': 'problem', - 'friendly_name': 'i3 (+ REX) Condition-based services', - 'vehicle_check': 'OK', - 'vehicle_check_date': '2023-05-01', - 'vehicle_tuv': 'OK', - 'vehicle_tuv_date': '2023-05-01', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_condition_based_services', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_connection_status-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.i3_rex_connection_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Connection status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Connection status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'connection_status', - 'unique_id': 'WBY00000000REXI01-connection_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_connection_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'plug', - 'friendly_name': 'i3 (+ REX) Connection status', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_connection_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_door_lock_state-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.i3_rex_door_lock_state', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Door lock state', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Door lock state', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'door_lock_state', - 'unique_id': 'WBY00000000REXI01-door_lock_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_door_lock_state-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'door_lock_state': 'UNLOCKED', - 'friendly_name': 'i3 (+ REX) Door lock state', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_door_lock_state', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_lids-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.i3_rex_lids', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lids', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lids', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lids', - 'unique_id': 'WBY00000000REXI01-lids', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_lids-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'i3 (+ REX) Lids', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'sunRoof': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_lids', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_pre_entry_climatization-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.i3_rex_pre_entry_climatization', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Pre-entry climatization', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Pre-entry climatization', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'is_pre_entry_climatization_enabled', - 'unique_id': 'WBY00000000REXI01-is_pre_entry_climatization_enabled', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_pre_entry_climatization-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Pre-entry climatization', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_pre_entry_climatization', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_windows-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.i3_rex_windows', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Windows', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Windows', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'windows', - 'unique_id': 'WBY00000000REXI01-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i3_rex_windows-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'i3 (+ REX) Windows', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.i3_rex_windows', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_charging_status-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.i4_edrive40_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBA00000000DEMO02-charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery_charging', - 'friendly_name': 'i4 eDrive40 Charging status', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_check_control_messages-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.i4_edrive40_check_control_messages', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Check control messages', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Check control messages', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'check_control_messages', - 'unique_id': 'WBA00000000DEMO02-check_control_messages', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_check_control_messages-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'problem', - 'friendly_name': 'i4 eDrive40 Check control messages', - 'tire_pressure': 'LOW', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_check_control_messages', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_condition_based_services-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.i4_edrive40_condition_based_services', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Condition-based services', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Condition-based services', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'condition_based_services', - 'unique_id': 'WBA00000000DEMO02-condition_based_services', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_condition_based_services-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'brake_fluid': 'OK', - 'brake_fluid_date': '2024-12-01', - 'brake_fluid_distance': '50000 km', - 'device_class': 'problem', - 'friendly_name': 'i4 eDrive40 Condition-based services', - 'tire_wear_front': 'OK', - 'tire_wear_rear': 'OK', - 'vehicle_check': 'OK', - 'vehicle_check_date': '2024-12-01', - 'vehicle_check_distance': '50000 km', - 'vehicle_tuv': 'OK', - 'vehicle_tuv_date': '2024-12-01', - 'vehicle_tuv_distance': '50000 km', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_condition_based_services', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_connection_status-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.i4_edrive40_connection_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Connection status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Connection status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'connection_status', - 'unique_id': 'WBA00000000DEMO02-connection_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_connection_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'plug', - 'friendly_name': 'i4 eDrive40 Connection status', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_connection_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_door_lock_state-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.i4_edrive40_door_lock_state', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Door lock state', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Door lock state', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'door_lock_state', - 'unique_id': 'WBA00000000DEMO02-door_lock_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_door_lock_state-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'door_lock_state': 'LOCKED', - 'friendly_name': 'i4 eDrive40 Door lock state', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_door_lock_state', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_lids-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.i4_edrive40_lids', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lids', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lids', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lids', - 'unique_id': 'WBA00000000DEMO02-lids', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_lids-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'i4 eDrive40 Lids', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_lids', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_pre_entry_climatization-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.i4_edrive40_pre_entry_climatization', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Pre-entry climatization', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Pre-entry climatization', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'is_pre_entry_climatization_enabled', - 'unique_id': 'WBA00000000DEMO02-is_pre_entry_climatization_enabled', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_pre_entry_climatization-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Pre-entry climatization', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_pre_entry_climatization', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_windows-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.i4_edrive40_windows', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Windows', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Windows', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'windows', - 'unique_id': 'WBA00000000DEMO02-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.i4_edrive40_windows-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'i4 eDrive40 Windows', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.i4_edrive40_windows', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_charging_status-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.ix_xdrive50_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBA00000000DEMO01-charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery_charging', - 'friendly_name': 'iX xDrive50 Charging status', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_check_control_messages-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.ix_xdrive50_check_control_messages', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Check control messages', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Check control messages', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'check_control_messages', - 'unique_id': 'WBA00000000DEMO01-check_control_messages', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_check_control_messages-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'problem', - 'friendly_name': 'iX xDrive50 Check control messages', - 'tire_pressure': 'LOW', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_check_control_messages', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_condition_based_services-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.ix_xdrive50_condition_based_services', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Condition-based services', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Condition-based services', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'condition_based_services', - 'unique_id': 'WBA00000000DEMO01-condition_based_services', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_condition_based_services-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'brake_fluid': 'OK', - 'brake_fluid_date': '2024-12-01', - 'brake_fluid_distance': '50000 km', - 'device_class': 'problem', - 'friendly_name': 'iX xDrive50 Condition-based services', - 'tire_wear_front': 'OK', - 'tire_wear_rear': 'OK', - 'vehicle_check': 'OK', - 'vehicle_check_date': '2024-12-01', - 'vehicle_check_distance': '50000 km', - 'vehicle_tuv': 'OK', - 'vehicle_tuv_date': '2024-12-01', - 'vehicle_tuv_distance': '50000 km', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_condition_based_services', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_connection_status-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.ix_xdrive50_connection_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Connection status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Connection status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'connection_status', - 'unique_id': 'WBA00000000DEMO01-connection_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_connection_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'plug', - 'friendly_name': 'iX xDrive50 Connection status', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_connection_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_door_lock_state-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.ix_xdrive50_door_lock_state', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Door lock state', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Door lock state', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'door_lock_state', - 'unique_id': 'WBA00000000DEMO01-door_lock_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_door_lock_state-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'door_lock_state': 'LOCKED', - 'friendly_name': 'iX xDrive50 Door lock state', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_door_lock_state', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_lids-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.ix_xdrive50_lids', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lids', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lids', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lids', - 'unique_id': 'WBA00000000DEMO01-lids', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_lids-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'iX xDrive50 Lids', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'sunRoof': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_lids', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_pre_entry_climatization-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.ix_xdrive50_pre_entry_climatization', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Pre-entry climatization', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Pre-entry climatization', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'is_pre_entry_climatization_enabled', - 'unique_id': 'WBA00000000DEMO01-is_pre_entry_climatization_enabled', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_pre_entry_climatization-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Pre-entry climatization', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_pre_entry_climatization', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_windows-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.ix_xdrive50_windows', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Windows', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Windows', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'windows', - 'unique_id': 'WBA00000000DEMO01-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.ix_xdrive50_windows-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'iX xDrive50 Windows', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.ix_xdrive50_windows', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_check_control_messages-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.m340i_xdrive_check_control_messages', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Check control messages', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Check control messages', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'check_control_messages', - 'unique_id': 'WBA00000000DEMO03-check_control_messages', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_check_control_messages-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'problem', - 'engine_oil': 'LOW', - 'friendly_name': 'M340i xDrive Check control messages', - 'tire_pressure': 'LOW', - }), - 'context': , - 'entity_id': 'binary_sensor.m340i_xdrive_check_control_messages', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_condition_based_services-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.m340i_xdrive_condition_based_services', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Condition-based services', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Condition-based services', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'condition_based_services', - 'unique_id': 'WBA00000000DEMO03-condition_based_services', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_condition_based_services-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'brake_fluid': 'OK', - 'brake_fluid_date': '2024-12-01', - 'brake_fluid_distance': '50000 km', - 'device_class': 'problem', - 'friendly_name': 'M340i xDrive Condition-based services', - 'oil': 'OK', - 'oil_date': '2024-12-01', - 'oil_distance': '50000 km', - 'tire_wear_front': 'OK', - 'tire_wear_rear': 'OK', - 'vehicle_check': 'OK', - 'vehicle_check_date': '2024-12-01', - 'vehicle_check_distance': '50000 km', - 'vehicle_tuv': 'OK', - 'vehicle_tuv_date': '2024-12-01', - 'vehicle_tuv_distance': '50000 km', - }), - 'context': , - 'entity_id': 'binary_sensor.m340i_xdrive_condition_based_services', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_door_lock_state-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.m340i_xdrive_door_lock_state', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Door lock state', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Door lock state', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'door_lock_state', - 'unique_id': 'WBA00000000DEMO03-door_lock_state', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_door_lock_state-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'lock', - 'door_lock_state': 'LOCKED', - 'friendly_name': 'M340i xDrive Door lock state', - }), - 'context': , - 'entity_id': 'binary_sensor.m340i_xdrive_door_lock_state', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_lids-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.m340i_xdrive_lids', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lids', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Lids', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lids', - 'unique_id': 'WBA00000000DEMO03-lids', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_lids-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'M340i xDrive Lids', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.m340i_xdrive_lids', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_windows-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.m340i_xdrive_windows', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Windows', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Windows', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'windows', - 'unique_id': 'WBA00000000DEMO03-windows', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[binary_sensor.m340i_xdrive_windows-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'opening', - 'friendly_name': 'M340i xDrive Windows', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - 'context': , - 'entity_id': 'binary_sensor.m340i_xdrive_windows', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_button.ambr b/tests/components/bmw_connected_drive/snapshots/test_button.ambr deleted file mode 100644 index 4955dd6ed8e..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_button.ambr +++ /dev/null @@ -1,932 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[button.i3_rex_activate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i3_rex_activate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Activate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Activate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'activate_air_conditioning', - 'unique_id': 'WBY00000000REXI01-activate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_activate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Activate air conditioning', - }), - 'context': , - 'entity_id': 'button.i3_rex_activate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_find_vehicle-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i3_rex_find_vehicle', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Find vehicle', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Find vehicle', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'find_vehicle', - 'unique_id': 'WBY00000000REXI01-find_vehicle', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_find_vehicle-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Find vehicle', - }), - 'context': , - 'entity_id': 'button.i3_rex_find_vehicle', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_flash_lights-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i3_rex_flash_lights', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Flash lights', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Flash lights', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'light_flash', - 'unique_id': 'WBY00000000REXI01-light_flash', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_flash_lights-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Flash lights', - }), - 'context': , - 'entity_id': 'button.i3_rex_flash_lights', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_sound_horn-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i3_rex_sound_horn', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Sound horn', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Sound horn', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'sound_horn', - 'unique_id': 'WBY00000000REXI01-sound_horn', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i3_rex_sound_horn-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Sound horn', - }), - 'context': , - 'entity_id': 'button.i3_rex_sound_horn', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_activate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i4_edrive40_activate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Activate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Activate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'activate_air_conditioning', - 'unique_id': 'WBA00000000DEMO02-activate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_activate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Activate air conditioning', - }), - 'context': , - 'entity_id': 'button.i4_edrive40_activate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_deactivate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i4_edrive40_deactivate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Deactivate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Deactivate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'deactivate_air_conditioning', - 'unique_id': 'WBA00000000DEMO02-deactivate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_deactivate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Deactivate air conditioning', - }), - 'context': , - 'entity_id': 'button.i4_edrive40_deactivate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_find_vehicle-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i4_edrive40_find_vehicle', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Find vehicle', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Find vehicle', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'find_vehicle', - 'unique_id': 'WBA00000000DEMO02-find_vehicle', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_find_vehicle-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Find vehicle', - }), - 'context': , - 'entity_id': 'button.i4_edrive40_find_vehicle', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_flash_lights-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i4_edrive40_flash_lights', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Flash lights', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Flash lights', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'light_flash', - 'unique_id': 'WBA00000000DEMO02-light_flash', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_flash_lights-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Flash lights', - }), - 'context': , - 'entity_id': 'button.i4_edrive40_flash_lights', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_sound_horn-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.i4_edrive40_sound_horn', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Sound horn', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Sound horn', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'sound_horn', - 'unique_id': 'WBA00000000DEMO02-sound_horn', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.i4_edrive40_sound_horn-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Sound horn', - }), - 'context': , - 'entity_id': 'button.i4_edrive40_sound_horn', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_activate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.ix_xdrive50_activate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Activate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Activate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'activate_air_conditioning', - 'unique_id': 'WBA00000000DEMO01-activate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_activate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Activate air conditioning', - }), - 'context': , - 'entity_id': 'button.ix_xdrive50_activate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_deactivate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.ix_xdrive50_deactivate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Deactivate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Deactivate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'deactivate_air_conditioning', - 'unique_id': 'WBA00000000DEMO01-deactivate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_deactivate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Deactivate air conditioning', - }), - 'context': , - 'entity_id': 'button.ix_xdrive50_deactivate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_find_vehicle-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.ix_xdrive50_find_vehicle', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Find vehicle', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Find vehicle', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'find_vehicle', - 'unique_id': 'WBA00000000DEMO01-find_vehicle', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_find_vehicle-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Find vehicle', - }), - 'context': , - 'entity_id': 'button.ix_xdrive50_find_vehicle', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_flash_lights-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.ix_xdrive50_flash_lights', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Flash lights', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Flash lights', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'light_flash', - 'unique_id': 'WBA00000000DEMO01-light_flash', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_flash_lights-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Flash lights', - }), - 'context': , - 'entity_id': 'button.ix_xdrive50_flash_lights', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_sound_horn-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.ix_xdrive50_sound_horn', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Sound horn', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Sound horn', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'sound_horn', - 'unique_id': 'WBA00000000DEMO01-sound_horn', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.ix_xdrive50_sound_horn-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Sound horn', - }), - 'context': , - 'entity_id': 'button.ix_xdrive50_sound_horn', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_activate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.m340i_xdrive_activate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Activate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Activate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'activate_air_conditioning', - 'unique_id': 'WBA00000000DEMO03-activate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_activate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Activate air conditioning', - }), - 'context': , - 'entity_id': 'button.m340i_xdrive_activate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_deactivate_air_conditioning-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.m340i_xdrive_deactivate_air_conditioning', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Deactivate air conditioning', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Deactivate air conditioning', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'deactivate_air_conditioning', - 'unique_id': 'WBA00000000DEMO03-deactivate_air_conditioning', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_deactivate_air_conditioning-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Deactivate air conditioning', - }), - 'context': , - 'entity_id': 'button.m340i_xdrive_deactivate_air_conditioning', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_find_vehicle-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.m340i_xdrive_find_vehicle', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Find vehicle', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Find vehicle', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'find_vehicle', - 'unique_id': 'WBA00000000DEMO03-find_vehicle', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_find_vehicle-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Find vehicle', - }), - 'context': , - 'entity_id': 'button.m340i_xdrive_find_vehicle', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_flash_lights-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.m340i_xdrive_flash_lights', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Flash lights', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Flash lights', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'light_flash', - 'unique_id': 'WBA00000000DEMO03-light_flash', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_flash_lights-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Flash lights', - }), - 'context': , - 'entity_id': 'button.m340i_xdrive_flash_lights', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_sound_horn-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'button', - 'entity_category': None, - 'entity_id': 'button.m340i_xdrive_sound_horn', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Sound horn', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Sound horn', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'sound_horn', - 'unique_id': 'WBA00000000DEMO03-sound_horn', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[button.m340i_xdrive_sound_horn-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Sound horn', - }), - 'context': , - 'entity_id': 'button.m340i_xdrive_sound_horn', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_diagnostics.ambr b/tests/components/bmw_connected_drive/snapshots/test_diagnostics.ambr deleted file mode 100644 index 06e90c878af..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_diagnostics.ambr +++ /dev/null @@ -1,9014 +0,0 @@ -# serializer version: 1 -# name: test_config_entry_diagnostics - dict({ - 'data': list([ - dict({ - 'available_attributes': list([ - 'gps_position', - 'vin', - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'condition_based_services', - 'check_control_messages', - 'door_lock_state', - 'timestamp', - 'lids', - 'windows', - ]), - 'brand': 'bmw', - 'charging_profile': dict({ - 'ac_available_limits': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - 'ac_current_limit': 16, - 'charging_mode': 'IMMEDIATE_CHARGING', - 'charging_preferences': 'NO_PRESELECTION', - 'charging_preferences_service_pack': 'WAVE_01', - 'departure_times': list([ - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 1, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 2, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 3, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 4, - 'weekdays': list([ - ]), - }), - ]), - 'is_pre_entry_climatization_enabled': False, - 'preferred_charging_window': dict({ - '_window_dict': dict({ - }), - 'end_time': '00:00:00', - 'start_time': '00:00:00', - }), - 'timer_type': 'WEEKLY_PLANNER', - }), - 'check_control_messages': dict({ - 'has_check_control_messages': False, - 'messages': list([ - dict({ - 'description_long': None, - 'description_short': 'TIRE_PRESSURE', - 'state': 'LOW', - }), - ]), - 'urgent_check_control_messages': None, - }), - 'climate': dict({ - 'activity': 'INACTIVE', - 'activity_end_time': None, - 'is_climate_on': False, - }), - 'condition_based_services': dict({ - 'is_service_required': False, - 'messages': list([ - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_TUV', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_CHECK', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_REAR', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_FRONT', - 'state': 'OK', - }), - ]), - 'next_service_by_distance': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - 'next_service_by_time': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - }), - 'data': dict({ - 'attributes': dict({ - 'bodyType': 'I20', - 'brand': 'BMW_I', - 'color': 4285537312, - 'countryOfOrigin': 'DE', - 'driveTrain': 'ELECTRIC', - 'driverGuideInfo': dict({ - 'androidAppScheme': 'com.bmwgroup.driversguide.row', - 'androidStoreUrl': 'https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row', - 'iosAppScheme': 'bmwdriversguide:///open', - 'iosStoreUrl': 'https://apps.apple.com/de/app/id714042749?mt=8', - }), - 'headUnitRaw': 'HU_MGU', - 'headUnitType': 'MGU', - 'hmiVersion': 'ID8', - 'model': 'iX xDrive50', - 'softwareVersionCurrent': dict({ - 'iStep': 300, - 'puStep': dict({ - 'month': 7, - 'year': 21, - }), - 'seriesCluster': 'S21A', - }), - 'softwareVersionExFactory': dict({ - 'iStep': 300, - 'puStep': dict({ - 'month': 7, - 'year': 21, - }), - 'seriesCluster': 'S21A', - }), - 'telematicsUnit': 'WAVE01', - 'year': 2021, - }), - 'capabilities': dict({ - 'a4aType': 'BLUETOOTH', - 'alarmSystem': True, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_2_UWB', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': True, - }), - 'horn': True, - 'inCarCamera': True, - 'inCarCameraDwa': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': True, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - 'chargingControl': list([ - 'START', - 'STOP', - ]), - 'flapControl': list([ - 'NOT_SUPPORTED', - ]), - 'plugControl': list([ - 'NOT_SUPPORTED', - ]), - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - 'state': 'ACTIVATED', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - 'state': 'ACTIVATED', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - 'state': 'ACTIVATED', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': True, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'charging_settings': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 70, - }), - 'servicePack': 'WAVE_01', - }), - 'fetched_at': '2022-07-10T11:00:00+00:00', - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'remainingFuelPercent': 10, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 70, - 'chargingStatus': 'CHARGING', - 'chargingTarget': 80, - 'isChargerConnected': True, - 'range': 340, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.371Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.383Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 340, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'securityOverviewMode': 'ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 261, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 269, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - 'vin': '**REDACTED**', - }), - 'doors_and_windows': dict({ - 'all_lids_closed': True, - 'all_windows_closed': True, - 'door_lock_state': 'LOCKED', - 'lids': list([ - dict({ - 'is_closed': True, - 'name': 'hood', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'trunk', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'sunRoof', - 'state': 'CLOSED', - }), - ]), - 'open_lids': list([ - ]), - 'open_windows': list([ - ]), - 'windows': list([ - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - ]), - }), - 'drive_train': 'ELECTRIC', - 'drive_train_attributes': list([ - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - ]), - 'fuel_and_battery': dict({ - 'charging_end_time': '2022-07-10T11:10:00+00:00', - 'charging_start_time': None, - 'charging_status': 'CHARGING', - 'charging_target': 80, - 'is_charger_connected': True, - 'remaining_battery_percent': 70, - 'remaining_fuel': list([ - None, - None, - ]), - 'remaining_fuel_percent': None, - 'remaining_range_electric': list([ - 340, - 'km', - ]), - 'remaining_range_fuel': list([ - None, - None, - ]), - 'remaining_range_total': list([ - 340, - 'km', - ]), - }), - 'has_combustion_drivetrain': False, - 'has_electric_drivetrain': True, - 'headunit': dict({ - 'headunit_type': 'MGU', - 'idrive_version': 'ID8', - 'software_version': '07/2021.00', - }), - 'is_charging_plan_supported': True, - 'is_charging_settings_supported': True, - 'is_lsc_enabled': True, - 'is_remote_charge_start_enabled': True, - 'is_remote_charge_stop_enabled': True, - 'is_remote_climate_start_enabled': True, - 'is_remote_climate_stop_enabled': True, - 'is_remote_horn_enabled': True, - 'is_remote_lights_enabled': True, - 'is_remote_lock_enabled': True, - 'is_remote_sendpoi_enabled': True, - 'is_remote_set_ac_limit_enabled': True, - 'is_remote_set_target_soc_enabled': True, - 'is_remote_unlock_enabled': True, - 'is_vehicle_active': False, - 'is_vehicle_tracking_enabled': True, - 'lsc_type': 'ACTIVATED', - 'mileage': list([ - 1121, - 'km', - ]), - 'name': 'iX xDrive50', - 'timestamp': '2023-01-04T14:57:06+00:00', - 'tires': dict({ - 'front_left': dict({ - 'current_pressure': 241, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': 241, - }), - 'front_right': dict({ - 'current_pressure': 241, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': 241, - }), - 'rear_left': dict({ - 'current_pressure': 261, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': 269, - }), - 'rear_right': dict({ - 'current_pressure': 269, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': 269, - }), - }), - 'vehicle_location': dict({ - 'account_region': 'row', - 'heading': '**REDACTED**', - 'location': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'remote_service_position': None, - 'vehicle_update_timestamp': '2023-01-04T14:57:06+00:00', - }), - 'vin': '**REDACTED**', - }), - dict({ - 'available_attributes': list([ - 'gps_position', - 'vin', - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'condition_based_services', - 'check_control_messages', - 'door_lock_state', - 'timestamp', - 'lids', - 'windows', - ]), - 'brand': 'bmw', - 'charging_profile': dict({ - 'ac_available_limits': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - 'ac_current_limit': 16, - 'charging_mode': 'IMMEDIATE_CHARGING', - 'charging_preferences': 'NO_PRESELECTION', - 'charging_preferences_service_pack': 'WAVE_01', - 'departure_times': list([ - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 1, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 2, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 3, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '00:00:00', - 'timer_id': 4, - 'weekdays': list([ - ]), - }), - ]), - 'is_pre_entry_climatization_enabled': False, - 'preferred_charging_window': dict({ - '_window_dict': dict({ - }), - 'end_time': '00:00:00', - 'start_time': '00:00:00', - }), - 'timer_type': 'WEEKLY_PLANNER', - }), - 'check_control_messages': dict({ - 'has_check_control_messages': False, - 'messages': list([ - dict({ - 'description_long': None, - 'description_short': 'TIRE_PRESSURE', - 'state': 'LOW', - }), - ]), - 'urgent_check_control_messages': None, - }), - 'climate': dict({ - 'activity': 'HEATING', - 'activity_end_time': '2022-07-10T11:29:50+00:00', - 'is_climate_on': True, - }), - 'condition_based_services': dict({ - 'is_service_required': False, - 'messages': list([ - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_TUV', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_CHECK', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_REAR', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_FRONT', - 'state': 'OK', - }), - ]), - 'next_service_by_distance': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - 'next_service_by_time': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - }), - 'data': dict({ - 'attributes': dict({ - 'bodyType': 'G26', - 'brand': 'BMW', - 'color': 4284245350, - 'countryOfOrigin': 'DE', - 'driveTrain': 'ELECTRIC', - 'driverGuideInfo': dict({ - 'androidAppScheme': 'com.bmwgroup.driversguide.row', - 'androidStoreUrl': 'https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row', - 'iosAppScheme': 'bmwdriversguide:///open', - 'iosStoreUrl': 'https://apps.apple.com/de/app/id714042749?mt=8', - }), - 'headUnitRaw': 'HU_MGU', - 'headUnitType': 'MGU', - 'hmiVersion': 'ID8', - 'model': 'i4 eDrive40', - 'softwareVersionCurrent': dict({ - 'iStep': 470, - 'puStep': dict({ - 'month': 11, - 'year': 21, - }), - 'seriesCluster': 'G026', - }), - 'softwareVersionExFactory': dict({ - 'iStep': 470, - 'puStep': dict({ - 'month': 11, - 'year': 21, - }), - 'seriesCluster': 'G026', - }), - 'telematicsUnit': 'WAVE01', - 'year': 2021, - }), - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'charging_settings': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 0, - }), - 'servicePack': 'WAVE_01', - }), - 'fetched_at': '2022-07-10T11:00:00+00:00', - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'HEATING', - 'remainingSeconds': 1790.846, - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 80, - 'chargingStatus': 'INVALID', - 'chargingTarget': 80, - 'isChargerConnected': False, - 'range': 472, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.386Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.407Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 472, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': 'NOT_ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - 'vin': '**REDACTED**', - }), - 'doors_and_windows': dict({ - 'all_lids_closed': True, - 'all_windows_closed': True, - 'door_lock_state': 'LOCKED', - 'lids': list([ - dict({ - 'is_closed': True, - 'name': 'hood', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'trunk', - 'state': 'CLOSED', - }), - ]), - 'open_lids': list([ - ]), - 'open_windows': list([ - ]), - 'windows': list([ - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - ]), - }), - 'drive_train': 'ELECTRIC', - 'drive_train_attributes': list([ - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - ]), - 'fuel_and_battery': dict({ - 'charging_end_time': '2022-07-10T11:10:00+00:00', - 'charging_start_time': None, - 'charging_status': 'NOT_CHARGING', - 'charging_target': 80, - 'is_charger_connected': False, - 'remaining_battery_percent': 80, - 'remaining_fuel': list([ - None, - None, - ]), - 'remaining_fuel_percent': None, - 'remaining_range_electric': list([ - 472, - 'km', - ]), - 'remaining_range_fuel': list([ - None, - None, - ]), - 'remaining_range_total': list([ - 472, - 'km', - ]), - }), - 'has_combustion_drivetrain': False, - 'has_electric_drivetrain': True, - 'headunit': dict({ - 'headunit_type': 'MGU', - 'idrive_version': 'ID8', - 'software_version': '11/2021.70', - }), - 'is_charging_plan_supported': True, - 'is_charging_settings_supported': True, - 'is_lsc_enabled': True, - 'is_remote_charge_start_enabled': False, - 'is_remote_charge_stop_enabled': False, - 'is_remote_climate_start_enabled': True, - 'is_remote_climate_stop_enabled': True, - 'is_remote_horn_enabled': True, - 'is_remote_lights_enabled': True, - 'is_remote_lock_enabled': True, - 'is_remote_sendpoi_enabled': True, - 'is_remote_set_ac_limit_enabled': True, - 'is_remote_set_target_soc_enabled': True, - 'is_remote_unlock_enabled': True, - 'is_vehicle_active': False, - 'is_vehicle_tracking_enabled': True, - 'lsc_type': 'ACTIVATED', - 'mileage': list([ - 1121, - 'km', - ]), - 'name': 'i4 eDrive40', - 'timestamp': '2023-01-04T14:57:06+00:00', - 'tires': dict({ - 'front_left': dict({ - 'current_pressure': 241, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': 269, - }), - 'front_right': dict({ - 'current_pressure': 255, - 'manufacturing_week': '2019-06-10T00:00:00', - 'season': 2, - 'target_pressure': 269, - }), - 'rear_left': dict({ - 'current_pressure': 324, - 'manufacturing_week': '2019-03-18T00:00:00', - 'season': 2, - 'target_pressure': 303, - }), - 'rear_right': dict({ - 'current_pressure': 331, - 'manufacturing_week': '2019-03-18T00:00:00', - 'season': 2, - 'target_pressure': 303, - }), - }), - 'vehicle_location': dict({ - 'account_region': 'row', - 'heading': '**REDACTED**', - 'location': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'remote_service_position': None, - 'vehicle_update_timestamp': '2023-01-04T14:57:06+00:00', - }), - 'vin': '**REDACTED**', - }), - dict({ - 'available_attributes': list([ - 'gps_position', - 'vin', - 'remaining_range_total', - 'mileage', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - 'condition_based_services', - 'check_control_messages', - 'door_lock_state', - 'timestamp', - 'lids', - 'windows', - ]), - 'brand': 'bmw', - 'charging_profile': dict({ - 'ac_available_limits': None, - 'ac_current_limit': None, - 'charging_mode': 'IMMEDIATE_CHARGING', - 'charging_preferences': 'NO_PRESELECTION', - 'charging_preferences_service_pack': None, - 'departure_times': list([ - ]), - 'is_pre_entry_climatization_enabled': False, - 'preferred_charging_window': dict({ - '_window_dict': dict({ - }), - 'end_time': '00:00:00', - 'start_time': '00:00:00', - }), - 'timer_type': 'UNKNOWN', - }), - 'check_control_messages': dict({ - 'has_check_control_messages': False, - 'messages': list([ - dict({ - 'description_long': None, - 'description_short': 'TIRE_PRESSURE', - 'state': 'LOW', - }), - dict({ - 'description_long': None, - 'description_short': 'ENGINE_OIL', - 'state': 'LOW', - }), - ]), - 'urgent_check_control_messages': None, - }), - 'climate': dict({ - 'activity': 'INACTIVE', - 'activity_end_time': None, - 'is_climate_on': False, - }), - 'condition_based_services': dict({ - 'is_service_required': False, - 'messages': list([ - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'OIL', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_TUV', - 'state': 'OK', - }), - dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'VEHICLE_CHECK', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_REAR', - 'state': 'OK', - }), - dict({ - 'due_date': None, - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'TIRE_WEAR_FRONT', - 'state': 'OK', - }), - ]), - 'next_service_by_distance': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - 'next_service_by_time': dict({ - 'due_date': '2024-12-01T00:00:00+00:00', - 'due_distance': list([ - 50000, - 'km', - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - }), - 'data': dict({ - 'attributes': dict({ - 'bodyType': 'G20', - 'brand': 'BMW', - 'color': 4280233344, - 'countryOfOrigin': 'PT', - 'driveTrain': 'COMBUSTION', - 'driverGuideInfo': dict({ - 'androidAppScheme': 'com.bmwgroup.driversguide.row', - 'androidStoreUrl': 'https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row', - 'iosAppScheme': 'bmwdriversguide:///open', - 'iosStoreUrl': 'https://apps.apple.com/de/app/id714042749?mt=8', - }), - 'headUnitRaw': 'HU_MGU', - 'headUnitType': 'MGU', - 'hmiVersion': 'ID7', - 'model': 'M340i xDrive', - 'softwareVersionCurrent': dict({ - 'iStep': 470, - 'puStep': dict({ - 'month': 7, - 'year': 21, - }), - 'seriesCluster': 'S18A', - }), - 'softwareVersionExFactory': dict({ - 'iStep': 420, - 'puStep': dict({ - 'month': 7, - 'year': 20, - }), - 'seriesCluster': 'S18A', - }), - 'telematicsUnit': 'ATM2', - 'year': 2022, - }), - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'VENTILATION', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': False, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': False, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': False, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': False, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'charging_settings': None, - 'fetched_at': '2022-07-10T11:00:00+00:00', - 'state': dict({ - 'chargingProfile': dict({ - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 0, - }), - 'departureTimes': list([ - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - dict({ - 'severity': 'LOW', - 'type': 'ENGINE_OIL', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 629, - 'remainingFuelLiters': 40, - 'remainingFuelPercent': 80, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.336Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.348Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 629, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'OIL', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': None, - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - 'vin': '**REDACTED**', - }), - 'doors_and_windows': dict({ - 'all_lids_closed': True, - 'all_windows_closed': True, - 'door_lock_state': 'LOCKED', - 'lids': list([ - dict({ - 'is_closed': True, - 'name': 'hood', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'trunk', - 'state': 'CLOSED', - }), - ]), - 'open_lids': list([ - ]), - 'open_windows': list([ - ]), - 'windows': list([ - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - ]), - }), - 'drive_train': 'COMBUSTION', - 'drive_train_attributes': list([ - 'remaining_range_total', - 'mileage', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - ]), - 'fuel_and_battery': dict({ - 'charging_end_time': None, - 'charging_start_time': None, - 'charging_status': None, - 'charging_target': None, - 'is_charger_connected': False, - 'remaining_battery_percent': None, - 'remaining_fuel': list([ - 40, - 'L', - ]), - 'remaining_fuel_percent': 80, - 'remaining_range_electric': list([ - None, - None, - ]), - 'remaining_range_fuel': list([ - 629, - 'km', - ]), - 'remaining_range_total': list([ - 629, - 'km', - ]), - }), - 'has_combustion_drivetrain': True, - 'has_electric_drivetrain': False, - 'headunit': dict({ - 'headunit_type': 'MGU', - 'idrive_version': 'ID7', - 'software_version': '07/2021.70', - }), - 'is_charging_plan_supported': False, - 'is_charging_settings_supported': False, - 'is_lsc_enabled': True, - 'is_remote_charge_start_enabled': False, - 'is_remote_charge_stop_enabled': False, - 'is_remote_climate_start_enabled': True, - 'is_remote_climate_stop_enabled': True, - 'is_remote_horn_enabled': True, - 'is_remote_lights_enabled': True, - 'is_remote_lock_enabled': True, - 'is_remote_sendpoi_enabled': True, - 'is_remote_set_ac_limit_enabled': False, - 'is_remote_set_target_soc_enabled': False, - 'is_remote_unlock_enabled': True, - 'is_vehicle_active': False, - 'is_vehicle_tracking_enabled': True, - 'lsc_type': 'ACTIVATED', - 'mileage': list([ - 1121, - 'km', - ]), - 'name': 'M340i xDrive', - 'timestamp': '2023-01-04T14:57:06+00:00', - 'tires': dict({ - 'front_left': dict({ - 'current_pressure': 241, - 'manufacturing_week': '2021-10-04T00:00:00', - 'season': 2, - 'target_pressure': None, - }), - 'front_right': dict({ - 'current_pressure': 255, - 'manufacturing_week': '2019-06-10T00:00:00', - 'season': 2, - 'target_pressure': None, - }), - 'rear_left': dict({ - 'current_pressure': 324, - 'manufacturing_week': '2019-03-18T00:00:00', - 'season': 2, - 'target_pressure': None, - }), - 'rear_right': dict({ - 'current_pressure': 331, - 'manufacturing_week': '2019-03-18T00:00:00', - 'season': 2, - 'target_pressure': None, - }), - }), - 'vehicle_location': dict({ - 'account_region': 'row', - 'heading': '**REDACTED**', - 'location': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'remote_service_position': None, - 'vehicle_update_timestamp': '2023-01-04T14:57:06+00:00', - }), - 'vin': '**REDACTED**', - }), - dict({ - 'available_attributes': list([ - 'gps_position', - 'vin', - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - 'condition_based_services', - 'check_control_messages', - 'door_lock_state', - 'timestamp', - 'lids', - 'windows', - ]), - 'brand': 'bmw', - 'charging_profile': dict({ - 'ac_available_limits': None, - 'ac_current_limit': None, - 'charging_mode': 'DELAYED_CHARGING', - 'charging_preferences': 'CHARGING_WINDOW', - 'charging_preferences_service_pack': 'TCB1', - 'departure_times': list([ - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '07:35:00', - 'timer_id': 1, - 'weekdays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '18:00:00', - 'timer_id': 2, - 'weekdays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '07:00:00', - 'timer_id': 3, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': None, - 'timer_id': 4, - 'weekdays': list([ - ]), - }), - ]), - 'is_pre_entry_climatization_enabled': False, - 'preferred_charging_window': dict({ - '_window_dict': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - 'end_time': '01:30:00', - 'start_time': '18:01:00', - }), - 'timer_type': 'WEEKLY_PLANNER', - }), - 'check_control_messages': dict({ - 'has_check_control_messages': False, - 'messages': list([ - ]), - 'urgent_check_control_messages': None, - }), - 'climate': dict({ - 'activity': 'UNKNOWN', - 'activity_end_time': None, - 'is_climate_on': False, - }), - 'condition_based_services': dict({ - 'is_service_required': False, - 'messages': list([ - dict({ - 'due_date': '2022-10-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - dict({ - 'due_date': '2023-05-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'VEHICLE_CHECK', - 'state': 'OK', - }), - dict({ - 'due_date': '2023-05-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'VEHICLE_TUV', - 'state': 'OK', - }), - ]), - 'next_service_by_distance': None, - 'next_service_by_time': dict({ - 'due_date': '2022-10-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - }), - 'data': dict({ - 'attributes': dict({ - 'bodyType': 'I01', - 'brand': 'BMW_I', - 'color': 4284110934, - 'countryOfOrigin': 'CZ', - 'driveTrain': 'ELECTRIC_WITH_RANGE_EXTENDER', - 'driverGuideInfo': dict({ - 'androidAppScheme': 'com.bmwgroup.driversguide.row', - 'androidStoreUrl': 'https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row', - 'iosAppScheme': 'bmwdriversguide:///open', - 'iosStoreUrl': 'https://apps.apple.com/de/app/id714042749?mt=8', - }), - 'headUnitRaw': 'MGU_02_L', - 'headUnitType': 'NBT', - 'hmiVersion': 'ID4', - 'model': 'i3 (+ REX)', - 'softwareVersionCurrent': dict({ - 'iStep': 510, - 'puStep': dict({ - 'month': 11, - 'year': 21, - }), - 'seriesCluster': 'I001', - }), - 'softwareVersionExFactory': dict({ - 'iStep': 502, - 'puStep': dict({ - 'month': 3, - 'year': 15, - }), - 'seriesCluster': 'I001', - }), - 'telematicsUnit': 'WAVE01', - 'year': 2015, - }), - 'capabilities': dict({ - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'horn': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isRemoteEngineStartSupported': False, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilitySupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'lock': True, - 'remoteChargingCommands': dict({ - }), - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'unlock': True, - 'vehicleFinder': False, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'charging_settings': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'fetched_at': '2022-07-10T11:00:00+00:00', - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'DELAYED_CHARGING', - 'chargingPreference': 'CHARGING_WINDOW', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 100, - }), - 'climatisationOn': False, - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - ]), - 'reductionOfChargeCurrent': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - }), - 'checkControlMessages': list([ - ]), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 6, - 'minute': 40, - }), - 'isWeeklyTimer': True, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'THURSDAY', - 'SUNDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 12, - 'minute': 50, - }), - 'isWeeklyTimer': False, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'MONDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 18, - 'minute': 59, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - 'WEDNESDAY', - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 105, - 'remainingFuelLiters': 6, - }), - 'currentMileage': 137009, - 'doorsState': dict({ - 'combinedSecurityState': 'UNLOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'CONDUCTIVE', - 'chargingLevelPercent': 82, - 'chargingStatus': 'WAITING_FOR_CHARGING', - 'chargingTarget': 100, - 'isChargerConnected': True, - 'range': 174, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2022-06-22T14:24:23.982Z', - 'lastUpdatedAt': '2022-06-22T13:58:52Z', - 'range': 174, - 'requiredServices': list([ - dict({ - 'dateTime': '2022-10-01T00:00:00.000Z', - 'description': 'Next service due by the specified date.', - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next vehicle check due after the specified distance or date.', - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next state inspection due by the specified date.', - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - }), - 'vin': '**REDACTED**', - }), - 'doors_and_windows': dict({ - 'all_lids_closed': True, - 'all_windows_closed': True, - 'door_lock_state': 'UNLOCKED', - 'lids': list([ - dict({ - 'is_closed': True, - 'name': 'hood', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'trunk', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'sunRoof', - 'state': 'CLOSED', - }), - ]), - 'open_lids': list([ - ]), - 'open_windows': list([ - ]), - 'windows': list([ - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - ]), - }), - 'drive_train': 'ELECTRIC_WITH_RANGE_EXTENDER', - 'drive_train_attributes': list([ - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - ]), - 'fuel_and_battery': dict({ - 'charging_end_time': None, - 'charging_start_time': '2022-07-10T18:01:00', - 'charging_status': 'WAITING_FOR_CHARGING', - 'charging_target': 100, - 'is_charger_connected': True, - 'remaining_battery_percent': 82, - 'remaining_fuel': list([ - 6, - 'L', - ]), - 'remaining_fuel_percent': None, - 'remaining_range_electric': list([ - 174, - 'km', - ]), - 'remaining_range_fuel': list([ - 105, - 'km', - ]), - 'remaining_range_total': list([ - 279, - 'km', - ]), - }), - 'has_combustion_drivetrain': True, - 'has_electric_drivetrain': True, - 'headunit': dict({ - 'headunit_type': 'NBT', - 'idrive_version': 'ID4', - 'software_version': '11/2021.10', - }), - 'is_charging_plan_supported': True, - 'is_charging_settings_supported': False, - 'is_lsc_enabled': True, - 'is_remote_charge_start_enabled': False, - 'is_remote_charge_stop_enabled': False, - 'is_remote_climate_start_enabled': True, - 'is_remote_climate_stop_enabled': False, - 'is_remote_horn_enabled': True, - 'is_remote_lights_enabled': True, - 'is_remote_lock_enabled': True, - 'is_remote_sendpoi_enabled': True, - 'is_remote_set_ac_limit_enabled': False, - 'is_remote_set_target_soc_enabled': False, - 'is_remote_unlock_enabled': True, - 'is_vehicle_active': False, - 'is_vehicle_tracking_enabled': False, - 'lsc_type': 'ACTIVATED', - 'mileage': list([ - 137009, - 'km', - ]), - 'name': 'i3 (+ REX)', - 'timestamp': '2022-06-22T14:24:23+00:00', - 'tires': None, - 'vehicle_location': dict({ - 'account_region': 'row', - 'heading': None, - 'location': None, - 'remote_service_position': None, - 'vehicle_update_timestamp': '2022-06-22T14:24:23+00:00', - }), - 'vin': '**REDACTED**', - }), - ]), - 'fingerprint': list([ - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'mini-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'toyota-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'BLUETOOTH', - 'alarmSystem': True, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_2_UWB', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': True, - }), - 'horn': True, - 'inCarCamera': True, - 'inCarCameraDwa': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': True, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - 'chargingControl': list([ - 'START', - 'STOP', - ]), - 'flapControl': list([ - 'NOT_SUPPORTED', - ]), - 'plugControl': list([ - 'NOT_SUPPORTED', - ]), - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - 'state': 'ACTIVATED', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - 'state': 'ACTIVATED', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - 'state': 'ACTIVATED', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': True, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'remainingFuelPercent': 10, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 70, - 'chargingStatus': 'CHARGING', - 'chargingTarget': 80, - 'isChargerConnected': True, - 'range': 340, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.371Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.383Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 340, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'securityOverviewMode': 'ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 261, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 269, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 70, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'HEATING', - 'remainingSeconds': 1790.846, - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 80, - 'chargingStatus': 'INVALID', - 'chargingTarget': 80, - 'isChargerConnected': False, - 'range': 472, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.386Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.407Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 472, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': 'NOT_ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 0, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'VENTILATION', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': False, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': False, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': False, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': False, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 0, - }), - 'departureTimes': list([ - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - dict({ - 'severity': 'LOW', - 'type': 'ENGINE_OIL', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 629, - 'remainingFuelLiters': 40, - 'remainingFuelPercent': 80, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.336Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.348Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 629, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'OIL', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': None, - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT03.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'horn': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isRemoteEngineStartSupported': False, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilitySupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'lock': True, - 'remoteChargingCommands': dict({ - }), - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'unlock': True, - 'vehicleFinder': False, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'DELAYED_CHARGING', - 'chargingPreference': 'CHARGING_WINDOW', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 100, - }), - 'climatisationOn': False, - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - ]), - 'reductionOfChargeCurrent': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - }), - 'checkControlMessages': list([ - ]), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 6, - 'minute': 40, - }), - 'isWeeklyTimer': True, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'THURSDAY', - 'SUNDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 12, - 'minute': 50, - }), - 'isWeeklyTimer': False, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'MONDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 18, - 'minute': 59, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - 'WEDNESDAY', - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 105, - 'remainingFuelLiters': 6, - }), - 'currentMileage': 137009, - 'doorsState': dict({ - 'combinedSecurityState': 'UNLOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'CONDUCTIVE', - 'chargingLevelPercent': 82, - 'chargingStatus': 'WAITING_FOR_CHARGING', - 'chargingTarget': 100, - 'isChargerConnected': True, - 'range': 174, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2022-06-22T14:24:23.982Z', - 'lastUpdatedAt': '2022-06-22T13:58:52Z', - 'range': 174, - 'requiredServices': list([ - dict({ - 'dateTime': '2022-10-01T00:00:00.000Z', - 'description': 'Next service due by the specified date.', - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next vehicle check due after the specified distance or date.', - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next state inspection due by the specified date.', - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - ]), - 'info': dict({ - 'gcid': 'DUMMY', - 'password': '**REDACTED**', - 'refresh_token': '**REDACTED**', - 'region': 'rest_of_world', - 'username': '**REDACTED**', - }), - }) -# --- -# name: test_device_diagnostics - dict({ - 'data': dict({ - 'available_attributes': list([ - 'gps_position', - 'vin', - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - 'condition_based_services', - 'check_control_messages', - 'door_lock_state', - 'timestamp', - 'lids', - 'windows', - ]), - 'brand': 'bmw', - 'charging_profile': dict({ - 'ac_available_limits': None, - 'ac_current_limit': None, - 'charging_mode': 'DELAYED_CHARGING', - 'charging_preferences': 'CHARGING_WINDOW', - 'charging_preferences_service_pack': 'TCB1', - 'departure_times': list([ - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '07:35:00', - 'timer_id': 1, - 'weekdays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '18:00:00', - 'timer_id': 2, - 'weekdays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': '07:00:00', - 'timer_id': 3, - 'weekdays': list([ - ]), - }), - dict({ - '_timer_dict': dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - 'action': 'DEACTIVATE', - 'start_time': None, - 'timer_id': 4, - 'weekdays': list([ - ]), - }), - ]), - 'is_pre_entry_climatization_enabled': False, - 'preferred_charging_window': dict({ - '_window_dict': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - 'end_time': '01:30:00', - 'start_time': '18:01:00', - }), - 'timer_type': 'WEEKLY_PLANNER', - }), - 'check_control_messages': dict({ - 'has_check_control_messages': False, - 'messages': list([ - ]), - 'urgent_check_control_messages': None, - }), - 'climate': dict({ - 'activity': 'UNKNOWN', - 'activity_end_time': None, - 'is_climate_on': False, - }), - 'condition_based_services': dict({ - 'is_service_required': False, - 'messages': list([ - dict({ - 'due_date': '2022-10-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - dict({ - 'due_date': '2023-05-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'VEHICLE_CHECK', - 'state': 'OK', - }), - dict({ - 'due_date': '2023-05-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'VEHICLE_TUV', - 'state': 'OK', - }), - ]), - 'next_service_by_distance': None, - 'next_service_by_time': dict({ - 'due_date': '2022-10-01T00:00:00+00:00', - 'due_distance': list([ - None, - None, - ]), - 'service_type': 'BRAKE_FLUID', - 'state': 'OK', - }), - }), - 'data': dict({ - 'attributes': dict({ - 'bodyType': 'I01', - 'brand': 'BMW_I', - 'color': 4284110934, - 'countryOfOrigin': 'CZ', - 'driveTrain': 'ELECTRIC_WITH_RANGE_EXTENDER', - 'driverGuideInfo': dict({ - 'androidAppScheme': 'com.bmwgroup.driversguide.row', - 'androidStoreUrl': 'https://play.google.com/store/apps/details?id=com.bmwgroup.driversguide.row', - 'iosAppScheme': 'bmwdriversguide:///open', - 'iosStoreUrl': 'https://apps.apple.com/de/app/id714042749?mt=8', - }), - 'headUnitRaw': 'MGU_02_L', - 'headUnitType': 'NBT', - 'hmiVersion': 'ID4', - 'model': 'i3 (+ REX)', - 'softwareVersionCurrent': dict({ - 'iStep': 510, - 'puStep': dict({ - 'month': 11, - 'year': 21, - }), - 'seriesCluster': 'I001', - }), - 'softwareVersionExFactory': dict({ - 'iStep': 502, - 'puStep': dict({ - 'month': 3, - 'year': 15, - }), - 'seriesCluster': 'I001', - }), - 'telematicsUnit': 'WAVE01', - 'year': 2015, - }), - 'capabilities': dict({ - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'horn': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isRemoteEngineStartSupported': False, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilitySupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'lock': True, - 'remoteChargingCommands': dict({ - }), - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'unlock': True, - 'vehicleFinder': False, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'charging_settings': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'fetched_at': '2022-07-10T11:00:00+00:00', - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'DELAYED_CHARGING', - 'chargingPreference': 'CHARGING_WINDOW', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 100, - }), - 'climatisationOn': False, - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - ]), - 'reductionOfChargeCurrent': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - }), - 'checkControlMessages': list([ - ]), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 6, - 'minute': 40, - }), - 'isWeeklyTimer': True, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'THURSDAY', - 'SUNDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 12, - 'minute': 50, - }), - 'isWeeklyTimer': False, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'MONDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 18, - 'minute': 59, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - 'WEDNESDAY', - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 105, - 'remainingFuelLiters': 6, - }), - 'currentMileage': 137009, - 'doorsState': dict({ - 'combinedSecurityState': 'UNLOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'CONDUCTIVE', - 'chargingLevelPercent': 82, - 'chargingStatus': 'WAITING_FOR_CHARGING', - 'chargingTarget': 100, - 'isChargerConnected': True, - 'range': 174, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2022-06-22T14:24:23.982Z', - 'lastUpdatedAt': '2022-06-22T13:58:52Z', - 'range': 174, - 'requiredServices': list([ - dict({ - 'dateTime': '2022-10-01T00:00:00.000Z', - 'description': 'Next service due by the specified date.', - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next vehicle check due after the specified distance or date.', - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next state inspection due by the specified date.', - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - }), - 'vin': '**REDACTED**', - }), - 'doors_and_windows': dict({ - 'all_lids_closed': True, - 'all_windows_closed': True, - 'door_lock_state': 'UNLOCKED', - 'lids': list([ - dict({ - 'is_closed': True, - 'name': 'hood', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'leftRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightRear', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'trunk', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'sunRoof', - 'state': 'CLOSED', - }), - ]), - 'open_lids': list([ - ]), - 'open_windows': list([ - ]), - 'windows': list([ - dict({ - 'is_closed': True, - 'name': 'leftFront', - 'state': 'CLOSED', - }), - dict({ - 'is_closed': True, - 'name': 'rightFront', - 'state': 'CLOSED', - }), - ]), - }), - 'drive_train': 'ELECTRIC_WITH_RANGE_EXTENDER', - 'drive_train_attributes': list([ - 'remaining_range_total', - 'mileage', - 'charging_time_remaining', - 'charging_start_time', - 'charging_end_time', - 'charging_time_label', - 'charging_status', - 'connection_status', - 'remaining_battery_percent', - 'remaining_range_electric', - 'last_charging_end_result', - 'ac_current_limit', - 'charging_target', - 'charging_mode', - 'charging_preferences', - 'is_pre_entry_climatization_enabled', - 'remaining_fuel', - 'remaining_range_fuel', - 'remaining_fuel_percent', - ]), - 'fuel_and_battery': dict({ - 'charging_end_time': None, - 'charging_start_time': '2022-07-10T18:01:00', - 'charging_status': 'WAITING_FOR_CHARGING', - 'charging_target': 100, - 'is_charger_connected': True, - 'remaining_battery_percent': 82, - 'remaining_fuel': list([ - 6, - 'L', - ]), - 'remaining_fuel_percent': None, - 'remaining_range_electric': list([ - 174, - 'km', - ]), - 'remaining_range_fuel': list([ - 105, - 'km', - ]), - 'remaining_range_total': list([ - 279, - 'km', - ]), - }), - 'has_combustion_drivetrain': True, - 'has_electric_drivetrain': True, - 'headunit': dict({ - 'headunit_type': 'NBT', - 'idrive_version': 'ID4', - 'software_version': '11/2021.10', - }), - 'is_charging_plan_supported': True, - 'is_charging_settings_supported': False, - 'is_lsc_enabled': True, - 'is_remote_charge_start_enabled': False, - 'is_remote_charge_stop_enabled': False, - 'is_remote_climate_start_enabled': True, - 'is_remote_climate_stop_enabled': False, - 'is_remote_horn_enabled': True, - 'is_remote_lights_enabled': True, - 'is_remote_lock_enabled': True, - 'is_remote_sendpoi_enabled': True, - 'is_remote_set_ac_limit_enabled': False, - 'is_remote_set_target_soc_enabled': False, - 'is_remote_unlock_enabled': True, - 'is_vehicle_active': False, - 'is_vehicle_tracking_enabled': False, - 'lsc_type': 'ACTIVATED', - 'mileage': list([ - 137009, - 'km', - ]), - 'name': 'i3 (+ REX)', - 'timestamp': '2022-06-22T14:24:23+00:00', - 'tires': None, - 'vehicle_location': dict({ - 'account_region': 'row', - 'heading': None, - 'location': None, - 'remote_service_position': None, - 'vehicle_update_timestamp': '2022-06-22T14:24:23+00:00', - }), - 'vin': '**REDACTED**', - }), - 'fingerprint': list([ - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'mini-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'toyota-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'BLUETOOTH', - 'alarmSystem': True, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_2_UWB', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': True, - }), - 'horn': True, - 'inCarCamera': True, - 'inCarCameraDwa': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': True, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - 'chargingControl': list([ - 'START', - 'STOP', - ]), - 'flapControl': list([ - 'NOT_SUPPORTED', - ]), - 'plugControl': list([ - 'NOT_SUPPORTED', - ]), - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - 'state': 'ACTIVATED', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - 'state': 'ACTIVATED', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - 'state': 'ACTIVATED', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': True, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'remainingFuelPercent': 10, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 70, - 'chargingStatus': 'CHARGING', - 'chargingTarget': 80, - 'isChargerConnected': True, - 'range': 340, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.371Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.383Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 340, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'securityOverviewMode': 'ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 261, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 269, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 70, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'HEATING', - 'remainingSeconds': 1790.846, - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 80, - 'chargingStatus': 'INVALID', - 'chargingTarget': 80, - 'isChargerConnected': False, - 'range': 472, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.386Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.407Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 472, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': 'NOT_ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 0, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'VENTILATION', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': False, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': False, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': False, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': False, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 0, - }), - 'departureTimes': list([ - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - dict({ - 'severity': 'LOW', - 'type': 'ENGINE_OIL', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 629, - 'remainingFuelLiters': 40, - 'remainingFuelPercent': 80, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.336Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.348Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 629, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'OIL', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': None, - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT03.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'horn': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isRemoteEngineStartSupported': False, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilitySupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'lock': True, - 'remoteChargingCommands': dict({ - }), - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'unlock': True, - 'vehicleFinder': False, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'DELAYED_CHARGING', - 'chargingPreference': 'CHARGING_WINDOW', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 100, - }), - 'climatisationOn': False, - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - ]), - 'reductionOfChargeCurrent': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - }), - 'checkControlMessages': list([ - ]), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 6, - 'minute': 40, - }), - 'isWeeklyTimer': True, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'THURSDAY', - 'SUNDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 12, - 'minute': 50, - }), - 'isWeeklyTimer': False, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'MONDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 18, - 'minute': 59, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - 'WEDNESDAY', - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 105, - 'remainingFuelLiters': 6, - }), - 'currentMileage': 137009, - 'doorsState': dict({ - 'combinedSecurityState': 'UNLOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'CONDUCTIVE', - 'chargingLevelPercent': 82, - 'chargingStatus': 'WAITING_FOR_CHARGING', - 'chargingTarget': 100, - 'isChargerConnected': True, - 'range': 174, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2022-06-22T14:24:23.982Z', - 'lastUpdatedAt': '2022-06-22T13:58:52Z', - 'range': 174, - 'requiredServices': list([ - dict({ - 'dateTime': '2022-10-01T00:00:00.000Z', - 'description': 'Next service due by the specified date.', - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next vehicle check due after the specified distance or date.', - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next state inspection due by the specified date.', - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - ]), - 'info': dict({ - 'gcid': 'DUMMY', - 'password': '**REDACTED**', - 'refresh_token': '**REDACTED**', - 'region': 'rest_of_world', - 'username': '**REDACTED**', - }), - }) -# --- -# name: test_device_diagnostics_vehicle_not_found - dict({ - 'data': None, - 'fingerprint': list([ - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'mini-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'gcid': 'ceb64158-d2ca-47e9-9ee6-cbffb881434e', - 'mappingInfos': list([ - ]), - }), - 'filename': 'toyota-eadrax-vcs_v5_vehicle-list.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'BLUETOOTH', - 'alarmSystem': True, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_2_UWB', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': True, - }), - 'horn': True, - 'inCarCamera': True, - 'inCarCameraDwa': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': True, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - 'chargingControl': list([ - 'START', - 'STOP', - ]), - 'flapControl': list([ - 'NOT_SUPPORTED', - ]), - 'plugControl': list([ - 'NOT_SUPPORTED', - ]), - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - 'state': 'ACTIVATED', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - 'state': 'ACTIVATED', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - 'state': 'ACTIVATED', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': True, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'remainingFuelPercent': 10, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 70, - 'chargingStatus': 'CHARGING', - 'chargingTarget': 80, - 'isChargerConnected': True, - 'range': 340, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.371Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.383Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 340, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'securityOverviewMode': 'ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 241, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 261, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '275/40 R22 107Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-04-20T00:00:00.000Z', - 'partNumber': '5A401A1', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 269, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 70, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT01.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': True, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': True, - 'isChargingLoudnessEnabled': True, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': True, - 'isChargingSettingsEnabled': True, - 'isChargingTargetSocEnabled': True, - 'isClimateTimerSupported': False, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': True, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': True, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'acCurrentLimit': 16, - 'hospitality': 'NO_ACTION', - 'idcc': 'UNLIMITED_LOUD', - 'targetSoc': 80, - }), - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timeStamp': dict({ - 'hour': 0, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - ]), - 'climateControlState': dict({ - 'activity': 'HEATING', - 'remainingSeconds': 1790.846, - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'UNKNOWN', - 'chargingLevelPercent': 80, - 'chargingStatus': 'INVALID', - 'chargingTarget': 80, - 'isChargerConnected': False, - 'range': 472, - 'remainingChargingMinutes': 10, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.386Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.407Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 472, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': 'NOT_ARMED', - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'targetPressure': 269, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'targetPressure': 303, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'chargingMode': 'Sofort laden', - 'chargingModeSemantics': 'Sofort laden', - 'departureTimer': list([ - 'Aus', - ]), - 'departureTimerSemantics': 'Aus', - 'preconditionForDeparture': 'Aus', - 'showDepartureTimers': False, - }), - 'chargingFlap': dict({ - 'permanentlyUnlockLabel': 'Aus', - }), - 'chargingSettings': dict({ - 'acCurrentLimitLabel': '16A', - 'acCurrentLimitLabelSemantics': '16 Ampere', - 'chargingTargetLabel': '80%', - 'dcLoudnessLabel': 'Nicht begrenzt', - 'unlockCableAutomaticallyLabel': 'Aus', - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'NO_PRESELECTION', - 'endTimeSlot': '0001-01-01T00:00:00', - 'startTimeSlot': '0001-01-01T00:00:00', - 'type': 'CHARGING_IMMEDIATELY', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 1, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 2, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'chargingFlapDetail': dict({ - 'isPermanentlyUnlock': False, - }), - 'chargingSettingsDetail': dict({ - 'acLimit': dict({ - 'current': dict({ - 'unit': 'A', - 'value': 16, - }), - 'isUnlimited': False, - 'max': 32, - 'min': 6, - 'values': list([ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 32, - ]), - }), - 'chargingTarget': 80, - 'dcLoudness': 'UNLIMITED_LOUD', - 'isUnlockCableActive': False, - 'minChargingTargetToWarning': 0, - }), - 'servicePack': 'WAVE_01', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBA0FINGERPRINT02.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'a4aType': 'NOT_SUPPORTED', - 'alarmSystem': False, - 'climateFunction': 'VENTILATION', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'digitalKey': dict({ - 'bookedServicePackage': 'SMACC_1_5', - 'isDigitalKeyFirstSupported': False, - 'readerGraphics': 'readerGraphics', - 'state': 'ACTIVATED', - 'vehicleSoftwareUpgradeRequired': False, - }), - 'horn': True, - 'inCarCamera': False, - 'inCarCameraDwa': False, - 'isBmwChargingSupported': False, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': False, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': False, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isClimateTimerWeeklyActive': False, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': False, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isLocationBasedChargingSettingsSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isPersonalPictureUploadSupported': False, - 'isPlugAndChargeSupported': False, - 'isRemoteEngineStartEnabled': False, - 'isRemoteEngineStartSupported': True, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingEes25Active': False, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilityAccumulatedViewEnabled': False, - 'isSustainabilitySupported': False, - 'isThirdPartyAppStoreSupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'locationBasedCommerceFeatures': dict({ - 'fueling': False, - 'parking': False, - 'reservations': False, - }), - 'lock': True, - 'remote360': True, - 'remoteChargingCommands': dict({ - }), - 'remoteServices': dict({ - 'doorLock': dict({ - 'id': 'doorLock', - 'state': 'ACTIVATED', - }), - 'doorUnlock': dict({ - 'id': 'doorUnlock', - 'state': 'ACTIVATED', - }), - 'hornBlow': dict({ - 'id': 'hornBlow', - 'state': 'ACTIVATED', - }), - 'inCarCamera': dict({ - 'id': 'inCarCamera', - }), - 'inCarCameraDwa': dict({ - 'id': 'inCarCameraDwa', - }), - 'lightFlash': dict({ - 'id': 'lightFlash', - 'state': 'ACTIVATED', - }), - 'remote360': dict({ - 'id': 'remote360', - 'state': 'ACTIVATED', - }), - 'surroundViewRecorder': dict({ - 'id': 'surroundViewRecorder', - }), - }), - 'remoteSoftwareUpgrade': True, - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'speechThirdPartyAlexa': True, - 'speechThirdPartyAlexaSDK': False, - 'surroundViewRecorder': False, - 'unlock': True, - 'vehicleFinder': True, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingMode': 'IMMEDIATE_CHARGING', - 'chargingPreference': 'NO_PRESELECTION', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 0, - }), - 'departureTimes': list([ - ]), - }), - 'checkControlMessages': list([ - dict({ - 'severity': 'LOW', - 'type': 'TIRE_PRESSURE', - }), - dict({ - 'severity': 'LOW', - 'type': 'ENGINE_OIL', - }), - ]), - 'climateControlState': dict({ - 'activity': 'INACTIVE', - }), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': False, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 0, - 'minute': 0, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 629, - 'remainingFuelLiters': 40, - 'remainingFuelPercent': 80, - }), - 'currentMileage': 1121, - 'doorsState': dict({ - 'combinedSecurityState': 'LOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2023-01-04T14:57:06.336Z', - 'lastUpdatedAt': '2023-01-04T14:57:06.348Z', - 'location': dict({ - 'address': dict({ - 'formatted': '**REDACTED**', - }), - 'coordinates': dict({ - 'latitude': '**REDACTED**', - 'longitude': '**REDACTED**', - }), - 'heading': '**REDACTED**', - }), - 'range': 629, - 'requiredServices': list([ - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'OIL', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - dict({ - 'dateTime': '2024-12-01T00:00:00.000Z', - 'description': '', - 'mileage': 50000, - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_REAR', - }), - dict({ - 'status': 'OK', - 'type': 'TIRE_WEAR_FRONT', - }), - ]), - 'securityOverviewMode': None, - 'tireState': dict({ - 'frontLeft': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 4021, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 241, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'frontRight': dict({ - 'details': dict({ - 'dimension': '225/35 R20 90Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 2419, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461756', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 255, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearLeft': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 324, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - 'rearRight': dict({ - 'details': dict({ - 'dimension': '255/30 R20 92Y XL', - 'isOptimizedForOemBmw': True, - 'manufacturer': 'Pirelli', - 'manufacturingWeek': 1219, - 'mountingDate': '2022-03-07T00:00:00.000Z', - 'partNumber': '2461757', - 'season': 2, - 'speedClassification': dict({ - 'atLeast': False, - 'speedRating': 300, - }), - 'treadDesign': 'P-ZERO', - }), - 'status': dict({ - 'currentPressure': 331, - 'pressureStatus': 0, - 'wearStatus': 0, - }), - }), - }), - 'vehicleSoftwareVersion': dict({ - 'iStep': dict({ - 'iStep': 0, - 'month': 0, - 'seriesCluster': '', - 'year': 0, - }), - 'puStep': dict({ - 'month': 0, - 'year': 0, - }), - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBA0FINGERPRINT03.json', - }), - dict({ - 'content': dict({ - 'capabilities': dict({ - 'climateFunction': 'AIR_CONDITIONING', - 'climateNow': True, - 'climateTimerTrigger': 'DEPARTURE_TIMER', - 'horn': True, - 'isBmwChargingSupported': True, - 'isCarSharingSupported': False, - 'isChargeNowForBusinessSupported': False, - 'isChargingHistorySupported': True, - 'isChargingHospitalityEnabled': False, - 'isChargingLoudnessEnabled': False, - 'isChargingPlanSupported': True, - 'isChargingPowerLimitEnabled': False, - 'isChargingSettingsEnabled': False, - 'isChargingTargetSocEnabled': False, - 'isClimateTimerSupported': True, - 'isCustomerEsimSupported': False, - 'isDCSContractManagementSupported': True, - 'isDataPrivacyEnabled': False, - 'isEasyChargeEnabled': False, - 'isEvGoChargingSupported': False, - 'isMiniChargingSupported': False, - 'isNonLscFeatureEnabled': False, - 'isRemoteEngineStartSupported': False, - 'isRemoteHistoryDeletionSupported': False, - 'isRemoteHistorySupported': True, - 'isRemoteParkingSupported': False, - 'isRemoteServicesActivationRequired': False, - 'isRemoteServicesBookingRequired': False, - 'isScanAndChargeSupported': False, - 'isSustainabilitySupported': False, - 'isWifiHotspotServiceSupported': False, - 'lastStateCallState': 'ACTIVATED', - 'lights': True, - 'lock': True, - 'remoteChargingCommands': dict({ - }), - 'sendPoi': True, - 'specialThemeSupport': list([ - ]), - 'unlock': True, - 'vehicleFinder': False, - 'vehicleStateSource': 'LAST_STATE_CALL', - }), - 'state': dict({ - 'chargingProfile': dict({ - 'chargingControlType': 'WEEKLY_PLANNER', - 'chargingMode': 'DELAYED_CHARGING', - 'chargingPreference': 'CHARGING_WINDOW', - 'chargingSettings': dict({ - 'hospitality': 'NO_ACTION', - 'idcc': 'NO_ACTION', - 'targetSoc': 100, - }), - 'climatisationOn': False, - 'departureTimes': list([ - dict({ - 'action': 'DEACTIVATE', - 'id': 1, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 35, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 2, - 'timeStamp': dict({ - 'hour': 18, - 'minute': 0, - }), - 'timerWeekDays': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 3, - 'timeStamp': dict({ - 'hour': 7, - 'minute': 0, - }), - 'timerWeekDays': list([ - ]), - }), - dict({ - 'action': 'DEACTIVATE', - 'id': 4, - 'timerWeekDays': list([ - ]), - }), - ]), - 'reductionOfChargeCurrent': dict({ - 'end': dict({ - 'hour': 1, - 'minute': 30, - }), - 'start': dict({ - 'hour': 18, - 'minute': 1, - }), - }), - }), - 'checkControlMessages': list([ - ]), - 'climateTimers': list([ - dict({ - 'departureTime': dict({ - 'hour': 6, - 'minute': 40, - }), - 'isWeeklyTimer': True, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'THURSDAY', - 'SUNDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 12, - 'minute': 50, - }), - 'isWeeklyTimer': False, - 'timerAction': 'ACTIVATE', - 'timerWeekDays': list([ - 'MONDAY', - ]), - }), - dict({ - 'departureTime': dict({ - 'hour': 18, - 'minute': 59, - }), - 'isWeeklyTimer': True, - 'timerAction': 'DEACTIVATE', - 'timerWeekDays': list([ - 'WEDNESDAY', - ]), - }), - ]), - 'combustionFuelLevel': dict({ - 'range': 105, - 'remainingFuelLiters': 6, - }), - 'currentMileage': 137009, - 'doorsState': dict({ - 'combinedSecurityState': 'UNLOCKED', - 'combinedState': 'CLOSED', - 'hood': 'CLOSED', - 'leftFront': 'CLOSED', - 'leftRear': 'CLOSED', - 'rightFront': 'CLOSED', - 'rightRear': 'CLOSED', - 'trunk': 'CLOSED', - }), - 'driverPreferences': dict({ - 'lscPrivacyMode': 'OFF', - }), - 'electricChargingState': dict({ - 'chargingConnectionType': 'CONDUCTIVE', - 'chargingLevelPercent': 82, - 'chargingStatus': 'WAITING_FOR_CHARGING', - 'chargingTarget': 100, - 'isChargerConnected': True, - 'range': 174, - }), - 'isLeftSteering': True, - 'isLscSupported': True, - 'lastFetched': '2022-06-22T14:24:23.982Z', - 'lastUpdatedAt': '2022-06-22T13:58:52Z', - 'range': 174, - 'requiredServices': list([ - dict({ - 'dateTime': '2022-10-01T00:00:00.000Z', - 'description': 'Next service due by the specified date.', - 'status': 'OK', - 'type': 'BRAKE_FLUID', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next vehicle check due after the specified distance or date.', - 'status': 'OK', - 'type': 'VEHICLE_CHECK', - }), - dict({ - 'dateTime': '2023-05-01T00:00:00.000Z', - 'description': 'Next state inspection due by the specified date.', - 'status': 'OK', - 'type': 'VEHICLE_TUV', - }), - ]), - 'roofState': dict({ - 'roofState': 'CLOSED', - 'roofStateType': 'SUN_ROOF', - }), - 'windowsState': dict({ - 'combinedState': 'CLOSED', - 'leftFront': 'CLOSED', - 'rightFront': 'CLOSED', - }), - }), - }), - 'filename': 'bmw-eadrax-vcs_v4_vehicles_state_WBY0FINGERPRINT04.json', - }), - dict({ - 'content': dict({ - 'chargeAndClimateSettings': dict({ - 'chargeAndClimateTimer': dict({ - 'showDepartureTimers': False, - }), - }), - 'chargeAndClimateTimerDetail': dict({ - 'chargingMode': dict({ - 'chargingPreference': 'CHARGING_WINDOW', - 'endTimeSlot': '0001-01-01T01:30:00', - 'startTimeSlot': '0001-01-01T18:01:00', - 'type': 'TIME_SLOT', - }), - 'departureTimer': dict({ - 'type': 'WEEKLY_DEPARTURE_TIMER', - 'weeklyTimers': list([ - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - ]), - 'id': 1, - 'time': '0001-01-01T07:35:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - 'SATURDAY', - 'SUNDAY', - ]), - 'id': 2, - 'time': '0001-01-01T18:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 3, - 'time': '0001-01-01T07:00:00', - 'timerAction': 'DEACTIVATE', - }), - dict({ - 'daysOfTheWeek': list([ - ]), - 'id': 4, - 'time': '0001-01-01T00:00:00', - 'timerAction': 'DEACTIVATE', - }), - ]), - }), - 'isPreconditionForDepartureActive': False, - }), - 'servicePack': 'TCB1', - }), - 'filename': 'bmw-eadrax-crccs_v2_vehicles_WBY0FINGERPRINT04.json', - }), - ]), - 'info': dict({ - 'gcid': 'DUMMY', - 'password': '**REDACTED**', - 'refresh_token': '**REDACTED**', - 'region': 'rest_of_world', - 'username': '**REDACTED**', - }), - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_lock.ambr b/tests/components/bmw_connected_drive/snapshots/test_lock.ambr deleted file mode 100644 index 72c6fb570cb..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_lock.ambr +++ /dev/null @@ -1,205 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[lock.i3_rex_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': 'lock', - 'entity_category': None, - 'entity_id': 'lock.i3_rex_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lock', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lock', - 'unique_id': 'WBY00000000REXI01-lock', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[lock.i3_rex_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'door_lock_state': 'UNLOCKED', - 'friendly_name': 'i3 (+ REX) Lock', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.i3_rex_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unlocked', - }) -# --- -# name: test_entity_state_attrs[lock.i4_edrive40_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': 'lock', - 'entity_category': None, - 'entity_id': 'lock.i4_edrive40_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lock', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lock', - 'unique_id': 'WBA00000000DEMO02-lock', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[lock.i4_edrive40_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'door_lock_state': 'LOCKED', - 'friendly_name': 'i4 eDrive40 Lock', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.i4_edrive40_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'locked', - }) -# --- -# name: test_entity_state_attrs[lock.ix_xdrive50_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': 'lock', - 'entity_category': None, - 'entity_id': 'lock.ix_xdrive50_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lock', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lock', - 'unique_id': 'WBA00000000DEMO01-lock', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[lock.ix_xdrive50_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'door_lock_state': 'LOCKED', - 'friendly_name': 'iX xDrive50 Lock', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.ix_xdrive50_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'locked', - }) -# --- -# name: test_entity_state_attrs[lock.m340i_xdrive_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': 'lock', - 'entity_category': None, - 'entity_id': 'lock.m340i_xdrive_lock', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Lock', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Lock', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'lock', - 'unique_id': 'WBA00000000DEMO03-lock', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[lock.m340i_xdrive_lock-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'door_lock_state': 'LOCKED', - 'friendly_name': 'M340i xDrive Lock', - 'supported_features': , - }), - 'context': , - 'entity_id': 'lock.m340i_xdrive_lock', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'locked', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_number.ambr b/tests/components/bmw_connected_drive/snapshots/test_number.ambr deleted file mode 100644 index 6a00c737599..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_number.ambr +++ /dev/null @@ -1,119 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[number.i4_edrive40_target_soc-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'max': 100.0, - 'min': 20.0, - 'mode': , - 'step': 5.0, - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'number', - 'entity_category': None, - 'entity_id': 'number.i4_edrive40_target_soc', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Target SoC', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Target SoC', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'target_soc', - 'unique_id': 'WBA00000000DEMO02-target_soc', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[number.i4_edrive40_target_soc-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'i4 eDrive40 Target SoC', - 'max': 100.0, - 'min': 20.0, - 'mode': , - 'step': 5.0, - }), - 'context': , - 'entity_id': 'number.i4_edrive40_target_soc', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- -# name: test_entity_state_attrs[number.ix_xdrive50_target_soc-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'max': 100.0, - 'min': 20.0, - 'mode': , - 'step': 5.0, - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'number', - 'entity_category': None, - 'entity_id': 'number.ix_xdrive50_target_soc', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Target SoC', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Target SoC', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'target_soc', - 'unique_id': 'WBA00000000DEMO01-target_soc', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[number.ix_xdrive50_target_soc-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'iX xDrive50 Target SoC', - 'max': 100.0, - 'min': 20.0, - 'mode': , - 'step': 5.0, - }), - 'context': , - 'entity_id': 'number.ix_xdrive50_target_soc', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_select.ambr b/tests/components/bmw_connected_drive/snapshots/test_select.ambr deleted file mode 100644 index e3282b9599d..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_select.ambr +++ /dev/null @@ -1,343 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[select.i3_rex_charging_mode-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.i3_rex_charging_mode', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging mode', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging mode', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_mode', - 'unique_id': 'WBY00000000REXI01-charging_mode', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[select.i3_rex_charging_mode-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Charging mode', - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'context': , - 'entity_id': 'select.i3_rex_charging_mode', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'delayed_charging', - }) -# --- -# name: test_entity_state_attrs[select.i4_edrive40_ac_charging_limit-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - '6', - '7', - '8', - '9', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '20', - '32', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.i4_edrive40_ac_charging_limit', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'AC charging limit', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'AC charging limit', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'ac_limit', - 'unique_id': 'WBA00000000DEMO02-ac_limit', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[select.i4_edrive40_ac_charging_limit-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 AC charging limit', - 'options': list([ - '6', - '7', - '8', - '9', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '20', - '32', - ]), - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'select.i4_edrive40_ac_charging_limit', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '16', - }) -# --- -# name: test_entity_state_attrs[select.i4_edrive40_charging_mode-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.i4_edrive40_charging_mode', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging mode', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging mode', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_mode', - 'unique_id': 'WBA00000000DEMO02-charging_mode', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[select.i4_edrive40_charging_mode-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Charging mode', - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'context': , - 'entity_id': 'select.i4_edrive40_charging_mode', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'immediate_charging', - }) -# --- -# name: test_entity_state_attrs[select.ix_xdrive50_ac_charging_limit-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - '6', - '7', - '8', - '9', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '20', - '32', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.ix_xdrive50_ac_charging_limit', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'AC charging limit', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'AC charging limit', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'ac_limit', - 'unique_id': 'WBA00000000DEMO01-ac_limit', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[select.ix_xdrive50_ac_charging_limit-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 AC charging limit', - 'options': list([ - '6', - '7', - '8', - '9', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '20', - '32', - ]), - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'select.ix_xdrive50_ac_charging_limit', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '16', - }) -# --- -# name: test_entity_state_attrs[select.ix_xdrive50_charging_mode-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'select', - 'entity_category': None, - 'entity_id': 'select.ix_xdrive50_charging_mode', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging mode', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging mode', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_mode', - 'unique_id': 'WBA00000000DEMO01-charging_mode', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[select.ix_xdrive50_charging_mode-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Charging mode', - 'options': list([ - 'immediate_charging', - 'delayed_charging', - 'no_action', - ]), - }), - 'context': , - 'entity_id': 'select.ix_xdrive50_charging_mode', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'immediate_charging', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_sensor.ambr b/tests/components/bmw_connected_drive/snapshots/test_sensor.ambr deleted file mode 100644 index d54fe87c4fd..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_sensor.ambr +++ /dev/null @@ -1,3632 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[sensor.i3_rex_ac_current_limit-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.i3_rex_ac_current_limit', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'AC current limit', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'AC current limit', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'ac_current_limit', - 'unique_id': 'WBY00000000REXI01-charging_profile.ac_current_limit', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_ac_current_limit-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'i3 (+ REX) AC current limit', - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_ac_current_limit', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_end_time-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.i3_rex_charging_end_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging end time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging end time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_end_time', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.charging_end_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_end_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'i3 (+ REX) Charging end time', - }), - 'context': , - 'entity_id': 'sensor.i3_rex_charging_end_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_start_time-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.i3_rex_charging_start_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging start time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging start time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_start_time', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.charging_start_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_start_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'i3 (+ REX) Charging start time', - }), - 'context': , - 'entity_id': 'sensor.i3_rex_charging_start_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-06-23T01:01:00+00:00', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.i3_rex_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'i3 (+ REX) Charging status', - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'context': , - 'entity_id': 'sensor.i3_rex_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'waiting_for_charging', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_target-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.i3_rex_charging_target', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging target', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging target', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_target', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.charging_target', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_charging_target-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Charging target', - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.i3_rex_charging_target', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '100', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_mileage-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.i3_rex_mileage', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Mileage', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Mileage', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'mileage', - 'unique_id': 'WBY00000000REXI01-mileage', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_mileage-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i3 (+ REX) Mileage', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_mileage', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '137009', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_battery_percent-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.i3_rex_remaining_battery_percent', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining battery percent', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining battery percent', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_battery_percent', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_battery_percent', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_battery_percent-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'i3 (+ REX) Remaining battery percent', - 'state_class': , - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_battery_percent', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '82', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_fuel-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.i3_rex_remaining_fuel', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining fuel', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining fuel', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_fuel', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_fuel', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_fuel-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'volume_storage', - 'friendly_name': 'i3 (+ REX) Remaining fuel', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_fuel', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '6', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_fuel_percent-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.i3_rex_remaining_fuel_percent', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining fuel percent', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Remaining fuel percent', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_fuel_percent', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_fuel_percent', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_fuel_percent-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i3 (+ REX) Remaining fuel percent', - 'state_class': , - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_fuel_percent', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_electric-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.i3_rex_remaining_range_electric', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range electric', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range electric', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_electric', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_range_electric', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_electric-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i3 (+ REX) Remaining range electric', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_range_electric', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '174', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_fuel-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.i3_rex_remaining_range_fuel', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range fuel', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range fuel', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_fuel', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_range_fuel', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_fuel-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i3 (+ REX) Remaining range fuel', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_range_fuel', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '105', - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_total-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.i3_rex_remaining_range_total', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range total', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range total', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_total', - 'unique_id': 'WBY00000000REXI01-fuel_and_battery.remaining_range_total', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i3_rex_remaining_range_total-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i3 (+ REX) Remaining range total', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i3_rex_remaining_range_total', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '279', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_ac_current_limit-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.i4_edrive40_ac_current_limit', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'AC current limit', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'AC current limit', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'ac_current_limit', - 'unique_id': 'WBA00000000DEMO02-charging_profile.ac_current_limit', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_ac_current_limit-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'i4 eDrive40 AC current limit', - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_ac_current_limit', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '16', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_end_time-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.i4_edrive40_charging_end_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging end time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging end time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_end_time', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.charging_end_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_end_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'i4 eDrive40 Charging end time', - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_charging_end_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-06-22T10:40:00+00:00', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_start_time-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.i4_edrive40_charging_start_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging start time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging start time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_start_time', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.charging_start_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_start_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'i4 eDrive40 Charging start time', - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_charging_start_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.i4_edrive40_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'i4 eDrive40 Charging status', - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'not_charging', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_target-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.i4_edrive40_charging_target', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging target', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging target', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_target', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.charging_target', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_charging_target-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Charging target', - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_charging_target', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_climate_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.i4_edrive40_climate_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Climate status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate_status', - 'unique_id': 'WBA00000000DEMO02-climate.activity', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_climate_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'i4 eDrive40 Climate status', - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_climate_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'heating', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_left_target_pressure-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.i4_edrive40_front_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_target_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.front_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Front left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_front_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.69', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_left_tire_pressure-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.i4_edrive40_front_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_current_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.front_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Front left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_front_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_right_target_pressure-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.i4_edrive40_front_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_target_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.front_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Front right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_front_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.69', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_right_tire_pressure-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.i4_edrive40_front_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_current_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.front_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_front_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Front right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_front_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.55', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_mileage-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.i4_edrive40_mileage', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Mileage', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Mileage', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'mileage', - 'unique_id': 'WBA00000000DEMO02-mileage', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_mileage-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i4 eDrive40 Mileage', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_mileage', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '1121', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_left_target_pressure-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.i4_edrive40_rear_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_target_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.rear_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Rear left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_rear_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.03', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_left_tire_pressure-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.i4_edrive40_rear_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_current_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.rear_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Rear left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_rear_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.24', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_right_target_pressure-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.i4_edrive40_rear_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_target_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.rear_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Rear right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_rear_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.03', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_right_tire_pressure-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.i4_edrive40_rear_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_current_pressure', - 'unique_id': 'WBA00000000DEMO02-tires.rear_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_rear_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'i4 eDrive40 Rear right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_rear_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.31', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_battery_percent-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.i4_edrive40_remaining_battery_percent', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining battery percent', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining battery percent', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_battery_percent', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.remaining_battery_percent', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_battery_percent-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'i4 eDrive40 Remaining battery percent', - 'state_class': , - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_remaining_battery_percent', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_range_electric-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.i4_edrive40_remaining_range_electric', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range electric', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range electric', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_electric', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.remaining_range_electric', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_range_electric-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i4 eDrive40 Remaining range electric', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_remaining_range_electric', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '472', - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_range_total-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.i4_edrive40_remaining_range_total', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range total', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range total', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_total', - 'unique_id': 'WBA00000000DEMO02-fuel_and_battery.remaining_range_total', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.i4_edrive40_remaining_range_total-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'i4 eDrive40 Remaining range total', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.i4_edrive40_remaining_range_total', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '472', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_ac_current_limit-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.ix_xdrive50_ac_current_limit', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'AC current limit', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'AC current limit', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'ac_current_limit', - 'unique_id': 'WBA00000000DEMO01-charging_profile.ac_current_limit', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_ac_current_limit-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'iX xDrive50 AC current limit', - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_ac_current_limit', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '16', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_end_time-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.ix_xdrive50_charging_end_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging end time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging end time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_end_time', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.charging_end_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_end_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'iX xDrive50 Charging end time', - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_charging_end_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2023-06-22T10:40:00+00:00', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_start_time-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.ix_xdrive50_charging_start_time', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging start time', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging start time', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_start_time', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.charging_start_time', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_start_time-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'iX xDrive50 Charging start time', - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_charging_start_time', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.ix_xdrive50_charging_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Charging status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_status', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.charging_status', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'iX xDrive50 Charging status', - 'options': list([ - 'default', - 'charging', - 'error', - 'complete', - 'fully_charged', - 'finished_fully_charged', - 'finished_not_full', - 'invalid', - 'not_charging', - 'plugged_in', - 'waiting_for_charging', - 'target_reached', - ]), - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_charging_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'charging', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_target-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.ix_xdrive50_charging_target', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging target', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging target', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging_target', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.charging_target', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_charging_target-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Charging target', - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_charging_target', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_climate_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.ix_xdrive50_climate_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Climate status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate_status', - 'unique_id': 'WBA00000000DEMO01-climate.activity', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_climate_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'iX xDrive50 Climate status', - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_climate_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'inactive', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_left_target_pressure-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.ix_xdrive50_front_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_target_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.front_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Front left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_front_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_left_tire_pressure-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.ix_xdrive50_front_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_current_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.front_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Front left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_front_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_right_target_pressure-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.ix_xdrive50_front_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_target_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.front_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Front right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_front_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_right_tire_pressure-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.ix_xdrive50_front_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_current_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.front_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_front_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Front right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_front_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_mileage-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.ix_xdrive50_mileage', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Mileage', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Mileage', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'mileage', - 'unique_id': 'WBA00000000DEMO01-mileage', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_mileage-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'iX xDrive50 Mileage', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_mileage', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '1121', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_left_target_pressure-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.ix_xdrive50_rear_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_target_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.rear_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Rear left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_rear_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.69', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_left_tire_pressure-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.ix_xdrive50_rear_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_current_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.rear_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Rear left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_rear_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.61', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_right_target_pressure-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.ix_xdrive50_rear_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_target_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.rear_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Rear right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_rear_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.69', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_right_tire_pressure-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.ix_xdrive50_rear_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_current_pressure', - 'unique_id': 'WBA00000000DEMO01-tires.rear_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_rear_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'iX xDrive50 Rear right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_rear_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.69', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_battery_percent-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.ix_xdrive50_remaining_battery_percent', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining battery percent', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining battery percent', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_battery_percent', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.remaining_battery_percent', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_battery_percent-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'iX xDrive50 Remaining battery percent', - 'state_class': , - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_remaining_battery_percent', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '70', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_range_electric-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.ix_xdrive50_remaining_range_electric', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range electric', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range electric', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_electric', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.remaining_range_electric', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_range_electric-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'iX xDrive50 Remaining range electric', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_remaining_range_electric', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '340', - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_range_total-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.ix_xdrive50_remaining_range_total', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range total', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range total', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_total', - 'unique_id': 'WBA00000000DEMO01-fuel_and_battery.remaining_range_total', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.ix_xdrive50_remaining_range_total-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'iX xDrive50 Remaining range total', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.ix_xdrive50_remaining_range_total', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '340', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_climate_status-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.m340i_xdrive_climate_status', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate status', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Climate status', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate_status', - 'unique_id': 'WBA00000000DEMO03-climate.activity', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_climate_status-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'M340i xDrive Climate status', - 'options': list([ - 'cooling', - 'heating', - 'ventilation', - 'inactive', - 'standby', - ]), - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_climate_status', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'inactive', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_left_target_pressure-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.m340i_xdrive_front_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_target_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.front_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Front left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_front_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_left_tire_pressure-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.m340i_xdrive_front_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_left_current_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.front_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Front left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_front_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.41', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_right_target_pressure-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.m340i_xdrive_front_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_target_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.front_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Front right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_front_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_right_tire_pressure-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.m340i_xdrive_front_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Front right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Front right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'front_right_current_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.front_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_front_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Front right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_front_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '2.55', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_mileage-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.m340i_xdrive_mileage', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Mileage', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Mileage', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'mileage', - 'unique_id': 'WBA00000000DEMO03-mileage', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_mileage-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'M340i xDrive Mileage', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_mileage', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '1121', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_left_target_pressure-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.m340i_xdrive_rear_left_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_target_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.rear_left.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_left_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Rear left target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_rear_left_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_left_tire_pressure-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.m340i_xdrive_rear_left_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear left tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear left tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_left_current_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.rear_left.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_left_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Rear left tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_rear_left_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.24', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_right_target_pressure-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.m340i_xdrive_rear_right_target_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right target pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right target pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_target_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.rear_right.target_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_right_target_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Rear right target pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_rear_right_target_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_right_tire_pressure-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.m340i_xdrive_rear_right_tire_pressure', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Rear right tire pressure', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Rear right tire pressure', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'rear_right_current_pressure', - 'unique_id': 'WBA00000000DEMO03-tires.rear_right.current_pressure', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_rear_right_tire_pressure-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'M340i xDrive Rear right tire pressure', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_rear_right_tire_pressure', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '3.31', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_fuel-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.m340i_xdrive_remaining_fuel', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining fuel', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining fuel', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_fuel', - 'unique_id': 'WBA00000000DEMO03-fuel_and_battery.remaining_fuel', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_fuel-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'volume_storage', - 'friendly_name': 'M340i xDrive Remaining fuel', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_remaining_fuel', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '40', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_fuel_percent-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.m340i_xdrive_remaining_fuel_percent', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining fuel percent', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Remaining fuel percent', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_fuel_percent', - 'unique_id': 'WBA00000000DEMO03-fuel_and_battery.remaining_fuel_percent', - 'unit_of_measurement': '%', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_fuel_percent-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Remaining fuel percent', - 'state_class': , - 'unit_of_measurement': '%', - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_remaining_fuel_percent', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '80', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_range_fuel-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.m340i_xdrive_remaining_range_fuel', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range fuel', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range fuel', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_fuel', - 'unique_id': 'WBA00000000DEMO03-fuel_and_battery.remaining_range_fuel', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_range_fuel-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'M340i xDrive Remaining range fuel', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_remaining_range_fuel', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '629', - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_range_total-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.m340i_xdrive_remaining_range_total', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Remaining range total', - 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Remaining range total', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'remaining_range_total', - 'unique_id': 'WBA00000000DEMO03-fuel_and_battery.remaining_range_total', - 'unit_of_measurement': , - }) -# --- -# name: test_entity_state_attrs[sensor.m340i_xdrive_remaining_range_total-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'distance', - 'friendly_name': 'M340i xDrive Remaining range total', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.m340i_xdrive_remaining_range_total', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': '629', - }) -# --- diff --git a/tests/components/bmw_connected_drive/snapshots/test_switch.ambr b/tests/components/bmw_connected_drive/snapshots/test_switch.ambr deleted file mode 100644 index cafae0a3913..00000000000 --- a/tests/components/bmw_connected_drive/snapshots/test_switch.ambr +++ /dev/null @@ -1,197 +0,0 @@ -# serializer version: 1 -# name: test_entity_state_attrs[switch.i4_edrive40_climate-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.i4_edrive40_climate', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Climate', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate', - 'unique_id': 'WBA00000000DEMO02-climate', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[switch.i4_edrive40_climate-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'i4 eDrive40 Climate', - }), - 'context': , - 'entity_id': 'switch.i4_edrive40_climate', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[switch.ix_xdrive50_charging-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.ix_xdrive50_charging', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Charging', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Charging', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'charging', - 'unique_id': 'WBA00000000DEMO01-charging', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[switch.ix_xdrive50_charging-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Charging', - }), - 'context': , - 'entity_id': 'switch.ix_xdrive50_charging', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'on', - }) -# --- -# name: test_entity_state_attrs[switch.ix_xdrive50_climate-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.ix_xdrive50_climate', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Climate', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate', - 'unique_id': 'WBA00000000DEMO01-climate', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[switch.ix_xdrive50_climate-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'iX xDrive50 Climate', - }), - 'context': , - 'entity_id': 'switch.ix_xdrive50_climate', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- -# name: test_entity_state_attrs[switch.m340i_xdrive_climate-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.m340i_xdrive_climate', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Climate', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Climate', - 'platform': 'bmw_connected_drive', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'climate', - 'unique_id': 'WBA00000000DEMO03-climate', - 'unit_of_measurement': None, - }) -# --- -# name: test_entity_state_attrs[switch.m340i_xdrive_climate-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'M340i xDrive Climate', - }), - 'context': , - 'entity_id': 'switch.m340i_xdrive_climate', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- diff --git a/tests/components/bmw_connected_drive/test_binary_sensor.py b/tests/components/bmw_connected_drive/test_binary_sensor.py deleted file mode 100644 index f45a97aca86..00000000000 --- a/tests/components/bmw_connected_drive/test_binary_sensor.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Test BMW binary sensors.""" - -from unittest.mock import patch - -import pytest -from syrupy.assertion import SnapshotAssertion - -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.helpers import entity_registry as er - -from . import setup_mocked_integration - -from tests.common import snapshot_platform - - -@pytest.mark.freeze_time("2023-06-22 10:30:00+00:00") -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test binary sensor states and attributes.""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", - [Platform.BINARY_SENSOR], - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) diff --git a/tests/components/bmw_connected_drive/test_button.py b/tests/components/bmw_connected_drive/test_button.py deleted file mode 100644 index 356cfcb439e..00000000000 --- a/tests/components/bmw_connected_drive/test_button.py +++ /dev/null @@ -1,210 +0,0 @@ -"""Test BMW buttons.""" - -from unittest.mock import AsyncMock, patch - -from bimmer_connected.models import MyBMWRemoteServiceError -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx -from syrupy.assertion import SnapshotAssertion - -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import entity_registry as er - -from . import ( - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - -from tests.common import snapshot_platform - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test button options and values.""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", - [Platform.BUTTON], - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.parametrize( - ("entity_id", "remote_service"), - [ - ("button.i4_edrive40_flash_lights", "light-flash"), - ("button.i4_edrive40_sound_horn", "horn-blow"), - ], -) -async def test_service_call_success( - hass: HomeAssistant, - entity_id: str, - remote_service: str, - bmw_fixture: respx.Router, -) -> None: - """Test successful button press.""" - - # Setup component - assert await setup_mocked_integration(hass) - - # Test - await hass.services.async_call( - "button", - "press", - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service) - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_service_call_fail( - hass: HomeAssistant, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test failed button press.""" - - # Setup component - assert await setup_mocked_integration(hass) - entity_id = "switch.i4_edrive40_climate" - old_value = hass.states.get(entity_id).state - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock( - side_effect=MyBMWRemoteServiceError("HTTPStatusError: 502 Bad Gateway") - ), - ) - - # Test - with pytest.raises(HomeAssistantError, match=REMOTE_SERVICE_EXC_TRANSLATION): - await hass.services.async_call( - "button", - "press", - blocking=True, - target={"entity_id": "button.i4_edrive40_activate_air_conditioning"}, - ) - assert hass.states.get(entity_id).state == old_value - - -@pytest.mark.parametrize( - ( - "entity_id", - "state_entity_id", - "new_value", - "old_value", - "remote_service", - "remote_service_params", - ), - [ - ( - "button.i4_edrive40_activate_air_conditioning", - "switch.i4_edrive40_climate", - "on", - "off", - "climate-now", - {"action": "START"}, - ), - ( - "button.i4_edrive40_deactivate_air_conditioning", - "switch.i4_edrive40_climate", - "off", - "on", - "climate-now", - {"action": "STOP"}, - ), - ( - "button.i4_edrive40_find_vehicle", - "device_tracker.i4_edrive40", - "not_home", - "home", - "vehicle-finder", - {}, - ), - ], -) -async def test_service_call_success_state_change( - hass: HomeAssistant, - entity_id: str, - state_entity_id: str, - new_value: str, - old_value: str, - remote_service: str, - remote_service_params: dict, - bmw_fixture: respx.Router, -) -> None: - """Test successful button press with state change.""" - - # Setup component - assert await setup_mocked_integration(hass) - hass.states.async_set(state_entity_id, old_value) - assert hass.states.get(state_entity_id).state == old_value - - # Test - await hass.services.async_call( - "button", - "press", - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service, remote_service_params) - assert hass.states.get(state_entity_id).state == new_value - - -@pytest.mark.parametrize( - ("entity_id", "state_entity_id", "new_attrs", "old_attrs"), - [ - ( - "button.i4_edrive40_find_vehicle", - "device_tracker.i4_edrive40", - {"latitude": 12.345, "longitude": 34.5678, "direction": 121}, - {"latitude": 48.177334, "longitude": 11.556274, "direction": 180}, - ), - ], -) -async def test_service_call_success_attr_change( - hass: HomeAssistant, - entity_id: str, - state_entity_id: str, - new_attrs: dict, - old_attrs: dict, - bmw_fixture: respx.Router, -) -> None: - """Test successful button press with attribute change.""" - - # Setup component - assert await setup_mocked_integration(hass) - - assert { - k: v - for k, v in hass.states.get(state_entity_id).attributes.items() - if k in old_attrs - } == old_attrs - - # Test - await hass.services.async_call( - "button", - "press", - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture) - assert { - k: v - for k, v in hass.states.get(state_entity_id).attributes.items() - if k in new_attrs - } == new_attrs diff --git a/tests/components/bmw_connected_drive/test_config_flow.py b/tests/components/bmw_connected_drive/test_config_flow.py deleted file mode 100644 index 9c63ecbf305..00000000000 --- a/tests/components/bmw_connected_drive/test_config_flow.py +++ /dev/null @@ -1,311 +0,0 @@ -"""Test the for the BMW Connected Drive config flow.""" - -from copy import deepcopy -from unittest.mock import patch - -from bimmer_connected.api.authentication import MyBMWAuthentication -from bimmer_connected.models import MyBMWAPIError, MyBMWAuthError -from httpx import RequestError -import pytest - -from homeassistant import config_entries -from homeassistant.components.bmw_connected_drive.config_flow import DOMAIN -from homeassistant.components.bmw_connected_drive.const import ( - CONF_CAPTCHA_TOKEN, - CONF_READ_ONLY, - CONF_REFRESH_TOKEN, -) -from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME -from homeassistant.core import HomeAssistant -from homeassistant.data_entry_flow import FlowResultType - -from . import ( - BIMMER_CONNECTED_LOGIN_PATCH, - BIMMER_CONNECTED_VEHICLE_PATCH, - FIXTURE_CAPTCHA_INPUT, - FIXTURE_CONFIG_ENTRY, - FIXTURE_GCID, - FIXTURE_REFRESH_TOKEN, - FIXTURE_USER_INPUT, - FIXTURE_USER_INPUT_W_CAPTCHA, -) - -from tests.common import MockConfigEntry - -FIXTURE_COMPLETE_ENTRY = FIXTURE_CONFIG_ENTRY["data"] -FIXTURE_IMPORT_ENTRY = {**FIXTURE_USER_INPUT, CONF_REFRESH_TOKEN: None} - - -def login_sideeffect(self: MyBMWAuthentication): - """Mock logging in and setting a refresh token.""" - self.refresh_token = FIXTURE_REFRESH_TOKEN - self.gcid = FIXTURE_GCID - - -async def test_full_user_flow_implementation(hass: HomeAssistant) -> None: - """Test registering an integration and finishing flow works.""" - with ( - patch( - BIMMER_CONNECTED_LOGIN_PATCH, - side_effect=login_sideeffect, - autospec=True, - ), - patch( - "homeassistant.components.bmw_connected_drive.async_setup_entry", - return_value=True, - ) as mock_setup_entry, - ): - result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data=deepcopy(FIXTURE_USER_INPUT), - ) - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "captcha" - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], FIXTURE_CAPTCHA_INPUT - ) - - assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["title"] == FIXTURE_COMPLETE_ENTRY[CONF_USERNAME] - assert result["data"] == FIXTURE_COMPLETE_ENTRY - assert ( - result["result"].unique_id - == f"{FIXTURE_USER_INPUT[CONF_REGION]}-{FIXTURE_USER_INPUT[CONF_USERNAME]}" - ) - - assert len(mock_setup_entry.mock_calls) == 1 - - -@pytest.mark.parametrize( - ("side_effect", "error"), - [ - (MyBMWAuthError("Login failed"), "invalid_auth"), - (RequestError("Connection reset"), "cannot_connect"), - (MyBMWAPIError("400 Bad Request"), "cannot_connect"), - ], -) -async def test_error_display_with_successful_login( - hass: HomeAssistant, side_effect: Exception, error: str -) -> None: - """Test we show user form on MyBMW authentication error and are still able to succeed.""" - - with patch( - BIMMER_CONNECTED_LOGIN_PATCH, - side_effect=side_effect, - ): - result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data=deepcopy(FIXTURE_USER_INPUT_W_CAPTCHA), - ) - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "user" - assert result["errors"] == {"base": error} - - with ( - patch( - BIMMER_CONNECTED_LOGIN_PATCH, - side_effect=login_sideeffect, - autospec=True, - ), - patch( - "homeassistant.components.bmw_connected_drive.async_setup_entry", - return_value=True, - ) as mock_setup_entry, - ): - result = await hass.config_entries.flow.async_configure( - result["flow_id"], - deepcopy(FIXTURE_USER_INPUT), - ) - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "captcha" - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], FIXTURE_CAPTCHA_INPUT - ) - - assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["title"] == FIXTURE_COMPLETE_ENTRY[CONF_USERNAME] - assert result["data"] == FIXTURE_COMPLETE_ENTRY - assert ( - result["result"].unique_id - == f"{FIXTURE_USER_INPUT[CONF_REGION]}-{FIXTURE_USER_INPUT[CONF_USERNAME]}" - ) - - assert len(mock_setup_entry.mock_calls) == 1 - - -async def test_unique_id_existing(hass: HomeAssistant) -> None: - """Test registering an integration and when the unique id already exists.""" - - mock_config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - mock_config_entry.add_to_hass(hass) - - with ( - patch( - BIMMER_CONNECTED_LOGIN_PATCH, - side_effect=login_sideeffect, - autospec=True, - ), - ): - result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data=deepcopy(FIXTURE_USER_INPUT), - ) - - assert result["type"] is FlowResultType.ABORT - assert result["reason"] == "already_configured" - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_captcha_flow_missing_error(hass: HomeAssistant) -> None: - """Test the external flow with captcha failing once and succeeding the second time.""" - - result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data=deepcopy(FIXTURE_USER_INPUT), - ) - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "captcha" - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], {CONF_CAPTCHA_TOKEN: " "} - ) - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "user" - assert result["errors"] == {"base": "missing_captcha"} - - -async def test_options_flow_implementation(hass: HomeAssistant) -> None: - """Test config flow options.""" - with ( - patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - return_value=[], - ), - patch( - "homeassistant.components.bmw_connected_drive.async_setup_entry", - return_value=True, - ) as mock_setup_entry, - ): - config_entry_args = deepcopy(FIXTURE_CONFIG_ENTRY) - config_entry = MockConfigEntry(**config_entry_args) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - result = await hass.config_entries.options.async_init(config_entry.entry_id) - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "account_options" - - result = await hass.config_entries.options.async_configure( - result["flow_id"], - user_input={CONF_READ_ONLY: True}, - ) - await hass.async_block_till_done() - - assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["data"] == { - CONF_READ_ONLY: True, - } - - assert len(mock_setup_entry.mock_calls) == 2 - - -async def test_reauth(hass: HomeAssistant) -> None: - """Test the reauth form.""" - with ( - patch( - BIMMER_CONNECTED_LOGIN_PATCH, - side_effect=login_sideeffect, - autospec=True, - ), - patch( - "homeassistant.components.bmw_connected_drive.async_setup_entry", - return_value=True, - ) as mock_setup_entry, - ): - wrong_password = "wrong" - - config_entry_with_wrong_password = deepcopy(FIXTURE_CONFIG_ENTRY) - config_entry_with_wrong_password["data"][CONF_PASSWORD] = wrong_password - - config_entry = MockConfigEntry(**config_entry_with_wrong_password) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - assert config_entry.data == config_entry_with_wrong_password["data"] - - result = await config_entry.start_reauth_flow(hass) - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "change_password" - assert set(result["data_schema"].schema) == {CONF_PASSWORD} - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], {CONF_PASSWORD: FIXTURE_USER_INPUT[CONF_PASSWORD]} - ) - await hass.async_block_till_done() - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "captcha" - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], FIXTURE_CAPTCHA_INPUT - ) - - assert result["type"] is FlowResultType.ABORT - assert result["reason"] == "reauth_successful" - assert config_entry.data == FIXTURE_COMPLETE_ENTRY - - assert len(mock_setup_entry.mock_calls) == 2 - - -async def test_reconfigure(hass: HomeAssistant) -> None: - """Test the reconfiguration form.""" - with ( - patch( - BIMMER_CONNECTED_LOGIN_PATCH, side_effect=login_sideeffect, autospec=True - ), - patch( - "homeassistant.components.bmw_connected_drive.async_setup_entry", - return_value=True, - ), - ): - config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - result = await config_entry.start_reconfigure_flow(hass) - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "change_password" - assert set(result["data_schema"].schema) == {CONF_PASSWORD} - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], {CONF_PASSWORD: FIXTURE_USER_INPUT[CONF_PASSWORD]} - ) - await hass.async_block_till_done() - - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "captcha" - - result = await hass.config_entries.flow.async_configure( - result["flow_id"], FIXTURE_CAPTCHA_INPUT - ) - - assert result["type"] is FlowResultType.ABORT - assert result["reason"] == "reconfigure_successful" - assert config_entry.data == FIXTURE_COMPLETE_ENTRY diff --git a/tests/components/bmw_connected_drive/test_coordinator.py b/tests/components/bmw_connected_drive/test_coordinator.py deleted file mode 100644 index 13c96341dea..00000000000 --- a/tests/components/bmw_connected_drive/test_coordinator.py +++ /dev/null @@ -1,244 +0,0 @@ -"""Test BMW coordinator for general availability/unavailability of entities and raising issues.""" - -from copy import deepcopy -from unittest.mock import patch - -from bimmer_connected.models import ( - MyBMWAPIError, - MyBMWAuthError, - MyBMWCaptchaMissingError, -) -from freezegun.api import FrozenDateTimeFactory -import pytest - -from homeassistant.components.bmw_connected_drive import DOMAIN -from homeassistant.components.bmw_connected_drive.const import ( - CONF_REFRESH_TOKEN, - SCAN_INTERVALS, -) -from homeassistant.const import CONF_REGION -from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant -from homeassistant.helpers import issue_registry as ir - -from . import BIMMER_CONNECTED_VEHICLE_PATCH, FIXTURE_CONFIG_ENTRY - -from tests.common import MockConfigEntry, async_fire_time_changed - -FIXTURE_ENTITY_STATES = { - "binary_sensor.m340i_xdrive_door_lock_state": "off", - "lock.m340i_xdrive_lock": "locked", - "lock.i3_rex_lock": "unlocked", - "number.ix_xdrive50_target_soc": "80", - "sensor.ix_xdrive50_rear_left_tire_pressure": "2.61", - "sensor.ix_xdrive50_rear_right_tire_pressure": "2.69", -} -FIXTURE_DEFAULT_REGION = FIXTURE_CONFIG_ENTRY["data"][CONF_REGION] - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_config_entry_update( - hass: HomeAssistant, - freezer: FrozenDateTimeFactory, -) -> None: - """Test if the coordinator updates the refresh token in config entry.""" - config_entry_fixure = deepcopy(FIXTURE_CONFIG_ENTRY) - config_entry_fixure["data"][CONF_REFRESH_TOKEN] = "old_token" - config_entry = MockConfigEntry(**config_entry_fixure) - config_entry.add_to_hass(hass) - - assert ( - hass.config_entries.async_get_entry(config_entry.entry_id).data[ - CONF_REFRESH_TOKEN - ] - == "old_token" - ) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - assert ( - hass.config_entries.async_get_entry(config_entry.entry_id).data[ - CONF_REFRESH_TOKEN - ] - == "another_token_string" - ) - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_update_failed( - hass: HomeAssistant, - freezer: FrozenDateTimeFactory, -) -> None: - """Test a failing API call.""" - config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - # Test if entities show data correctly - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - - # On API error, entities should be unavailable - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - side_effect=MyBMWAPIError("Test error"), - ): - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id in FIXTURE_ENTITY_STATES: - assert hass.states.get(entity_id).state == "unavailable" - - # And should recover on next update - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_auth_failed_as_update_failed( - hass: HomeAssistant, - freezer: FrozenDateTimeFactory, - issue_registry: ir.IssueRegistry, -) -> None: - """Test a single auth failure not initializing reauth flow.""" - config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - # Test if entities show data correctly - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - - # Due to flaky API, we allow one retry on AuthError and raise as UpdateFailed - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - side_effect=MyBMWAuthError("Test error"), - ): - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id in FIXTURE_ENTITY_STATES: - assert hass.states.get(entity_id).state == "unavailable" - - # And should recover on next update - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - - # Verify that no issues are raised and no reauth flow is initialized - assert len(issue_registry.issues) == 0 - assert len(hass.config_entries.flow.async_progress_by_handler(DOMAIN)) == 0 - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_auth_failed_init_reauth( - hass: HomeAssistant, - freezer: FrozenDateTimeFactory, - issue_registry: ir.IssueRegistry, -) -> None: - """Test a two subsequent auth failures initializing reauth flow.""" - - config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - # Test if entities show data correctly - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - assert len(issue_registry.issues) == 0 - - # Due to flaky API, we allow one retry on AuthError and raise as UpdateFailed - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - side_effect=MyBMWAuthError("Test error"), - ): - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id in FIXTURE_ENTITY_STATES: - assert hass.states.get(entity_id).state == "unavailable" - assert len(issue_registry.issues) == 0 - - # On second failure, we should initialize reauth flow - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - side_effect=MyBMWAuthError("Test error"), - ): - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id in FIXTURE_ENTITY_STATES: - assert hass.states.get(entity_id).state == "unavailable" - assert len(issue_registry.issues) == 1 - - reauth_issue = issue_registry.async_get_issue( - HOMEASSISTANT_DOMAIN, - f"config_entry_reauth_{DOMAIN}_{config_entry.entry_id}", - ) - assert reauth_issue.active is True - - # Check if reauth flow is initialized correctly - flow = hass.config_entries.flow.async_get(reauth_issue.data["flow_id"]) - assert flow["handler"] == DOMAIN - assert flow["context"]["source"] == "reauth" - assert flow["context"]["unique_id"] == config_entry.unique_id - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_captcha_reauth( - hass: HomeAssistant, - freezer: FrozenDateTimeFactory, - issue_registry: ir.IssueRegistry, -) -> None: - """Test a CaptchaError initializing reauth flow.""" - config_entry = MockConfigEntry(**FIXTURE_CONFIG_ENTRY) - config_entry.add_to_hass(hass) - - await hass.config_entries.async_setup(config_entry.entry_id) - await hass.async_block_till_done() - - # Test if entities show data correctly - for entity_id, state in FIXTURE_ENTITY_STATES.items(): - assert hass.states.get(entity_id).state == state - - # If library decides a captcha is needed, we should initialize reauth flow - freezer.tick(SCAN_INTERVALS[FIXTURE_DEFAULT_REGION]) - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - side_effect=MyBMWCaptchaMissingError("Missing hCaptcha token"), - ): - async_fire_time_changed(hass) - await hass.async_block_till_done() - - for entity_id in FIXTURE_ENTITY_STATES: - assert hass.states.get(entity_id).state == "unavailable" - assert len(issue_registry.issues) == 1 - - reauth_issue = issue_registry.async_get_issue( - HOMEASSISTANT_DOMAIN, - f"config_entry_reauth_{DOMAIN}_{config_entry.entry_id}", - ) - assert reauth_issue.active is True - - # Check if reauth flow is initialized correctly - flow = hass.config_entries.flow.async_get(reauth_issue.data["flow_id"]) - assert flow["handler"] == DOMAIN - assert flow["context"]["source"] == "reauth" - assert flow["context"]["unique_id"] == config_entry.unique_id diff --git a/tests/components/bmw_connected_drive/test_diagnostics.py b/tests/components/bmw_connected_drive/test_diagnostics.py deleted file mode 100644 index 984275eab6a..00000000000 --- a/tests/components/bmw_connected_drive/test_diagnostics.py +++ /dev/null @@ -1,92 +0,0 @@ -"""Test BMW diagnostics.""" - -import datetime - -import pytest -from syrupy.assertion import SnapshotAssertion - -from homeassistant.components.bmw_connected_drive.const import DOMAIN -from homeassistant.core import HomeAssistant -from homeassistant.helpers import device_registry as dr - -from . import setup_mocked_integration - -from tests.components.diagnostics import ( - get_diagnostics_for_config_entry, - get_diagnostics_for_device, -) -from tests.typing import ClientSessionGenerator - - -@pytest.mark.freeze_time(datetime.datetime(2022, 7, 10, 11, tzinfo=datetime.UTC)) -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_config_entry_diagnostics( - hass: HomeAssistant, - hass_client: ClientSessionGenerator, - snapshot: SnapshotAssertion, -) -> None: - """Test config entry diagnostics.""" - - mock_config_entry = await setup_mocked_integration(hass) - - diagnostics = await get_diagnostics_for_config_entry( - hass, hass_client, mock_config_entry - ) - - assert diagnostics == snapshot - - -@pytest.mark.freeze_time(datetime.datetime(2022, 7, 10, 11, tzinfo=datetime.UTC)) -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_device_diagnostics( - hass: HomeAssistant, - hass_client: ClientSessionGenerator, - device_registry: dr.DeviceRegistry, - snapshot: SnapshotAssertion, -) -> None: - """Test device diagnostics.""" - - mock_config_entry = await setup_mocked_integration(hass) - - reg_device = device_registry.async_get_device( - identifiers={(DOMAIN, "WBY00000000REXI01")}, - ) - assert reg_device is not None - - diagnostics = await get_diagnostics_for_device( - hass, hass_client, mock_config_entry, reg_device - ) - - assert diagnostics == snapshot - - -@pytest.mark.freeze_time(datetime.datetime(2022, 7, 10, 11, tzinfo=datetime.UTC)) -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_device_diagnostics_vehicle_not_found( - hass: HomeAssistant, - hass_client: ClientSessionGenerator, - device_registry: dr.DeviceRegistry, - snapshot: SnapshotAssertion, -) -> None: - """Test device diagnostics when the vehicle cannot be found.""" - - mock_config_entry = await setup_mocked_integration(hass) - - reg_device = device_registry.async_get_device( - identifiers={(DOMAIN, "WBY00000000REXI01")}, - ) - assert reg_device is not None - - # Change vehicle identifier so that vehicle will not be found - device_registry.async_update_device( - reg_device.id, new_identifiers={(DOMAIN, "WBY00000000REXI99")} - ) - - diagnostics = await get_diagnostics_for_device( - hass, hass_client, mock_config_entry, reg_device - ) - - assert diagnostics == snapshot diff --git a/tests/components/bmw_connected_drive/test_init.py b/tests/components/bmw_connected_drive/test_init.py deleted file mode 100644 index 7ffccccf577..00000000000 --- a/tests/components/bmw_connected_drive/test_init.py +++ /dev/null @@ -1,261 +0,0 @@ -"""Test Axis component setup process.""" - -from copy import deepcopy -from unittest.mock import patch - -import pytest - -from homeassistant.components.bmw_connected_drive import DEFAULT_OPTIONS -from homeassistant.components.bmw_connected_drive.const import CONF_READ_ONLY, DOMAIN -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.helpers import device_registry as dr, entity_registry as er - -from . import BIMMER_CONNECTED_VEHICLE_PATCH, FIXTURE_CONFIG_ENTRY - -from tests.common import MockConfigEntry - -BINARY_SENSOR_DOMAIN = Platform.BINARY_SENSOR.value -SENSOR_DOMAIN = Platform.SENSOR.value - -VIN = "WBYYYYYYYYYYYYYYY" -VEHICLE_NAME = "i3 (+ REX)" -VEHICLE_NAME_SLUG = "i3_rex" - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - "options", - [ - DEFAULT_OPTIONS, - {"other_value": 1, **DEFAULT_OPTIONS}, - {}, - ], -) -async def test_migrate_options( - hass: HomeAssistant, - options: dict, -) -> None: - """Test successful migration of options.""" - - config_entry = deepcopy(FIXTURE_CONFIG_ENTRY) - config_entry["options"] = options - - mock_config_entry = MockConfigEntry(**config_entry) - mock_config_entry.add_to_hass(hass) - - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - assert len( - hass.config_entries.async_get_entry(mock_config_entry.entry_id).options - ) == len(DEFAULT_OPTIONS) - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_migrate_options_from_data(hass: HomeAssistant) -> None: - """Test successful migration of options.""" - - config_entry = deepcopy(FIXTURE_CONFIG_ENTRY) - config_entry["options"] = {} - config_entry["data"].update({CONF_READ_ONLY: False}) - - mock_config_entry = MockConfigEntry(**config_entry) - mock_config_entry.add_to_hass(hass) - - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - updated_config_entry = hass.config_entries.async_get_entry( - mock_config_entry.entry_id - ) - assert len(updated_config_entry.options) == len(DEFAULT_OPTIONS) - assert CONF_READ_ONLY not in updated_config_entry.data - - -@pytest.mark.parametrize( - ("entitydata", "old_unique_id", "new_unique_id"), - [ - ( - { - "domain": SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-charging_level_hv", - "suggested_object_id": f"{VEHICLE_NAME} charging_level_hv", - "disabled_by": None, - }, - f"{VIN}-charging_level_hv", - f"{VIN}-fuel_and_battery.remaining_battery_percent", - ), - ( - { - "domain": SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-remaining_range_total", - "suggested_object_id": f"{VEHICLE_NAME} remaining_range_total", - "disabled_by": None, - }, - f"{VIN}-remaining_range_total", - f"{VIN}-fuel_and_battery.remaining_range_total", - ), - ( - { - "domain": SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-mileage", - "suggested_object_id": f"{VEHICLE_NAME} mileage", - "disabled_by": None, - }, - f"{VIN}-mileage", - f"{VIN}-mileage", - ), - ( - { - "domain": SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-charging_status", - "suggested_object_id": f"{VEHICLE_NAME} Charging Status", - "disabled_by": None, - }, - f"{VIN}-charging_status", - f"{VIN}-fuel_and_battery.charging_status", - ), - ( - { - "domain": BINARY_SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-charging_status", - "suggested_object_id": f"{VEHICLE_NAME} Charging Status", - "disabled_by": None, - }, - f"{VIN}-charging_status", - f"{VIN}-charging_status", - ), - ], -) -async def test_migrate_unique_ids( - hass: HomeAssistant, - entitydata: dict, - old_unique_id: str, - new_unique_id: str, - entity_registry: er.EntityRegistry, -) -> None: - """Test successful migration of entity unique_ids.""" - confg_entry = deepcopy(FIXTURE_CONFIG_ENTRY) - mock_config_entry = MockConfigEntry(**confg_entry) - mock_config_entry.add_to_hass(hass) - - entity: er.RegistryEntry = entity_registry.async_get_or_create( - **entitydata, - config_entry=mock_config_entry, - ) - - assert entity.unique_id == old_unique_id - - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - return_value=[], - ): - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - entity_migrated = entity_registry.async_get(entity.entity_id) - assert entity_migrated - assert entity_migrated.unique_id == new_unique_id - - -@pytest.mark.parametrize( - ("entitydata", "old_unique_id", "new_unique_id"), - [ - ( - { - "domain": SENSOR_DOMAIN, - "platform": DOMAIN, - "unique_id": f"{VIN}-charging_level_hv", - "suggested_object_id": f"{VEHICLE_NAME} charging_level_hv", - "disabled_by": None, - }, - f"{VIN}-charging_level_hv", - f"{VIN}-fuel_and_battery.remaining_battery_percent", - ), - ], -) -async def test_dont_migrate_unique_ids( - hass: HomeAssistant, - entitydata: dict, - old_unique_id: str, - new_unique_id: str, - entity_registry: er.EntityRegistry, -) -> None: - """Test successful migration of entity unique_ids.""" - confg_entry = deepcopy(FIXTURE_CONFIG_ENTRY) - mock_config_entry = MockConfigEntry(**confg_entry) - mock_config_entry.add_to_hass(hass) - - # create existing entry with new_unique_id - existing_entity = entity_registry.async_get_or_create( - SENSOR_DOMAIN, - DOMAIN, - unique_id=f"{VIN}-fuel_and_battery.remaining_battery_percent", - suggested_object_id=f"{VEHICLE_NAME} fuel_and_battery.remaining_battery_percent", - config_entry=mock_config_entry, - ) - - entity: er.RegistryEntry = entity_registry.async_get_or_create( - **entitydata, - config_entry=mock_config_entry, - ) - - assert entity.unique_id == old_unique_id - - with patch( - BIMMER_CONNECTED_VEHICLE_PATCH, - return_value=[], - ): - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - entity_migrated = entity_registry.async_get(entity.entity_id) - assert entity_migrated - assert entity_migrated.unique_id == old_unique_id - - entity_not_changed = entity_registry.async_get(existing_entity.entity_id) - assert entity_not_changed - assert entity_not_changed.unique_id == new_unique_id - - assert entity_migrated != entity_not_changed - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_remove_stale_devices( - hass: HomeAssistant, - device_registry: dr.DeviceRegistry, -) -> None: - """Test remove stale device registry entries.""" - config_entry = deepcopy(FIXTURE_CONFIG_ENTRY) - mock_config_entry = MockConfigEntry(**config_entry) - mock_config_entry.add_to_hass(hass) - - device_registry.async_get_or_create( - config_entry_id=mock_config_entry.entry_id, - identifiers={(DOMAIN, "stale_device_id")}, - ) - device_entries = dr.async_entries_for_config_entry( - device_registry, mock_config_entry.entry_id - ) - - assert len(device_entries) == 1 - device_entry = device_entries[0] - assert device_entry.identifiers == {(DOMAIN, "stale_device_id")} - - assert await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() - - device_entries = dr.async_entries_for_config_entry( - device_registry, mock_config_entry.entry_id - ) - - # Check that the test vehicles are still available but not the stale device - assert len(device_entries) > 0 - remaining_device_identifiers = set().union(*(d.identifiers for d in device_entries)) - assert not {(DOMAIN, "stale_device_id")}.intersection(remaining_device_identifiers) diff --git a/tests/components/bmw_connected_drive/test_lock.py b/tests/components/bmw_connected_drive/test_lock.py deleted file mode 100644 index 10c0957b788..00000000000 --- a/tests/components/bmw_connected_drive/test_lock.py +++ /dev/null @@ -1,143 +0,0 @@ -"""Test BMW locks.""" - -from unittest.mock import AsyncMock, patch - -from bimmer_connected.models import MyBMWRemoteServiceError -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx -from syrupy.assertion import SnapshotAssertion - -from homeassistant.components.recorder.history import get_significant_states -from homeassistant.const import STATE_UNKNOWN, Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import entity_registry as er -from homeassistant.util import dt as dt_util - -from . import ( - REMOTE_SERVICE_EXC_REASON, - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - -from tests.common import snapshot_platform -from tests.components.recorder.common import async_wait_recording_done - - -@pytest.mark.freeze_time("2023-06-22 10:30:00+00:00") -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test lock states and attributes.""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", [Platform.LOCK] - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.usefixtures("recorder_mock") -@pytest.mark.parametrize( - ("entity_id", "new_value", "old_value", "service", "remote_service"), - [ - ( - "lock.m340i_xdrive_lock", - "locked", - "unlocked", - "lock", - "door-lock", - ), - ("lock.m340i_xdrive_lock", "unlocked", "locked", "unlock", "door-unlock"), - ], -) -async def test_service_call_success( - hass: HomeAssistant, - entity_id: str, - new_value: str, - old_value: str, - service: str, - remote_service: str, - bmw_fixture: respx.Router, -) -> None: - """Test successful service call.""" - - # Setup component - assert await setup_mocked_integration(hass) - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - now = dt_util.utcnow() - - # Test - await hass.services.async_call( - "lock", - service, - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service) - assert hass.states.get(entity_id).state == new_value - - # wait for the recorder to really store the data - await async_wait_recording_done(hass) - states = await hass.async_add_executor_job( - get_significant_states, hass, now, None, [entity_id] - ) - assert any(s for s in states[entity_id] if s.state == STATE_UNKNOWN) is False - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("recorder_mock") -@pytest.mark.parametrize( - ("entity_id", "service"), - [ - ("lock.m340i_xdrive_lock", "lock"), - ("lock.m340i_xdrive_lock", "unlock"), - ], -) -async def test_service_call_fail( - hass: HomeAssistant, - entity_id: str, - service: str, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test failed service call.""" - - # Setup component - assert await setup_mocked_integration(hass) - old_value = hass.states.get(entity_id).state - - now = dt_util.utcnow() - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock(side_effect=MyBMWRemoteServiceError(REMOTE_SERVICE_EXC_REASON)), - ) - - # Test - with pytest.raises(HomeAssistantError, match=REMOTE_SERVICE_EXC_TRANSLATION): - await hass.services.async_call( - "lock", - service, - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value - - # wait for the recorder to really store the data - await async_wait_recording_done(hass) - states = await hass.async_add_executor_job( - get_significant_states, hass, now, None, [entity_id] - ) - assert states[entity_id][-2].state == STATE_UNKNOWN diff --git a/tests/components/bmw_connected_drive/test_notify.py b/tests/components/bmw_connected_drive/test_notify.py deleted file mode 100644 index 1bade3be011..00000000000 --- a/tests/components/bmw_connected_drive/test_notify.py +++ /dev/null @@ -1,154 +0,0 @@ -"""Test BMW numbers.""" - -from unittest.mock import AsyncMock - -from bimmer_connected.models import MyBMWAPIError, MyBMWRemoteServiceError -from bimmer_connected.tests.common import POI_DATA -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx - -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError, ServiceValidationError - -from . import ( - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - - -async def test_legacy_notify_service_simple( - hass: HomeAssistant, - bmw_fixture: respx.Router, -) -> None: - """Test successful sending of POIs.""" - - # Setup component - assert await setup_mocked_integration(hass) - - # Minimal required data - await hass.services.async_call( - "notify", - "bmw_connected_drive_ix_xdrive50", - { - "message": POI_DATA.get("name"), - "data": { - "latitude": POI_DATA.get("lat"), - "longitude": POI_DATA.get("lon"), - }, - }, - blocking=True, - ) - check_remote_service_call(bmw_fixture, "send-to-car") - - bmw_fixture.reset() - - # Full data - await hass.services.async_call( - "notify", - "bmw_connected_drive_ix_xdrive50", - { - "message": POI_DATA.get("name"), - "data": { - "latitude": POI_DATA.get("lat"), - "longitude": POI_DATA.get("lon"), - "street": POI_DATA.get("street"), - "city": POI_DATA.get("city"), - "postal_code": POI_DATA.get("postal_code"), - "country": POI_DATA.get("country"), - }, - }, - blocking=True, - ) - check_remote_service_call(bmw_fixture, "send-to-car") - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("data", "exc_translation"), - [ - ( - { - "latitude": POI_DATA.get("lat"), - }, - r"Invalid data for point of interest: required key not provided @ data\['longitude'\]", - ), - ( - { - "latitude": POI_DATA.get("lat"), - "longitude": "text", - }, - r"Invalid data for point of interest: invalid longitude for dictionary value @ data\['longitude'\]", - ), - ( - { - "latitude": POI_DATA.get("lat"), - "longitude": 9999, - }, - r"Invalid data for point of interest: invalid longitude for dictionary value @ data\['longitude'\]", - ), - ], -) -async def test_service_call_invalid_input( - hass: HomeAssistant, - data: dict, - exc_translation: str, -) -> None: - """Test invalid inputs.""" - - # Setup component - assert await setup_mocked_integration(hass) - - with pytest.raises(ServiceValidationError, match=exc_translation): - await hass.services.async_call( - "notify", - "bmw_connected_drive_ix_xdrive50", - { - "message": POI_DATA.get("name"), - "data": data, - }, - blocking=True, - ) - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("raised", "expected"), - [ - (MyBMWRemoteServiceError, HomeAssistantError), - (MyBMWAPIError, HomeAssistantError), - ], -) -async def test_service_call_fail( - hass: HomeAssistant, - raised: Exception, - expected: Exception, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test exception handling.""" - - # Setup component - assert await setup_mocked_integration(hass) - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock(side_effect=raised("HTTPStatusError: 502 Bad Gateway")), - ) - - # Test - with pytest.raises(expected, match=REMOTE_SERVICE_EXC_TRANSLATION): - await hass.services.async_call( - "notify", - "bmw_connected_drive_ix_xdrive50", - { - "message": POI_DATA.get("name"), - "data": { - "latitude": POI_DATA.get("lat"), - "longitude": POI_DATA.get("lon"), - }, - }, - blocking=True, - ) diff --git a/tests/components/bmw_connected_drive/test_number.py b/tests/components/bmw_connected_drive/test_number.py deleted file mode 100644 index 733f4fe3113..00000000000 --- a/tests/components/bmw_connected_drive/test_number.py +++ /dev/null @@ -1,164 +0,0 @@ -"""Test BMW numbers.""" - -from unittest.mock import AsyncMock, patch - -from bimmer_connected.models import MyBMWAPIError, MyBMWRemoteServiceError -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx -from syrupy.assertion import SnapshotAssertion - -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import entity_registry as er - -from . import ( - REMOTE_SERVICE_EXC_REASON, - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - -from tests.common import snapshot_platform - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test number options and values.""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", - [Platform.NUMBER], - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.parametrize( - ("entity_id", "new_value", "old_value", "remote_service"), - [ - ("number.i4_edrive40_target_soc", "80", "100", "charging-settings"), - ], -) -async def test_service_call_success( - hass: HomeAssistant, - entity_id: str, - new_value: str, - old_value: str, - remote_service: str, - bmw_fixture: respx.Router, -) -> None: - """Test successful number change.""" - - # Setup component - assert await setup_mocked_integration(hass) - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - # Test - await hass.services.async_call( - "number", - "set_value", - service_data={"value": new_value}, - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service) - assert hass.states.get(entity_id).state == new_value - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("entity_id", "value"), - [ - ("number.i4_edrive40_target_soc", "81"), - ], -) -async def test_service_call_invalid_input( - hass: HomeAssistant, - entity_id: str, - value: str, -) -> None: - """Test not allowed values for number inputs.""" - - # Setup component - assert await setup_mocked_integration(hass) - old_value = hass.states.get(entity_id).state - - # Test - with pytest.raises( - ValueError, - match="Target SoC must be an integer between 20 and 100 that is a multiple of 5.", - ): - await hass.services.async_call( - "number", - "set_value", - service_data={"value": value}, - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("raised", "expected", "exc_translation"), - [ - ( - MyBMWRemoteServiceError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ( - MyBMWAPIError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ( - ValueError( - "Target SoC must be an integer between 20 and 100 that is a multiple of 5." - ), - ValueError, - "Target SoC must be an integer between 20 and 100 that is a multiple of 5.", - ), - ], -) -async def test_service_call_fail( - hass: HomeAssistant, - raised: Exception, - expected: Exception, - exc_translation: str, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test exception handling.""" - - # Setup component - assert await setup_mocked_integration(hass) - entity_id = "number.i4_edrive40_target_soc" - old_value = hass.states.get(entity_id).state - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock(side_effect=raised), - ) - - # Test - with pytest.raises(expected, match=exc_translation): - await hass.services.async_call( - "number", - "set_value", - service_data={"value": "80"}, - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value diff --git a/tests/components/bmw_connected_drive/test_select.py b/tests/components/bmw_connected_drive/test_select.py deleted file mode 100644 index 51ed5369e51..00000000000 --- a/tests/components/bmw_connected_drive/test_select.py +++ /dev/null @@ -1,199 +0,0 @@ -"""Test BMW selects.""" - -from unittest.mock import AsyncMock, patch - -from bimmer_connected.models import MyBMWAPIError, MyBMWRemoteServiceError -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx -from syrupy.assertion import SnapshotAssertion - -from homeassistant.components.bmw_connected_drive import DOMAIN -from homeassistant.components.bmw_connected_drive.select import SELECT_TYPES -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError, ServiceValidationError -from homeassistant.helpers import entity_registry as er -from homeassistant.helpers.translation import async_get_translations - -from . import ( - REMOTE_SERVICE_EXC_REASON, - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - -from tests.common import snapshot_platform - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test select options and values..""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", - [Platform.SELECT], - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.parametrize( - ("entity_id", "new_value", "old_value", "remote_service"), - [ - ( - "select.i3_rex_charging_mode", - "immediate_charging", - "delayed_charging", - "charging-profile", - ), - ("select.i4_edrive40_ac_charging_limit", "12", "16", "charging-settings"), - ( - "select.i4_edrive40_charging_mode", - "delayed_charging", - "immediate_charging", - "charging-profile", - ), - ], -) -async def test_service_call_success( - hass: HomeAssistant, - entity_id: str, - new_value: str, - old_value: str, - remote_service: str, - bmw_fixture: respx.Router, -) -> None: - """Test successful input change.""" - - # Setup component - assert await setup_mocked_integration(hass) - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - # Test - await hass.services.async_call( - "select", - "select_option", - service_data={"option": new_value}, - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service) - assert hass.states.get(entity_id).state == new_value - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("entity_id", "value"), - [ - ("select.i4_edrive40_ac_charging_limit", "17"), - ("select.i4_edrive40_charging_mode", "bonkers_mode"), - ], -) -async def test_service_call_invalid_input( - hass: HomeAssistant, - entity_id: str, - value: str, -) -> None: - """Test not allowed values for select inputs.""" - - # Setup component - assert await setup_mocked_integration(hass) - old_value = hass.states.get(entity_id).state - - # Test - with pytest.raises( - ServiceValidationError, - match=f"Option {value} is not valid for entity {entity_id}", - ): - await hass.services.async_call( - "select", - "select_option", - service_data={"option": value}, - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("raised", "expected", "exc_translation"), - [ - ( - MyBMWRemoteServiceError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ( - MyBMWAPIError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ], -) -async def test_service_call_fail( - hass: HomeAssistant, - raised: Exception, - expected: Exception, - exc_translation: str, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test exception handling.""" - - # Setup component - assert await setup_mocked_integration(hass) - entity_id = "select.i4_edrive40_ac_charging_limit" - old_value = hass.states.get(entity_id).state - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock(side_effect=raised), - ) - - # Test - with pytest.raises(expected, match=exc_translation): - await hass.services.async_call( - "select", - "select_option", - service_data={"option": "16"}, - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_entity_option_translations( - hass: HomeAssistant, -) -> None: - """Ensure all enum sensor values are translated.""" - - # Setup component to load translations - assert await setup_mocked_integration(hass) - - prefix = f"component.{DOMAIN}.entity.{Platform.SELECT.value}" - - translations = await async_get_translations(hass, "en", "entity", [DOMAIN]) - translation_states = { - k for k in translations if k.startswith(prefix) and ".state." in k - } - - sensor_options = { - f"{prefix}.{entity_description.translation_key}.state.{option}" - for entity_description in SELECT_TYPES - if entity_description.options - for option in entity_description.options - } - - assert sensor_options == translation_states diff --git a/tests/components/bmw_connected_drive/test_sensor.py b/tests/components/bmw_connected_drive/test_sensor.py deleted file mode 100644 index 12145f89e6d..00000000000 --- a/tests/components/bmw_connected_drive/test_sensor.py +++ /dev/null @@ -1,149 +0,0 @@ -"""Test BMW sensors.""" - -from unittest.mock import patch - -from bimmer_connected.models import StrEnum -from bimmer_connected.vehicle import fuel_and_battery -from freezegun.api import FrozenDateTimeFactory -import pytest -from syrupy.assertion import SnapshotAssertion - -from homeassistant.components.bmw_connected_drive import DOMAIN -from homeassistant.components.bmw_connected_drive.const import SCAN_INTERVALS -from homeassistant.components.bmw_connected_drive.sensor import SENSOR_TYPES -from homeassistant.components.sensor import SensorDeviceClass -from homeassistant.const import STATE_UNAVAILABLE, Platform -from homeassistant.core import HomeAssistant -from homeassistant.helpers import entity_registry as er -from homeassistant.helpers.translation import async_get_translations -from homeassistant.util.unit_system import ( - METRIC_SYSTEM as METRIC, - US_CUSTOMARY_SYSTEM as IMPERIAL, - UnitSystem, -) - -from . import setup_mocked_integration - -from tests.common import async_fire_time_changed, snapshot_platform - - -@pytest.mark.freeze_time("2023-06-22 10:30:00+00:00") -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test sensor options and values..""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", [Platform.SENSOR] - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("entity_id", "unit_system", "value", "unit_of_measurement"), - [ - ("sensor.i3_rex_remaining_range_total", METRIC, "279", "km"), - ("sensor.i3_rex_remaining_range_total", IMPERIAL, "173.362562634216", "mi"), - ("sensor.i3_rex_mileage", METRIC, "137009", "km"), - ("sensor.i3_rex_mileage", IMPERIAL, "85133.4456772449", "mi"), - ("sensor.i3_rex_remaining_battery_percent", METRIC, "82", "%"), - ("sensor.i3_rex_remaining_battery_percent", IMPERIAL, "82", "%"), - ("sensor.i3_rex_remaining_range_electric", METRIC, "174", "km"), - ("sensor.i3_rex_remaining_range_electric", IMPERIAL, "108.118587449296", "mi"), - ("sensor.i3_rex_remaining_fuel", METRIC, "6", "L"), - ("sensor.i3_rex_remaining_fuel", IMPERIAL, "1.58503231414889", "gal"), - ("sensor.i3_rex_remaining_range_fuel", METRIC, "105", "km"), - ("sensor.i3_rex_remaining_range_fuel", IMPERIAL, "65.2439751849201", "mi"), - ("sensor.m340i_xdrive_remaining_fuel_percent", METRIC, "80", "%"), - ("sensor.m340i_xdrive_remaining_fuel_percent", IMPERIAL, "80", "%"), - ], -) -async def test_unit_conversion( - hass: HomeAssistant, - entity_id: str, - unit_system: UnitSystem, - value: str, - unit_of_measurement: str, -) -> None: - """Test conversion between metric and imperial units for sensors.""" - - # Set unit system - hass.config.units = unit_system - - # Setup component - assert await setup_mocked_integration(hass) - - # Test - entity = hass.states.get(entity_id) - assert entity.state == value - assert entity.attributes.get("unit_of_measurement") == unit_of_measurement - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_entity_option_translations( - hass: HomeAssistant, -) -> None: - """Ensure all enum sensor values are translated.""" - - # Setup component to load translations - assert await setup_mocked_integration(hass) - - prefix = f"component.{DOMAIN}.entity.{Platform.SENSOR.value}" - - translations = await async_get_translations(hass, "en", "entity", [DOMAIN]) - translation_states = { - k for k in translations if k.startswith(prefix) and ".state." in k - } - - sensor_options = { - f"{prefix}.{entity_description.translation_key}.state.{option}" - for entity_description in SENSOR_TYPES - if entity_description.device_class == SensorDeviceClass.ENUM - for option in entity_description.options - } - - assert sensor_options == translation_states - - -@pytest.mark.usefixtures("bmw_fixture") -async def test_enum_sensor_unknown( - hass: HomeAssistant, monkeypatch: pytest.MonkeyPatch, freezer: FrozenDateTimeFactory -) -> None: - """Test conversion handling of enum sensors.""" - - # Setup component - assert await setup_mocked_integration(hass) - - entity_id = "sensor.i4_edrive40_charging_status" - - # Check normal state - entity = hass.states.get(entity_id) - assert entity.state == "not_charging" - - class ChargingStateUnkown(StrEnum): - """Charging state of electric vehicle.""" - - UNKNOWN = "UNKNOWN" - - # Setup enum returning only UNKNOWN - monkeypatch.setattr( - fuel_and_battery, - "ChargingState", - ChargingStateUnkown, - ) - - freezer.tick(SCAN_INTERVALS["rest_of_world"]) - async_fire_time_changed(hass) - await hass.async_block_till_done() - - # Check normal state - entity = hass.states.get("sensor.i4_edrive40_charging_status") - assert entity.state == STATE_UNAVAILABLE diff --git a/tests/components/bmw_connected_drive/test_switch.py b/tests/components/bmw_connected_drive/test_switch.py deleted file mode 100644 index c28b651abaf..00000000000 --- a/tests/components/bmw_connected_drive/test_switch.py +++ /dev/null @@ -1,145 +0,0 @@ -"""Test BMW switches.""" - -from unittest.mock import AsyncMock, patch - -from bimmer_connected.models import MyBMWAPIError, MyBMWRemoteServiceError -from bimmer_connected.vehicle.remote_services import RemoteServices -import pytest -import respx -from syrupy.assertion import SnapshotAssertion - -from homeassistant.const import Platform -from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import entity_registry as er - -from . import ( - REMOTE_SERVICE_EXC_REASON, - REMOTE_SERVICE_EXC_TRANSLATION, - check_remote_service_call, - setup_mocked_integration, -) - -from tests.common import snapshot_platform - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_entity_state_attrs( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - entity_registry: er.EntityRegistry, -) -> None: - """Test switch options and values..""" - - # Setup component - with patch( - "homeassistant.components.bmw_connected_drive.PLATFORMS", - [Platform.SWITCH], - ): - mock_config_entry = await setup_mocked_integration(hass) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.parametrize( - ("entity_id", "new_value", "old_value", "remote_service", "remote_service_params"), - [ - ("switch.i4_edrive40_climate", "on", "off", "climate-now", {"action": "START"}), - ("switch.i4_edrive40_climate", "off", "on", "climate-now", {"action": "STOP"}), - ("switch.iX_xdrive50_charging", "on", "off", "start-charging", {}), - ("switch.iX_xdrive50_charging", "off", "on", "stop-charging", {}), - ], -) -async def test_service_call_success( - hass: HomeAssistant, - entity_id: str, - new_value: str, - old_value: str, - remote_service: str, - remote_service_params: dict, - bmw_fixture: respx.Router, -) -> None: - """Test successful switch change.""" - - # Setup component - assert await setup_mocked_integration(hass) - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - # Test - await hass.services.async_call( - "switch", - f"turn_{new_value}", - blocking=True, - target={"entity_id": entity_id}, - ) - check_remote_service_call(bmw_fixture, remote_service, remote_service_params) - assert hass.states.get(entity_id).state == new_value - - -@pytest.mark.usefixtures("bmw_fixture") -@pytest.mark.parametrize( - ("raised", "expected", "exc_translation"), - [ - ( - MyBMWRemoteServiceError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ( - MyBMWAPIError(REMOTE_SERVICE_EXC_REASON), - HomeAssistantError, - REMOTE_SERVICE_EXC_TRANSLATION, - ), - ], -) -async def test_service_call_fail( - hass: HomeAssistant, - raised: Exception, - expected: Exception, - exc_translation: str, - monkeypatch: pytest.MonkeyPatch, -) -> None: - """Test exception handling.""" - - # Setup component - assert await setup_mocked_integration(hass) - entity_id = "switch.i4_edrive40_climate" - - # Setup exception - monkeypatch.setattr( - RemoteServices, - "trigger_remote_service", - AsyncMock(side_effect=raised), - ) - - # Turning switch to ON - old_value = "off" - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - # Test - with pytest.raises(expected, match=exc_translation): - await hass.services.async_call( - "switch", - "turn_on", - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value - - # Turning switch to OFF - old_value = "on" - hass.states.async_set(entity_id, old_value) - assert hass.states.get(entity_id).state == old_value - - # Test - with pytest.raises(expected, match=exc_translation): - await hass.services.async_call( - "switch", - "turn_off", - blocking=True, - target={"entity_id": entity_id}, - ) - assert hass.states.get(entity_id).state == old_value