Add snapshot testing to Tessie (#108346)

* Redo Binary Sensors

* Redo Button

* Redo Climate

* Stage unfixed platforms

* Redo Cover

* Redo device tracker

* Redo lock

* Redo Media Player

* Redo Number

* Redo Select

* Redo Sensor

* Redo Switch

* Redo Update

* Fix setup_platform

* Add mixing snapshot

* Fix config flow

* Centralise entity testing

* Update snapshot

* Rename test_entities

* Fix assert_entities
pull/108947/head
Brett Adams 2024-01-27 22:43:55 +10:00 committed by GitHub
parent 950660b953
commit 858fb1fa37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 5831 additions and 314 deletions

View File

@ -5,10 +5,12 @@ from unittest.mock import patch
from aiohttp import ClientConnectionError, ClientResponseError
from aiohttp.client import RequestInfo
from syrupy import SnapshotAssertion
from homeassistant.components.tessie.const import DOMAIN, TessieStatus
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.const import CONF_ACCESS_TOKEN, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry, load_json_object_fixture
@ -44,7 +46,9 @@ ERROR_VIRTUAL_KEY = ClientResponseError(
ERROR_CONNECTION = ClientConnectionError()
async def setup_platform(hass: HomeAssistant, side_effect=None):
async def setup_platform(
hass: HomeAssistant, platforms: list[Platform] = [], side_effect=None
) -> MockConfigEntry:
"""Set up the Tessie platform."""
mock_entry = MockConfigEntry(
@ -57,8 +61,24 @@ async def setup_platform(hass: HomeAssistant, side_effect=None):
"homeassistant.components.tessie.get_state_of_all_vehicles",
return_value=TEST_STATE_OF_ALL_VEHICLES,
side_effect=side_effect,
):
), patch("homeassistant.components.tessie.PLATFORMS", platforms):
await hass.config_entries.async_setup(mock_entry.entry_id)
await hass.async_block_till_done()
return mock_entry
def assert_entities(
hass: HomeAssistant,
entry_id: str,
entity_registry: er.EntityRegistry,
snapshot: SnapshotAssertion,
) -> None:
"""Test that all entities match their snapshot."""
entity_entries = er.async_entries_for_config_entry(entity_registry, entry_id)
assert entity_entries
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert (state := hass.states.get(entity_entry.entity_id))
assert state == snapshot(name=f"{entity_entry.entity_id}-state")

View File

@ -0,0 +1,922 @@
# serializer version: 1
# name: test_binary_sensors[binary_sensor.test_auto_seat_climate_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_left',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_left',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_auto_seat_climate_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_auto_seat_climate_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_right',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_right',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_auto_seat_climate_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_battery_heater-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_battery_heater',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Battery heater',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_battery_heater_on',
'unique_id': 'VINVINVIN-charge_state_battery_heater_on',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_battery_heater-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Battery heater',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_battery_heater',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_cabin_overheat_protection-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Cabin overheat protection',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_cabin_overheat_protection-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Cabin overheat protection',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_cabin_overheat_protection_actively_cooling-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Cabin overheat protection actively cooling',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection_actively_cooling',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection_actively_cooling',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_cabin_overheat_protection_actively_cooling-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Cabin overheat protection actively cooling',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY_CHARGING: 'battery_charging'>,
'original_icon': None,
'original_name': 'Charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charging_state',
'unique_id': 'VINVINVIN-charge_state_charging_state',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery_charging',
'friendly_name': 'Test Charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_dashcam-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_dashcam',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Dashcam',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_dashcam_state',
'unique_id': 'VINVINVIN-vehicle_state_dashcam_state',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_dashcam-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Dashcam',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_dashcam',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_front_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fd_window',
'unique_id': 'VINVINVIN-vehicle_state_fd_window',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_front_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_front_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fp_window',
'unique_id': 'VINVINVIN-vehicle_state_fp_window',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_front_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_heat-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_heat',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Heat',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_steering_wheel_heat',
'unique_id': 'VINVINVIN-climate_state_auto_steering_wheel_heat',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_heat-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Heat',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_heat',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_preconditioning_enabled-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Preconditioning enabled',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_preconditioning_enabled',
'unique_id': 'VINVINVIN-charge_state_preconditioning_enabled',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_preconditioning_enabled-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Preconditioning enabled',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_rear_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rd_window',
'unique_id': 'VINVINVIN-vehicle_state_rd_window',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_rear_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_rear_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rp_window',
'unique_id': 'VINVINVIN-vehicle_state_rp_window',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_rear_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_scheduled_charging_pending-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Scheduled charging pending',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_scheduled_charging_pending',
'unique_id': 'VINVINVIN-charge_state_scheduled_charging_pending',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_scheduled_charging_pending-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Scheduled charging pending',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_status-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_status',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.CONNECTIVITY: 'connectivity'>,
'original_icon': None,
'original_name': 'Status',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'state',
'unique_id': 'VINVINVIN-state',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'connectivity',
'friendly_name': 'Test Status',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_status',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_front_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fl',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_front_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_front_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fr',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_front_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_rear_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rl',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_rear_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_rear_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rr',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_tire_pressure_warning_rear_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_trip_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_trip_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Trip charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_trip_charging',
'unique_id': 'VINVINVIN-charge_state_trip_charging',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_trip_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Trip charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_trip_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[binary_sensor.test_user_present-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_user_present',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PRESENCE: 'presence'>,
'original_icon': None,
'original_name': 'User present',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_is_user_present',
'unique_id': 'VINVINVIN-vehicle_state_is_user_present',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[binary_sensor.test_user_present-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'presence',
'friendly_name': 'Test User present',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_user_present',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---

View File

@ -0,0 +1,265 @@
# serializer version: 1
# name: test_buttons[button.test_flash_lights-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_flash_lights',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:flashlight',
'original_name': 'Flash lights',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'flash_lights',
'unique_id': 'VINVINVIN-flash_lights',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_flash_lights-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Flash lights',
'icon': 'mdi:flashlight',
}),
'context': <ANY>,
'entity_id': 'button.test_flash_lights',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.test_homelink-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_homelink',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:garage',
'original_name': 'Homelink',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'trigger_homelink',
'unique_id': 'VINVINVIN-trigger_homelink',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_homelink-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Homelink',
'icon': 'mdi:garage',
}),
'context': <ANY>,
'entity_id': 'button.test_homelink',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.test_honk_horn-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_honk_horn',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:bullhorn',
'original_name': 'Honk horn',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'honk',
'unique_id': 'VINVINVIN-honk',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_honk_horn-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Honk horn',
'icon': 'mdi:bullhorn',
}),
'context': <ANY>,
'entity_id': 'button.test_honk_horn',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.test_keyless_driving-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_keyless_driving',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:car-key',
'original_name': 'Keyless driving',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'enable_keyless_driving',
'unique_id': 'VINVINVIN-enable_keyless_driving',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_keyless_driving-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Keyless driving',
'icon': 'mdi:car-key',
}),
'context': <ANY>,
'entity_id': 'button.test_keyless_driving',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.test_play_fart-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_play_fart',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:volume-high',
'original_name': 'Play fart',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'boombox',
'unique_id': 'VINVINVIN-boombox',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_play_fart-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Play fart',
'icon': 'mdi:volume-high',
}),
'context': <ANY>,
'entity_id': 'button.test_play_fart',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.test_wake-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.test_wake',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:sleep-off',
'original_name': 'Wake',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'wake',
'unique_id': 'VINVINVIN-wake',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.test_wake-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Wake',
'icon': 'mdi:sleep-off',
}),
'context': <ANY>,
'entity_id': 'button.test_wake',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---

View File

@ -0,0 +1,994 @@
# serializer version: 1
# name: test_climate[binary_sensor.test_auto_seat_climate_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_left',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_left',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_auto_seat_climate_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_auto_seat_climate_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_right',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_right',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_auto_seat_climate_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_battery_heater-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_battery_heater',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Battery heater',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_battery_heater_on',
'unique_id': 'VINVINVIN-charge_state_battery_heater_on',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_battery_heater-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Battery heater',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_battery_heater',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_cabin_overheat_protection-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Cabin overheat protection',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_cabin_overheat_protection-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Cabin overheat protection',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_cabin_overheat_protection_actively_cooling-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Cabin overheat protection actively cooling',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection_actively_cooling',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection_actively_cooling',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_cabin_overheat_protection_actively_cooling-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Cabin overheat protection actively cooling',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY_CHARGING: 'battery_charging'>,
'original_icon': None,
'original_name': 'Charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charging_state',
'unique_id': 'VINVINVIN-charge_state_charging_state',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery_charging',
'friendly_name': 'Test Charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_dashcam-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_dashcam',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Dashcam',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_dashcam_state',
'unique_id': 'VINVINVIN-vehicle_state_dashcam_state',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_dashcam-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Dashcam',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_dashcam',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_front_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fd_window',
'unique_id': 'VINVINVIN-vehicle_state_fd_window',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_front_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_front_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fp_window',
'unique_id': 'VINVINVIN-vehicle_state_fp_window',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_front_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_heat-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_heat',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Heat',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_steering_wheel_heat',
'unique_id': 'VINVINVIN-climate_state_auto_steering_wheel_heat',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_heat-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Heat',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_heat',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_preconditioning_enabled-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Preconditioning enabled',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_preconditioning_enabled',
'unique_id': 'VINVINVIN-charge_state_preconditioning_enabled',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_preconditioning_enabled-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Preconditioning enabled',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_rear_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rd_window',
'unique_id': 'VINVINVIN-vehicle_state_rd_window',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_rear_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_rear_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rp_window',
'unique_id': 'VINVINVIN-vehicle_state_rp_window',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_rear_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_scheduled_charging_pending-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Scheduled charging pending',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_scheduled_charging_pending',
'unique_id': 'VINVINVIN-charge_state_scheduled_charging_pending',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_scheduled_charging_pending-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Scheduled charging pending',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_status-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_status',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.CONNECTIVITY: 'connectivity'>,
'original_icon': None,
'original_name': 'Status',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'state',
'unique_id': 'VINVINVIN-state',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'connectivity',
'friendly_name': 'Test Status',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_status',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_front_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fl',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_front_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_front_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fr',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_front_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_rear_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rl',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_rear_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_rear_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rr',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_tire_pressure_warning_rear_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_trip_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_trip_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Trip charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_trip_charging',
'unique_id': 'VINVINVIN-charge_state_trip_charging',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_trip_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Trip charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_trip_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[binary_sensor.test_user_present-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_user_present',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PRESENCE: 'presence'>,
'original_icon': None,
'original_name': 'User present',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_is_user_present',
'unique_id': 'VINVINVIN-vehicle_state_is_user_present',
'unit_of_measurement': None,
})
# ---
# name: test_climate[binary_sensor.test_user_present-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'presence',
'friendly_name': 'Test User present',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_user_present',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_climate[climate.test_climate-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'hvac_modes': list([
<HVACMode.HEAT_COOL: 'heat_cool'>,
<HVACMode.OFF: 'off'>,
]),
'max_temp': 28.0,
'min_temp': 15.0,
'preset_modes': list([
<TessieClimateKeeper.OFF: 'off'>,
<TessieClimateKeeper.ON: 'on'>,
<TessieClimateKeeper.DOG: 'dog'>,
<TessieClimateKeeper.CAMP: 'camp'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'climate',
'entity_category': None,
'entity_id': 'climate.test_climate',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Climate',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <ClimateEntityFeature: 17>,
'translation_key': 'primary',
'unique_id': 'VINVINVIN-primary',
'unit_of_measurement': None,
})
# ---
# name: test_climate[climate.test_climate-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_temperature': 30.5,
'friendly_name': 'Test Climate',
'hvac_modes': list([
<HVACMode.HEAT_COOL: 'heat_cool'>,
<HVACMode.OFF: 'off'>,
]),
'max_temp': 28.0,
'min_temp': 15.0,
'preset_mode': 'off',
'preset_modes': list([
<TessieClimateKeeper.OFF: 'off'>,
<TessieClimateKeeper.ON: 'on'>,
<TessieClimateKeeper.DOG: 'dog'>,
<TessieClimateKeeper.CAMP: 'camp'>,
]),
'supported_features': <ClimateEntityFeature: 17>,
'temperature': 22.5,
}),
'context': <ANY>,
'entity_id': 'climate.test_climate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---

View File

@ -1,5 +1,36 @@
# serializer version: 1
# name: test_covers[cover.test_charge_port_door-open_unlock_charge_port-close_charge_port][cover.test_charge_port_door]
# name: test_covers[cover.test_charge_port_door-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'cover',
'entity_category': None,
'entity_id': 'cover.test_charge_port_door',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <CoverDeviceClass.DOOR: 'door'>,
'original_icon': None,
'original_name': 'Charge port door',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <CoverEntityFeature: 3>,
'translation_key': 'charge_state_charge_port_door_open',
'unique_id': 'VINVINVIN-charge_state_charge_port_door_open',
'unit_of_measurement': None,
})
# ---
# name: test_covers[cover.test_charge_port_door-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
@ -13,7 +44,38 @@
'state': 'open',
})
# ---
# name: test_covers[cover.test_frunk-open_front_trunk-False][cover.test_frunk]
# name: test_covers[cover.test_frunk-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'cover',
'entity_category': None,
'entity_id': 'cover.test_frunk',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <CoverDeviceClass.DOOR: 'door'>,
'original_icon': None,
'original_name': 'Frunk',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <CoverEntityFeature: 1>,
'translation_key': 'vehicle_state_ft',
'unique_id': 'VINVINVIN-vehicle_state_ft',
'unit_of_measurement': None,
})
# ---
# name: test_covers[cover.test_frunk-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
@ -27,7 +89,38 @@
'state': 'closed',
})
# ---
# name: test_covers[cover.test_trunk-open_close_rear_trunk-open_close_rear_trunk][cover.test_trunk]
# name: test_covers[cover.test_trunk-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'cover',
'entity_category': None,
'entity_id': 'cover.test_trunk',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <CoverDeviceClass.DOOR: 'door'>,
'original_icon': None,
'original_name': 'Trunk',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <CoverEntityFeature: 3>,
'translation_key': 'vehicle_state_rt',
'unique_id': 'VINVINVIN-vehicle_state_rt',
'unit_of_measurement': None,
})
# ---
# name: test_covers[cover.test_trunk-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
@ -41,7 +134,38 @@
'state': 'closed',
})
# ---
# name: test_covers[cover.test_vent_windows-vent_windows-close_windows][cover.test_vent_windows]
# name: test_covers[cover.test_vent_windows-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'cover',
'entity_category': None,
'entity_id': 'cover.test_vent_windows',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <CoverDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Vent windows',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <CoverEntityFeature: 3>,
'translation_key': 'windows',
'unique_id': 'VINVINVIN-windows',
'unit_of_measurement': None,
})
# ---
# name: test_covers[cover.test_vent_windows-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',

View File

@ -0,0 +1,922 @@
# serializer version: 1
# name: test_device_tracker[binary_sensor.test_auto_seat_climate_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_left',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_left',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_auto_seat_climate_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_auto_seat_climate_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Auto seat climate right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_seat_climate_right',
'unique_id': 'VINVINVIN-climate_state_auto_seat_climate_right',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_auto_seat_climate_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Auto seat climate right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_auto_seat_climate_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_battery_heater-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_battery_heater',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Battery heater',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_battery_heater_on',
'unique_id': 'VINVINVIN-charge_state_battery_heater_on',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_battery_heater-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Battery heater',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_battery_heater',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_cabin_overheat_protection-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Cabin overheat protection',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_cabin_overheat_protection-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Cabin overheat protection',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_cabin_overheat_protection_actively_cooling-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Cabin overheat protection actively cooling',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_cabin_overheat_protection_actively_cooling',
'unique_id': 'VINVINVIN-climate_state_cabin_overheat_protection_actively_cooling',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_cabin_overheat_protection_actively_cooling-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Cabin overheat protection actively cooling',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_cabin_overheat_protection_actively_cooling',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY_CHARGING: 'battery_charging'>,
'original_icon': None,
'original_name': 'Charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charging_state',
'unique_id': 'VINVINVIN-charge_state_charging_state',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery_charging',
'friendly_name': 'Test Charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_dashcam-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_dashcam',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'Dashcam',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_dashcam_state',
'unique_id': 'VINVINVIN-vehicle_state_dashcam_state',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_dashcam-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'Test Dashcam',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_dashcam',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_front_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fd_window',
'unique_id': 'VINVINVIN-vehicle_state_fd_window',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_front_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_front_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Front passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_fp_window',
'unique_id': 'VINVINVIN-vehicle_state_fp_window',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_front_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Front passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_front_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_heat-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_heat',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.HEAT: 'heat'>,
'original_icon': None,
'original_name': 'Heat',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_auto_steering_wheel_heat',
'unique_id': 'VINVINVIN-climate_state_auto_steering_wheel_heat',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_heat-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'heat',
'friendly_name': 'Test Heat',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_heat',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_preconditioning_enabled-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Preconditioning enabled',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_preconditioning_enabled',
'unique_id': 'VINVINVIN-charge_state_preconditioning_enabled',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_preconditioning_enabled-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Preconditioning enabled',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_preconditioning_enabled',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_rear_driver_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear driver window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rd_window',
'unique_id': 'VINVINVIN-vehicle_state_rd_window',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_rear_driver_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear driver window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_driver_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_rear_passenger_window-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.WINDOW: 'window'>,
'original_icon': None,
'original_name': 'Rear passenger window',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_rp_window',
'unique_id': 'VINVINVIN-vehicle_state_rp_window',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_rear_passenger_window-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'window',
'friendly_name': 'Test Rear passenger window',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_rear_passenger_window',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_scheduled_charging_pending-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Scheduled charging pending',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_scheduled_charging_pending',
'unique_id': 'VINVINVIN-charge_state_scheduled_charging_pending',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_scheduled_charging_pending-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Scheduled charging pending',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_scheduled_charging_pending',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_status-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_status',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.CONNECTIVITY: 'connectivity'>,
'original_icon': None,
'original_name': 'Status',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'state',
'unique_id': 'VINVINVIN-state',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_status-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'connectivity',
'friendly_name': 'Test Status',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_status',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_front_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fl',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_front_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_front_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning front right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_fr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_fr',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_front_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning front right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_front_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_rear_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rl',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rl',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_rear_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear left',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_rear_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Tire pressure warning rear right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_tpms_soft_warning_rr',
'unique_id': 'VINVINVIN-vehicle_state_tpms_soft_warning_rr',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_tire_pressure_warning_rear_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Test Tire pressure warning rear right',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_tire_pressure_warning_rear_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_trip_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.test_trip_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Trip charging',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_trip_charging',
'unique_id': 'VINVINVIN-charge_state_trip_charging',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_trip_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Trip charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_trip_charging',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_device_tracker[binary_sensor.test_user_present-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.test_user_present',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PRESENCE: 'presence'>,
'original_icon': None,
'original_name': 'User present',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_is_user_present',
'unique_id': 'VINVINVIN-vehicle_state_is_user_present',
'unit_of_measurement': None,
})
# ---
# name: test_device_tracker[binary_sensor.test_user_present-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'presence',
'friendly_name': 'Test User present',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.test_user_present',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---

View File

@ -0,0 +1,89 @@
# serializer version: 1
# name: test_locks[lock.test_charge_cable_lock-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'lock',
'entity_category': None,
'entity_id': 'lock.test_charge_cable_lock',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Charge cable lock',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charge_port_latch',
'unique_id': 'VINVINVIN-charge_state_charge_port_latch',
'unit_of_measurement': None,
})
# ---
# name: test_locks[lock.test_charge_cable_lock-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Charge cable lock',
'supported_features': <LockEntityFeature: 0>,
}),
'context': <ANY>,
'entity_id': 'lock.test_charge_cable_lock',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'locked',
})
# ---
# name: test_locks[lock.test_lock-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'lock',
'entity_category': None,
'entity_id': 'lock.test_lock',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Lock',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_locked',
'unique_id': 'VINVINVIN-vehicle_state_locked',
'unit_of_measurement': None,
})
# ---
# name: test_locks[lock.test_lock-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Lock',
'supported_features': <LockEntityFeature: 0>,
}),
'context': <ANY>,
'entity_id': 'lock.test_lock',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'locked',
})
# ---

View File

@ -1,5 +1,37 @@
# serializer version: 1
# name: test_media_player_idle
# name: test_media_player[media_player.test_media_player-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'media_player',
'entity_category': None,
'entity_id': 'media_player.test_media_player',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <MediaPlayerDeviceClass.SPEAKER: 'speaker'>,
'original_icon': None,
'original_name': 'Media player',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'media',
'unique_id': 'VINVINVIN-media',
'unit_of_measurement': None,
})
# ---
# name: test_media_player[media_player.test_media_player-paused]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'speaker',
@ -14,7 +46,7 @@
'state': 'idle',
})
# ---
# name: test_media_player_idle.1
# name: test_media_player[media_player.test_media_player-playing]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'speaker',
@ -29,31 +61,16 @@
'state': 'idle',
})
# ---
# name: test_media_player_playing
# name: test_media_player[media_player.test_media_player-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'speaker',
'friendly_name': 'Test',
'friendly_name': 'Test Media player',
'supported_features': <MediaPlayerEntityFeature: 0>,
'volume_level': 0.22580323309042688,
}),
'context': <ANY>,
'entity_id': 'media_player.test',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'idle',
})
# ---
# name: test_sensors
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'speaker',
'friendly_name': 'Test',
'supported_features': <MediaPlayerEntityFeature: 0>,
'volume_level': 0.22580323309042688,
}),
'context': <ANY>,
'entity_id': 'media_player.test',
'entity_id': 'media_player.test_media_player',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'idle',

View File

@ -0,0 +1,163 @@
# serializer version: 1
# name: test_numbers[number.test_charge_current-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 32,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.test_charge_current',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.CURRENT: 'current'>,
'original_icon': None,
'original_name': 'Charge current',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charge_current_request',
'unique_id': 'VINVINVIN-charge_state_charge_current_request',
'unit_of_measurement': <UnitOfElectricCurrent.AMPERE: 'A'>,
})
# ---
# name: test_numbers[number.test_charge_current-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'current',
'friendly_name': 'Test Charge current',
'max': 32,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'step': 1,
'unit_of_measurement': <UnitOfElectricCurrent.AMPERE: 'A'>,
}),
'context': <ANY>,
'entity_id': 'number.test_charge_current',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '32',
})
# ---
# name: test_numbers[number.test_charge_limit-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 50,
'mode': <NumberMode.AUTO: 'auto'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.test_charge_limit',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.BATTERY: 'battery'>,
'original_icon': None,
'original_name': 'Charge limit',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charge_limit_soc',
'unique_id': 'VINVINVIN-charge_state_charge_limit_soc',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.test_charge_limit-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery',
'friendly_name': 'Test Charge limit',
'max': 100,
'min': 50,
'mode': <NumberMode.AUTO: 'auto'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.test_charge_limit',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '80',
})
# ---
# name: test_numbers[number.test_speed_limit-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 120,
'min': 50,
'mode': <NumberMode.BOX: 'box'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.test_speed_limit',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.SPEED: 'speed'>,
'original_icon': None,
'original_name': 'Speed limit',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_speed_limit_mode_current_limit_mph',
'unique_id': 'VINVINVIN-vehicle_state_speed_limit_mode_current_limit_mph',
'unit_of_measurement': <UnitOfSpeed.MILES_PER_HOUR: 'mph'>,
})
# ---
# name: test_numbers[number.test_speed_limit-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'speed',
'friendly_name': 'Test Speed limit',
'max': 120,
'min': 50,
'mode': <NumberMode.BOX: 'box'>,
'step': 1,
'unit_of_measurement': <UnitOfSpeed.MILES_PER_HOUR: 'mph'>,
}),
'context': <ANY>,
'entity_id': 'number.test_speed_limit',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '74.564543',
})
# ---

View File

@ -0,0 +1,299 @@
# serializer version: 1
# name: test_select[select.test_seat_heater_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.test_seat_heater_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Seat heater left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_seat_heater_left',
'unique_id': 'VINVINVIN-climate_state_seat_heater_left',
'unit_of_measurement': None,
})
# ---
# name: test_select[select.test_seat_heater_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater left',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_select[select.test_seat_heater_rear_center-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.test_seat_heater_rear_center',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Seat heater rear center',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_seat_heater_rear_center',
'unique_id': 'VINVINVIN-climate_state_seat_heater_rear_center',
'unit_of_measurement': None,
})
# ---
# name: test_select[select.test_seat_heater_rear_center-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater rear center',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_rear_center',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_select[select.test_seat_heater_rear_left-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.test_seat_heater_rear_left',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Seat heater rear left',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_seat_heater_rear_left',
'unique_id': 'VINVINVIN-climate_state_seat_heater_rear_left',
'unit_of_measurement': None,
})
# ---
# name: test_select[select.test_seat_heater_rear_left-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater rear left',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_rear_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_select[select.test_seat_heater_rear_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.test_seat_heater_rear_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Seat heater rear right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_seat_heater_rear_right',
'unique_id': 'VINVINVIN-climate_state_seat_heater_rear_right',
'unit_of_measurement': None,
})
# ---
# name: test_select[select.test_seat_heater_rear_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater rear right',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_rear_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_select[select.test_seat_heater_right-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.test_seat_heater_right',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Seat heater right',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_seat_heater_right',
'unique_id': 'VINVINVIN-climate_state_seat_heater_right',
'unit_of_measurement': None,
})
# ---
# name: test_select[select.test_seat_heater_right-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater right',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_right',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_select[select_option]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Seat heater left',
'options': list([
<TessieSeatHeaterOptions.OFF: 'off'>,
<TessieSeatHeaterOptions.LOW: 'low'>,
<TessieSeatHeaterOptions.MEDIUM: 'medium'>,
<TessieSeatHeaterOptions.HIGH: 'high'>,
]),
}),
'context': <ANY>,
'entity_id': 'select.test_seat_heater_left',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'low',
})
# ---

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,254 @@
# serializer version: 1
# name: test_switches[switch.test_charge-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.test_charge',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': 'mdi:ev-station',
'original_name': 'Charge',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'charge_state_charge_enable_request',
'unique_id': 'VINVINVIN-charge_state_charge_enable_request',
'unit_of_measurement': None,
})
# ---
# name: test_switches[switch.test_charge-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Charge',
'icon': 'mdi:ev-station',
}),
'context': <ANY>,
'entity_id': 'switch.test_charge',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_switches[switch.test_defrost_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.test_defrost_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': 'mdi:snowflake',
'original_name': 'Defrost mode',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_defrost_mode',
'unique_id': 'VINVINVIN-climate_state_defrost_mode',
'unit_of_measurement': None,
})
# ---
# name: test_switches[switch.test_defrost_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Defrost mode',
'icon': 'mdi:snowflake',
}),
'context': <ANY>,
'entity_id': 'switch.test_defrost_mode',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_switches[switch.test_sentry_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.test_sentry_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': 'mdi:shield-car',
'original_name': 'Sentry mode',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_sentry_mode',
'unique_id': 'VINVINVIN-vehicle_state_sentry_mode',
'unit_of_measurement': None,
})
# ---
# name: test_switches[switch.test_sentry_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Sentry mode',
'icon': 'mdi:shield-car',
}),
'context': <ANY>,
'entity_id': 'switch.test_sentry_mode',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_switches[switch.test_steering_wheel_heater-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.test_steering_wheel_heater',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': 'mdi:steering',
'original_name': 'Steering wheel heater',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'climate_state_steering_wheel_heater',
'unique_id': 'VINVINVIN-climate_state_steering_wheel_heater',
'unit_of_measurement': None,
})
# ---
# name: test_switches[switch.test_steering_wheel_heater-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Steering wheel heater',
'icon': 'mdi:steering',
}),
'context': <ANY>,
'entity_id': 'switch.test_steering_wheel_heater',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_switches[switch.test_valet_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.test_valet_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': 'mdi:car-key',
'original_name': 'Valet mode',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'vehicle_state_valet_mode',
'unique_id': 'VINVINVIN-vehicle_state_valet_mode',
'unit_of_measurement': None,
})
# ---
# name: test_switches[switch.test_valet_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Valet mode',
'icon': 'mdi:car-key',
}),
'context': <ANY>,
'entity_id': 'switch.test_valet_mode',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_switches[turn_off]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Charge',
'icon': 'mdi:ev-station',
}),
'context': <ANY>,
'entity_id': 'switch.test_charge',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_switches[turn_on]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'Test Charge',
'icon': 'mdi:ev-station',
}),
'context': <ANY>,
'entity_id': 'switch.test_charge',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---

View File

@ -0,0 +1,54 @@
# serializer version: 1
# name: test_updates[update.test_update-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'update',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'update.test_update',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Update',
'platform': 'tessie',
'previous_unique_id': None,
'supported_features': <UpdateEntityFeature: 5>,
'translation_key': 'update',
'unique_id': 'VINVINVIN-update',
'unit_of_measurement': None,
})
# ---
# name: test_updates[update.test_update-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'auto_update': False,
'entity_picture': 'https://brands.home-assistant.io/_/tessie/icon.png',
'friendly_name': 'Test Update',
'in_progress': False,
'installed_version': '2023.38.6',
'latest_version': '2023.44.30.4',
'release_summary': None,
'release_url': None,
'skipped_version': None,
'supported_features': <UpdateEntityFeature: 5>,
'title': None,
}),
'context': <ANY>,
'entity_id': 'update.test_update',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---

View File

@ -1,33 +1,18 @@
"""Test the Tessie binary sensor platform."""
from syrupy import SnapshotAssertion
from homeassistant.components.tessie.binary_sensor import DESCRIPTIONS
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import TEST_VEHICLE_STATE_ONLINE, setup_platform
OFFON = [STATE_OFF, STATE_ON]
from .common import assert_entities, setup_platform
async def test_binary_sensors(hass: HomeAssistant) -> None:
async def test_binary_sensors(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the binary sensor entities are correct."""
assert len(hass.states.async_all("binary_sensor")) == 0
entry = await setup_platform(hass, [Platform.BINARY_SENSOR])
await setup_platform(hass)
assert len(hass.states.async_all("binary_sensor")) == len(DESCRIPTIONS)
state = hass.states.get("binary_sensor.test_battery_heater").state
is_on = state == STATE_ON
assert is_on == TEST_VEHICLE_STATE_ONLINE["charge_state"]["battery_heater_on"]
state = hass.states.get("binary_sensor.test_charging").state
is_on = state == STATE_ON
assert is_on == (
TEST_VEHICLE_STATE_ONLINE["charge_state"]["charging_state"] == "Charging"
)
state = hass.states.get("binary_sensor.test_auto_seat_climate_left").state
is_on = state == STATE_ON
assert is_on == TEST_VEHICLE_STATE_ONLINE["climate_state"]["auto_seat_climate_left"]
assert_entities(hass, entry.entry_id, entity_registry, snapshot)

View File

@ -1,39 +1,40 @@
"""Test the Tessie button platform."""
from unittest.mock import patch
import pytest
from syrupy import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import setup_platform
from .common import assert_entities, setup_platform
@pytest.mark.parametrize(
("entity_id", "func"),
[
async def test_buttons(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the button entities are correct."""
entry = await setup_platform(hass, [Platform.BUTTON])
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
for entity_id, func in [
("button.test_wake", "wake"),
("button.test_flash_lights", "flash_lights"),
("button.test_honk_horn", "honk"),
("button.test_homelink", "trigger_homelink"),
("button.test_keyless_driving", "enable_keyless_driving"),
("button.test_play_fart", "boombox"),
],
)
async def test_buttons(hass: HomeAssistant, entity_id, func) -> None:
"""Tests that the button entities are correct."""
await setup_platform(hass)
# Test wake button
with patch(
f"homeassistant.components.tessie.button.{func}",
) as mock_wake:
await hass.services.async_call(
BUTTON_DOMAIN,
SERVICE_PRESS,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_wake.assert_called_once()
]:
with patch(
f"homeassistant.components.tessie.button.{func}",
) as mock_press:
await hass.services.async_call(
BUTTON_DOMAIN,
SERVICE_PRESS,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_press.assert_called_once()

View File

@ -2,53 +2,38 @@
from unittest.mock import patch
import pytest
from syrupy import SnapshotAssertion
from homeassistant.components.climate import (
ATTR_HVAC_MODE,
ATTR_MAX_TEMP,
ATTR_MIN_TEMP,
ATTR_PRESET_MODE,
ATTR_TEMPERATURE,
DOMAIN as CLIMATE_DOMAIN,
SERVICE_SET_HVAC_MODE,
SERVICE_SET_PRESET_MODE,
SERVICE_SET_TEMPERATURE,
SERVICE_TURN_ON,
SERVICE_TURN_OFF,
HVACMode,
)
from homeassistant.components.tessie.const import TessieClimateKeeper
from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er
from .common import (
ERROR_UNKNOWN,
TEST_RESPONSE,
TEST_VEHICLE_STATE_ONLINE,
setup_platform,
)
from .common import ERROR_UNKNOWN, TEST_RESPONSE, assert_entities, setup_platform
async def test_climate(hass: HomeAssistant) -> None:
async def test_climate(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the climate entity is correct."""
assert len(hass.states.async_all(CLIMATE_DOMAIN)) == 0
entry = await setup_platform(hass, [Platform.CLIMATE])
await setup_platform(hass)
assert len(hass.states.async_all(CLIMATE_DOMAIN)) == 1
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
entity_id = "climate.test_climate"
state = hass.states.get(entity_id)
assert state.state == STATE_OFF
assert (
state.attributes.get(ATTR_MIN_TEMP)
== TEST_VEHICLE_STATE_ONLINE["climate_state"]["min_avail_temp"]
)
assert (
state.attributes.get(ATTR_MAX_TEMP)
== TEST_VEHICLE_STATE_ONLINE["climate_state"]["max_avail_temp"]
)
# Test setting climate on
with patch(
@ -62,6 +47,8 @@ async def test_climate(hass: HomeAssistant) -> None:
blocking=True,
)
mock_set.assert_called_once()
state = hass.states.get(entity_id)
assert state.state == HVACMode.HEAT_COOL
# Test setting climate temp
with patch(
@ -75,6 +62,8 @@ async def test_climate(hass: HomeAssistant) -> None:
blocking=True,
)
mock_set.assert_called_once()
state = hass.states.get(entity_id)
assert state.attributes[ATTR_TEMPERATURE] == 20
# Test setting climate preset
with patch(
@ -88,6 +77,8 @@ async def test_climate(hass: HomeAssistant) -> None:
blocking=True,
)
mock_set.assert_called_once()
state = hass.states.get(entity_id)
assert state.attributes[ATTR_PRESET_MODE] == TessieClimateKeeper.ON
# Test setting climate off
with patch(
@ -101,22 +92,24 @@ async def test_climate(hass: HomeAssistant) -> None:
blocking=True,
)
mock_set.assert_called_once()
state = hass.states.get(entity_id)
assert state.state == HVACMode.OFF
async def test_errors(hass: HomeAssistant) -> None:
"""Tests virtual key error is handled."""
"""Tests errors are handled."""
await setup_platform(hass)
await setup_platform(hass, [Platform.CLIMATE])
entity_id = "climate.test_climate"
# Test setting climate on with unknown error
with patch(
"homeassistant.components.tessie.climate.start_climate_preconditioning",
"homeassistant.components.tessie.climate.stop_climate",
side_effect=ERROR_UNKNOWN,
) as mock_set, pytest.raises(HomeAssistantError) as error:
await hass.services.async_call(
CLIMATE_DOMAIN,
SERVICE_TURN_ON,
SERVICE_TURN_OFF,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)

View File

@ -6,7 +6,7 @@ import pytest
from homeassistant import config_entries
from homeassistant.components.tessie.const import DOMAIN
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.const import CONF_ACCESS_TOKEN, Platform
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
@ -132,9 +132,9 @@ async def test_reauth(hass: HomeAssistant, mock_get_state_of_all_vehicles) -> No
async def test_reauth_errors(
hass: HomeAssistant, mock_get_state_of_all_vehicles, side_effect, error
) -> None:
"""Test reauth flows that failscript/."""
"""Test reauth flows that fail."""
mock_entry = await setup_platform(hass)
mock_entry = await setup_platform(hass, [Platform.BINARY_SENSOR])
mock_get_state_of_all_vehicles.side_effect = side_effect
result = await hass.config_entries.flow.async_init(

View File

@ -1,8 +1,9 @@
"""Test the Tessie sensor platform."""
from datetime import timedelta
from homeassistant.components.tessie import PLATFORMS
from homeassistant.components.tessie.coordinator import TESSIE_SYNC_INTERVAL
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNAVAILABLE
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNAVAILABLE, Platform
from homeassistant.core import HomeAssistant
from homeassistant.util.dt import utcnow
@ -24,7 +25,7 @@ async def test_coordinator_online(
) -> None:
"""Tests that the coordinator handles online vehicles."""
await setup_platform(hass)
await setup_platform(hass, PLATFORMS)
async_fire_time_changed(hass, utcnow() + WAIT)
await hass.async_block_till_done()
@ -36,7 +37,7 @@ async def test_coordinator_online(
async def test_coordinator_asleep(hass: HomeAssistant, mock_get_status) -> None:
"""Tests that the coordinator handles asleep vehicles."""
await setup_platform(hass)
await setup_platform(hass, [Platform.BINARY_SENSOR])
mock_get_status.return_value = TEST_VEHICLE_STATUS_ASLEEP
async_fire_time_changed(hass, utcnow() + WAIT)
@ -49,7 +50,7 @@ async def test_coordinator_clienterror(hass: HomeAssistant, mock_get_status) ->
"""Tests that the coordinator handles client errors."""
mock_get_status.side_effect = ERROR_UNKNOWN
await setup_platform(hass)
await setup_platform(hass, [Platform.BINARY_SENSOR])
async_fire_time_changed(hass, utcnow() + WAIT)
await hass.async_block_till_done()
@ -61,7 +62,7 @@ async def test_coordinator_auth(hass: HomeAssistant, mock_get_status) -> None:
"""Tests that the coordinator handles timeout errors."""
mock_get_status.side_effect = ERROR_AUTH
await setup_platform(hass)
await setup_platform(hass, [Platform.BINARY_SENSOR])
async_fire_time_changed(hass, utcnow() + WAIT)
await hass.async_block_till_done()
@ -72,7 +73,7 @@ async def test_coordinator_connection(hass: HomeAssistant, mock_get_status) -> N
"""Tests that the coordinator handles connection errors."""
mock_get_status.side_effect = ERROR_CONNECTION
await setup_platform(hass)
await setup_platform(hass, [Platform.BINARY_SENSOR])
async_fire_time_changed(hass, utcnow() + WAIT)
await hass.async_block_till_done()
mock_get_status.assert_called_once()

View File

@ -11,70 +11,72 @@ from homeassistant.components.cover import (
STATE_CLOSED,
STATE_OPEN,
)
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er
from .common import ERROR_UNKNOWN, TEST_RESPONSE, TEST_RESPONSE_ERROR, setup_platform
from .common import (
ERROR_UNKNOWN,
TEST_RESPONSE,
TEST_RESPONSE_ERROR,
assert_entities,
setup_platform,
)
@pytest.mark.parametrize(
("entity_id", "openfunc", "closefunc"),
[
async def test_covers(
hass: HomeAssistant,
snapshot: SnapshotAssertion,
entity_registry: er.EntityRegistry,
) -> None:
"""Tests that the window cover entity is correct."""
entry = await setup_platform(hass, [Platform.COVER])
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
for entity_id, openfunc, closefunc in [
("cover.test_vent_windows", "vent_windows", "close_windows"),
("cover.test_charge_port_door", "open_unlock_charge_port", "close_charge_port"),
("cover.test_frunk", "open_front_trunk", False),
("cover.test_trunk", "open_close_rear_trunk", "open_close_rear_trunk"),
],
)
async def test_covers(
hass: HomeAssistant,
entity_id: str,
openfunc: str,
closefunc: str,
snapshot: SnapshotAssertion,
) -> None:
"""Tests that the window cover entity is correct."""
]:
# Test open windows
if openfunc:
with patch(
f"homeassistant.components.tessie.cover.{openfunc}",
return_value=TEST_RESPONSE,
) as mock_open:
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_OPEN_COVER,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_open.assert_called_once()
assert hass.states.get(entity_id).state == STATE_OPEN
await setup_platform(hass)
assert hass.states.get(entity_id) == snapshot(name=entity_id)
# Test open windows
if openfunc:
with patch(
f"homeassistant.components.tessie.cover.{openfunc}",
return_value=TEST_RESPONSE,
) as mock_open:
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_OPEN_COVER,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_open.assert_called_once()
assert hass.states.get(entity_id).state == STATE_OPEN
# Test close windows
if closefunc:
with patch(
f"homeassistant.components.tessie.cover.{closefunc}",
return_value=TEST_RESPONSE,
) as mock_close:
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_CLOSE_COVER,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_close.assert_called_once()
assert hass.states.get(entity_id).state == STATE_CLOSED
# Test close windows
if closefunc:
with patch(
f"homeassistant.components.tessie.cover.{closefunc}",
return_value=TEST_RESPONSE,
) as mock_close:
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_CLOSE_COVER,
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_close.assert_called_once()
assert hass.states.get(entity_id).state == STATE_CLOSED
async def test_errors(hass: HomeAssistant) -> None:
"""Tests errors are handled."""
await setup_platform(hass)
await setup_platform(hass, [Platform.COVER])
entity_id = "cover.test_charge_port_door"
# Test setting cover open with unknown error
@ -91,13 +93,6 @@ async def test_errors(hass: HomeAssistant) -> None:
mock_set.assert_called_once()
assert error.from_exception == ERROR_UNKNOWN
async def test_response_error(hass: HomeAssistant) -> None:
"""Tests response errors are handled."""
await setup_platform(hass)
entity_id = "cover.test_charge_port_door"
# Test setting cover open with unknown error
with patch(
"homeassistant.components.tessie.cover.open_unlock_charge_port",

View File

@ -1,36 +1,19 @@
"""Test the Tessie device tracker platform."""
from syrupy import SnapshotAssertion
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import TEST_STATE_OF_ALL_VEHICLES, setup_platform
STATES = TEST_STATE_OF_ALL_VEHICLES["results"][0]["last_state"]
from .common import assert_entities, setup_platform
async def test_device_tracker(hass: HomeAssistant) -> None:
async def test_device_tracker(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the device tracker entities are correct."""
assert len(hass.states.async_all(DEVICE_TRACKER_DOMAIN)) == 0
entry = await setup_platform(hass, [Platform.BINARY_SENSOR])
await setup_platform(hass)
assert len(hass.states.async_all(DEVICE_TRACKER_DOMAIN)) == 2
entity_id = "device_tracker.test_location"
state = hass.states.get(entity_id)
assert state.attributes.get(ATTR_LATITUDE) == STATES["drive_state"]["latitude"]
assert state.attributes.get(ATTR_LONGITUDE) == STATES["drive_state"]["longitude"]
entity_id = "device_tracker.test_route"
state = hass.states.get(entity_id)
assert (
state.attributes.get(ATTR_LATITUDE)
== STATES["drive_state"]["active_route_latitude"]
)
assert (
state.attributes.get(ATTR_LONGITUDE)
== STATES["drive_state"]["active_route_longitude"]
)
assert_entities(hass, entry.entry_id, entity_registry, snapshot)

View File

@ -3,34 +3,32 @@
from unittest.mock import patch
import pytest
from syrupy import SnapshotAssertion
from homeassistant.components.lock import (
DOMAIN as LOCK_DOMAIN,
SERVICE_LOCK,
SERVICE_UNLOCK,
)
from homeassistant.const import ATTR_ENTITY_ID, STATE_LOCKED, STATE_UNLOCKED
from homeassistant.const import ATTR_ENTITY_ID, STATE_LOCKED, STATE_UNLOCKED, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers import entity_registry as er
from .common import TEST_VEHICLE_STATE_ONLINE, setup_platform
from .common import assert_entities, setup_platform
async def test_locks(hass: HomeAssistant) -> None:
async def test_locks(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the lock entity is correct."""
assert len(hass.states.async_all("lock")) == 0
entry = await setup_platform(hass, [Platform.LOCK])
await setup_platform(hass)
assert len(hass.states.async_all("lock")) == 2
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
entity_id = "lock.test_lock"
assert (
hass.states.get(entity_id).state == STATE_LOCKED
) == TEST_VEHICLE_STATE_ONLINE["vehicle_state"]["locked"]
# Test lock set value functions
with patch("homeassistant.components.tessie.lock.lock") as mock_run:
await hass.services.async_call(
@ -39,8 +37,8 @@ async def test_locks(hass: HomeAssistant) -> None:
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
assert hass.states.get(entity_id).state == STATE_LOCKED
mock_run.assert_called_once()
assert hass.states.get(entity_id).state == STATE_LOCKED
with patch("homeassistant.components.tessie.lock.unlock") as mock_run:
await hass.services.async_call(
@ -49,7 +47,7 @@ async def test_locks(hass: HomeAssistant) -> None:
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
assert hass.states.get(entity_id).state == STATE_UNLOCKED
mock_run.assert_called_once()
# Test charge cable lock set value functions

View File

@ -6,41 +6,39 @@ from freezegun.api import FrozenDateTimeFactory
from syrupy import SnapshotAssertion
from homeassistant.components.tessie.coordinator import TESSIE_SYNC_INTERVAL
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import (
TEST_STATE_OF_ALL_VEHICLES,
TEST_VEHICLE_STATE_ONLINE,
setup_platform,
)
from .common import setup_platform
from tests.common import async_fire_time_changed
WAIT = timedelta(seconds=TESSIE_SYNC_INTERVAL)
MEDIA_INFO_1 = TEST_STATE_OF_ALL_VEHICLES["results"][0]["last_state"]["vehicle_state"][
"media_info"
]
MEDIA_INFO_2 = TEST_VEHICLE_STATE_ONLINE["vehicle_state"]["media_info"]
async def test_media_player_idle(
hass: HomeAssistant, freezer: FrozenDateTimeFactory, snapshot: SnapshotAssertion
async def test_media_player(
hass: HomeAssistant,
freezer: FrozenDateTimeFactory,
snapshot: SnapshotAssertion,
entity_registry: er.EntityRegistry,
) -> None:
"""Tests that the media player entity is correct when idle."""
assert len(hass.states.async_all("media_player")) == 0
entry = await setup_platform(hass, [Platform.MEDIA_PLAYER])
await setup_platform(hass)
entity_entries = er.async_entries_for_config_entry(entity_registry, entry.entry_id)
assert len(hass.states.async_all("media_player")) == 1
assert entity_entries
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert (state := hass.states.get(entity_entry.entity_id))
assert state == snapshot(name=f"{entity_entry.entity_id}-paused")
state = hass.states.get("media_player.test_media_player")
assert state == snapshot
# The refresh fixture has music playing
freezer.tick(WAIT)
async_fire_time_changed(hass)
# Trigger coordinator refresh since it has a different fixture.
freezer.tick(WAIT)
async_fire_time_changed(hass)
state = hass.states.get("media_player.test_media_player")
assert state == snapshot
assert hass.states.get(entity_entry.entity_id) == snapshot(
name=f"{entity_entry.entity_id}-playing"
)

View File

@ -2,70 +2,61 @@
from unittest.mock import patch
from syrupy import SnapshotAssertion
from homeassistant.components.number import DOMAIN as NUMBER_DOMAIN, SERVICE_SET_VALUE
from homeassistant.components.tessie.number import DESCRIPTIONS
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import TEST_VEHICLE_STATE_ONLINE, setup_platform
from .common import assert_entities, setup_platform
async def test_numbers(hass: HomeAssistant) -> None:
async def test_numbers(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the number entities are correct."""
assert len(hass.states.async_all("number")) == 0
entry = await setup_platform(hass, [Platform.NUMBER])
await setup_platform(hass)
assert len(hass.states.async_all("number")) == len(DESCRIPTIONS)
assert hass.states.get("number.test_charge_current").state == str(
TEST_VEHICLE_STATE_ONLINE["charge_state"]["charge_current_request"]
)
assert hass.states.get("number.test_charge_limit").state == str(
TEST_VEHICLE_STATE_ONLINE["charge_state"]["charge_limit_soc"]
)
assert hass.states.get("number.test_speed_limit").state == str(
TEST_VEHICLE_STATE_ONLINE["vehicle_state"]["speed_limit_mode"][
"current_limit_mph"
]
)
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
# Test number set value functions
entity_id = "number.test_charge_current"
with patch(
"homeassistant.components.tessie.number.set_charging_amps",
) as mock_set_charging_amps:
await hass.services.async_call(
NUMBER_DOMAIN,
SERVICE_SET_VALUE,
{ATTR_ENTITY_ID: ["number.test_charge_current"], "value": 16},
{ATTR_ENTITY_ID: [entity_id], "value": 16},
blocking=True,
)
assert hass.states.get("number.test_charge_current").state == "16.0"
mock_set_charging_amps.assert_called_once()
assert hass.states.get(entity_id).state == "16.0"
entity_id = "number.test_charge_limit"
with patch(
"homeassistant.components.tessie.number.set_charge_limit",
) as mock_set_charge_limit:
await hass.services.async_call(
NUMBER_DOMAIN,
SERVICE_SET_VALUE,
{ATTR_ENTITY_ID: ["number.test_charge_limit"], "value": 80},
{ATTR_ENTITY_ID: [entity_id], "value": 80},
blocking=True,
)
assert hass.states.get("number.test_charge_limit").state == "80.0"
mock_set_charge_limit.assert_called_once()
assert hass.states.get(entity_id).state == "80.0"
entity_id = "number.test_speed_limit"
with patch(
"homeassistant.components.tessie.number.set_speed_limit",
) as mock_set_speed_limit:
await hass.services.async_call(
NUMBER_DOMAIN,
SERVICE_SET_VALUE,
{ATTR_ENTITY_ID: ["number.test_speed_limit"], "value": 60},
{ATTR_ENTITY_ID: [entity_id], "value": 60},
blocking=True,
)
assert hass.states.get("number.test_speed_limit").state == "60.0"
mock_set_speed_limit.assert_called_once()
assert hass.states.get(entity_id).state == "60.0"

View File

@ -2,30 +2,31 @@
from unittest.mock import patch
import pytest
from syrupy import SnapshotAssertion
from homeassistant.components.select import (
DOMAIN as SELECT_DOMAIN,
SERVICE_SELECT_OPTION,
)
from homeassistant.components.tessie.const import TessieSeatHeaterOptions
from homeassistant.const import ATTR_ENTITY_ID, ATTR_OPTION, STATE_OFF
from homeassistant.const import ATTR_ENTITY_ID, ATTR_OPTION, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er
from .common import ERROR_UNKNOWN, TEST_RESPONSE, setup_platform
from .common import ERROR_UNKNOWN, TEST_RESPONSE, assert_entities, setup_platform
async def test_select(hass: HomeAssistant) -> None:
async def test_select(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the select entities are correct."""
assert len(hass.states.async_all(SELECT_DOMAIN)) == 0
entry = await setup_platform(hass, [Platform.SELECT])
await setup_platform(hass)
assert len(hass.states.async_all(SELECT_DOMAIN)) == 5
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
entity_id = "select.test_seat_heater_left"
assert hass.states.get(entity_id).state == STATE_OFF
# Test changing select
with patch(
@ -39,15 +40,15 @@ async def test_select(hass: HomeAssistant) -> None:
blocking=True,
)
mock_set.assert_called_once()
assert mock_set.call_args[1]["seat"] == "front_left"
assert mock_set.call_args[1]["level"] == 1
assert hass.states.get(entity_id).state == TessieSeatHeaterOptions.LOW
assert mock_set.call_args[1]["seat"] == "front_left"
assert mock_set.call_args[1]["level"] == 1
assert hass.states.get(entity_id) == snapshot(name=SERVICE_SELECT_OPTION)
async def test_errors(hass: HomeAssistant) -> None:
"""Tests unknown error is handled."""
await setup_platform(hass)
await setup_platform(hass, [Platform.SELECT])
entity_id = "select.test_seat_heater_left"
# Test setting cover open with unknown error

View File

@ -1,24 +1,18 @@
"""Test the Tessie sensor platform."""
from homeassistant.components.tessie.sensor import DESCRIPTIONS
from homeassistant.const import STATE_UNKNOWN
from syrupy import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import TEST_VEHICLE_STATE_ONLINE, setup_platform
from .common import assert_entities, setup_platform
async def test_sensors(hass: HomeAssistant) -> None:
async def test_sensors(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the sensor entities are correct."""
assert len(hass.states.async_all("sensor")) == 0
entry = await setup_platform(hass, [Platform.SENSOR])
await setup_platform(hass)
assert len(hass.states.async_all("sensor")) == len(DESCRIPTIONS)
assert hass.states.get("sensor.test_battery_level").state == str(
TEST_VEHICLE_STATE_ONLINE["charge_state"]["battery_level"]
)
assert hass.states.get("sensor.test_charge_energy_added").state == str(
TEST_VEHICLE_STATE_ONLINE["charge_state"]["charge_energy_added"]
)
assert hass.states.get("sensor.test_shift_state").state == STATE_UNKNOWN
assert_entities(hass, entry.entry_id, entity_registry, snapshot)

View File

@ -1,34 +1,30 @@
"""Test the Tessie switch platform."""
from unittest.mock import patch
from syrupy import SnapshotAssertion
from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
)
from homeassistant.components.tessie.switch import DESCRIPTIONS
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import TEST_VEHICLE_STATE_ONLINE, setup_platform
from .common import assert_entities, setup_platform
async def test_switches(hass: HomeAssistant) -> None:
async def test_switches(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that the switche entities are correct."""
assert len(hass.states.async_all("switch")) == 0
entry = await setup_platform(hass, [Platform.SWITCH])
await setup_platform(hass)
assert len(hass.states.async_all("switch")) == len(DESCRIPTIONS)
assert (hass.states.get("switch.test_charge").state == STATE_ON) == (
TEST_VEHICLE_STATE_ONLINE["charge_state"]["charge_enable_request"]
)
assert (hass.states.get("switch.test_sentry_mode").state == STATE_ON) == (
TEST_VEHICLE_STATE_ONLINE["vehicle_state"]["sentry_mode"]
)
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
entity_id = "switch.test_charge"
with patch(
"homeassistant.components.tessie.switch.start_charging",
) as mock_start_charging:
@ -36,10 +32,12 @@ async def test_switches(hass: HomeAssistant) -> None:
await hass.services.async_call(
SWITCH_DOMAIN,
SERVICE_TURN_ON,
{ATTR_ENTITY_ID: ["switch.test_charge"]},
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_start_charging.assert_called_once()
assert hass.states.get(entity_id) == snapshot(name=SERVICE_TURN_ON)
with patch(
"homeassistant.components.tessie.switch.stop_charging",
) as mock_stop_charging:
@ -47,7 +45,9 @@ async def test_switches(hass: HomeAssistant) -> None:
await hass.services.async_call(
SWITCH_DOMAIN,
SERVICE_TURN_OFF,
{ATTR_ENTITY_ID: ["switch.test_charge"]},
{ATTR_ENTITY_ID: [entity_id]},
blocking=True,
)
mock_stop_charging.assert_called_once()
assert hass.states.get(entity_id) == snapshot(name=SERVICE_TURN_OFF)

View File

@ -1,30 +1,30 @@
"""Test the Tessie update platform."""
from unittest.mock import patch
from syrupy import SnapshotAssertion
from homeassistant.components.update import (
ATTR_IN_PROGRESS,
DOMAIN as UPDATE_DOMAIN,
SERVICE_INSTALL,
)
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import setup_platform
from .common import assert_entities, setup_platform
async def test_updates(hass: HomeAssistant) -> None:
async def test_updates(
hass: HomeAssistant, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry
) -> None:
"""Tests that update entity is correct."""
assert len(hass.states.async_all("update")) == 0
entry = await setup_platform(hass, [Platform.UPDATE])
await setup_platform(hass)
assert len(hass.states.async_all("update")) == 1
assert_entities(hass, entry.entry_id, entity_registry, snapshot)
entity_id = "update.test_update"
state = hass.states.get(entity_id)
assert state.state == STATE_ON
assert state.attributes.get(ATTR_IN_PROGRESS) is False
with patch(
"homeassistant.components.tessie.update.schedule_software_update"