Add suggested area to SmartThings (#139570)

* Add suggested area to SmartThings

* Add suggested areas to SmartThings
This commit is contained in:
Joost Lekkerkerker 2025-03-01 13:05:58 +01:00 committed by GitHub
parent fe5cd5c55c
commit 1852052dff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
37 changed files with 163 additions and 91 deletions

View File

@ -39,6 +39,7 @@ class SmartThingsData:
devices: dict[str, FullDevice]
scenes: dict[str, Scene]
rooms: dict[str, str]
client: SmartThings
@ -92,6 +93,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmartThingsConfigEntry)
device_status: dict[str, FullDevice] = {}
try:
rooms = {
room.room_id: room.name
for room in await client.get_rooms(location_id=entry.data[CONF_LOCATION_ID])
}
devices = await client.get_devices()
for device in devices:
status = process_status(await client.get_device_status(device.device_id))
@ -113,6 +118,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmartThingsConfigEntry)
name=dev.device.label,
sw_version=dev.device.hub.firmware_version,
model=dev.device.hub.hardware_type,
suggested_area=(
rooms.get(dev.device.room_id) if dev.device.room_id else None
),
)
scenes = {
scene.scene_id: scene
@ -127,6 +135,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmartThingsConfigEntry)
},
client=client,
scenes=scenes,
rooms=rooms,
)
entry.async_create_background_task(

View File

@ -109,7 +109,12 @@ async def async_setup_entry(
entry_data = entry.runtime_data
async_add_entities(
SmartThingsBinarySensor(
entry_data.client, device, description, capability, attribute
entry_data.client,
device,
description,
entry_data.rooms,
capability,
attribute,
)
for device in entry_data.devices.values()
for capability, attribute_map in CAPABILITY_TO_SENSORS.items()
@ -128,11 +133,12 @@ class SmartThingsBinarySensor(SmartThingsEntity, BinarySensorEntity):
client: SmartThings,
device: FullDevice,
entity_description: SmartThingsBinarySensorEntityDescription,
rooms: dict[str, str],
capability: Capability,
attribute: Attribute,
) -> None:
"""Init the class."""
super().__init__(client, device, {capability})
super().__init__(client, device, rooms, {capability})
self._attribute = attribute
self.capability = capability
self.entity_description = entity_description

View File

@ -118,12 +118,12 @@ async def async_setup_entry(
"""Add climate entities for a config entry."""
entry_data = entry.runtime_data
entities: list[ClimateEntity] = [
SmartThingsAirConditioner(entry_data.client, device)
SmartThingsAirConditioner(entry_data.client, entry_data.rooms, device)
for device in entry_data.devices.values()
if all(capability in device.status[MAIN] for capability in AC_CAPABILITIES)
]
entities.extend(
SmartThingsThermostat(entry_data.client, device)
SmartThingsThermostat(entry_data.client, entry_data.rooms, device)
for device in entry_data.devices.values()
if all(
capability in device.status[MAIN] for capability in THERMOSTAT_CAPABILITIES
@ -137,11 +137,14 @@ class SmartThingsThermostat(SmartThingsEntity, ClimateEntity):
_attr_name = None
def __init__(self, client: SmartThings, device: FullDevice) -> None:
def __init__(
self, client: SmartThings, rooms: dict[str, str], device: FullDevice
) -> None:
"""Init the class."""
super().__init__(
client,
device,
rooms,
{
Capability.THERMOSTAT_FAN_MODE,
Capability.THERMOSTAT_MODE,
@ -327,11 +330,14 @@ class SmartThingsAirConditioner(SmartThingsEntity, ClimateEntity):
_attr_name = None
_attr_preset_mode = None
def __init__(self, client: SmartThings, device: FullDevice) -> None:
def __init__(
self, client: SmartThings, rooms: dict[str, str], device: FullDevice
) -> None:
"""Init the class."""
super().__init__(
client,
device,
rooms,
{
Capability.AIR_CONDITIONER_MODE,
Capability.SWITCH,

View File

@ -41,7 +41,9 @@ async def async_setup_entry(
"""Add covers for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsCover(entry_data.client, device, Capability(capability))
SmartThingsCover(
entry_data.client, device, entry_data.rooms, Capability(capability)
)
for device in entry_data.devices.values()
for capability in device.status[MAIN]
if capability in CAPABILITIES
@ -55,12 +57,17 @@ class SmartThingsCover(SmartThingsEntity, CoverEntity):
_state: CoverState | None = None
def __init__(
self, client: SmartThings, device: FullDevice, capability: Capability
self,
client: SmartThings,
device: FullDevice,
rooms: dict[str, str],
capability: Capability,
) -> None:
"""Initialize the cover class."""
super().__init__(
client,
device,
rooms,
{
capability,
Capability.BATTERY,

View File

@ -27,7 +27,11 @@ class SmartThingsEntity(Entity):
_attr_has_entity_name = True
def __init__(
self, client: SmartThings, device: FullDevice, capabilities: set[Capability]
self,
client: SmartThings,
device: FullDevice,
rooms: dict[str, str],
capabilities: set[Capability],
) -> None:
"""Initialize the instance."""
self.client = client
@ -43,6 +47,9 @@ class SmartThingsEntity(Entity):
configuration_url="https://account.smartthings.com",
identifiers={(DOMAIN, device.device.device_id)},
name=device.device.label,
suggested_area=(
rooms.get(device.device.room_id) if device.device.room_id else None
),
)
if device.device.parent_device_id:
self._attr_device_info["via_device"] = (

View File

@ -31,7 +31,7 @@ async def async_setup_entry(
"""Add fans for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsFan(entry_data.client, device)
SmartThingsFan(entry_data.client, entry_data.rooms, device)
for device in entry_data.devices.values()
if Capability.SWITCH in device.status[MAIN]
and any(
@ -51,11 +51,14 @@ class SmartThingsFan(SmartThingsEntity, FanEntity):
_attr_name = None
_attr_speed_count = int_states_in_range(SPEED_RANGE)
def __init__(self, client: SmartThings, device: FullDevice) -> None:
def __init__(
self, client: SmartThings, rooms: dict[str, str], device: FullDevice
) -> None:
"""Init the class."""
super().__init__(
client,
device,
rooms,
{
Capability.SWITCH,
Capability.FAN_SPEED,

View File

@ -41,7 +41,7 @@ async def async_setup_entry(
"""Add lights for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsLight(entry_data.client, device)
SmartThingsLight(entry_data.client, entry_data.rooms, device)
for device in entry_data.devices.values()
if Capability.SWITCH in device.status[MAIN]
and any(capability in device.status[MAIN] for capability in CAPABILITIES)
@ -71,11 +71,14 @@ class SmartThingsLight(SmartThingsEntity, LightEntity, RestoreEntity):
# highest kelvin found supported across 20+ handlers.
_attr_max_color_temp_kelvin = 9000 # 111 mireds
def __init__(self, client: SmartThings, device: FullDevice) -> None:
def __init__(
self, client: SmartThings, rooms: dict[str, str], device: FullDevice
) -> None:
"""Initialize a SmartThingsLight."""
super().__init__(
client,
device,
rooms,
{
Capability.COLOR_CONTROL,
Capability.COLOR_TEMPERATURE,

View File

@ -33,7 +33,7 @@ async def async_setup_entry(
"""Add locks for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsLock(entry_data.client, device, {Capability.LOCK})
SmartThingsLock(entry_data.client, device, entry_data.rooms, {Capability.LOCK})
for device in entry_data.devices.values()
if Capability.LOCK in device.status[MAIN]
)

View File

@ -962,7 +962,14 @@ async def async_setup_entry(
"""Add sensors for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsSensor(entry_data.client, device, description, capability, attribute)
SmartThingsSensor(
entry_data.client,
device,
description,
entry_data.rooms,
capability,
attribute,
)
for device in entry_data.devices.values()
for capability, attributes in CAPABILITY_TO_SENSORS.items()
if capability in device.status[MAIN]
@ -992,11 +999,12 @@ class SmartThingsSensor(SmartThingsEntity, SensorEntity):
client: SmartThings,
device: FullDevice,
entity_description: SmartThingsSensorEntityDescription,
rooms: dict[str, str],
capability: Capability,
attribute: Attribute,
) -> None:
"""Init the class."""
super().__init__(client, device, {capability})
super().__init__(client, device, rooms, {capability})
self._attr_unique_id = f"{device.device.device_id}{entity_description.unique_id_separator}{entity_description.key}"
self._attribute = attribute
self.capability = capability

View File

@ -37,7 +37,9 @@ async def async_setup_entry(
"""Add switches for a config entry."""
entry_data = entry.runtime_data
async_add_entities(
SmartThingsSwitch(entry_data.client, device, {Capability.SWITCH})
SmartThingsSwitch(
entry_data.client, device, entry_data.rooms, {Capability.SWITCH}
)
for device in entry_data.devices.values()
if Capability.SWITCH in device.status[MAIN]
and not any(capability in device.status[MAIN] for capability in CAPABILITIES)

View File

@ -8,6 +8,7 @@ from pysmartthings.models import (
DeviceResponse,
DeviceStatus,
LocationResponse,
RoomResponse,
SceneResponse,
)
import pytest
@ -78,6 +79,9 @@ def mock_smartthings() -> Generator[AsyncMock]:
client.get_locations.return_value = LocationResponse.from_json(
load_fixture("locations.json", DOMAIN)
).items
client.get_rooms.return_value = RoomResponse.from_json(
load_fixture("rooms.json", DOMAIN)
).items
yield client

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "0086-0002-0009",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "94be4a1e-382a-4b7f-a5ef-fdb1a7d9f9e6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Arlo",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "68b45114-9af8-4906-8636-b973a6faa271",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "CentraLite",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "94be4a1e-382a-4b7f-a5ef-fdb1a7d9f9e6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Visonic",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "68b45114-9af8-4906-8636-b973a6faa271",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "58d3fd7c-c512-4da3-b500-ef269382756c",
"ownerId": "f9a28d7c-1ed5-d9e9-a81c-18971ec081db",
"roomId": "85a79db4-9cf2-4f09-a5b2-cd70a5c0cef0",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Air Conditioner",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "c4189ac1-208f-461a-8ab6-ea67937b3743",
"ownerId": "85ea07e1-7063-f673-3ba5-125293f297c8",
"roomId": "1f66199a-1773-4d8f-97b7-44c312a62cf7",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Air Conditioner",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "586e4602-34ab-4a22-993e-5f616b04604f",
"ownerId": "b603d7e8-6066-4e10-8102-afa752a63816",
"roomId": "f4d03391-ab13-4c1d-b4dc-d6ddf86014a2",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "oic.d.microwave",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "3a1f7e7c-4e59-4c29-adb0-0813be691efd",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Refrigerator",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "586e4602-34ab-4a22-993e-5f616b04604f",
"ownerId": "b603d7e8-6066-4e10-8102-afa752a63816",
"roomId": "5d425f41-042a-4d9a-92c4-e43150a61bae",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Robot Vacuum",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "586e4602-34ab-4a22-993e-5f616b04604f",
"ownerId": "b603d7e8-6066-4e10-8102-afa752a63816",
"roomId": "f4d03391-ab13-4c1d-b4dc-d6ddf86014a2",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Dishwasher",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "781d5f1e-c87e-455e-87f7-8e954879e91d",
"ownerId": "b603d7e8-6066-4e10-8102-afa752a63816",
"roomId": "2a8637b2-77ad-475e-b537-7b6f7f97fff6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Dryer",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "781d5f1e-c87e-455e-87f7-8e954879e91d",
"ownerId": "b603d7e8-6066-4e10-8102-afa752a63816",
"roomId": "2a8637b2-77ad-475e-b537-7b6f7f97fff6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Washer",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "0086-0002-005F",
"locationId": "6f11ddf5-f0cb-4516-a06a-3a2a6ec22bca",
"ownerId": "9f257fc4-6471-2566-b06e-2fe72dd979fa",
"roomId": "cdf080f0-0542-41d7-a606-aff69683e04c",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -8,7 +8,7 @@
"presentationId": "31cf01ee-cb49-3d95-ac2d-2afab47f25c7",
"deviceManufacturerCode": "0063-4944-3130",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"roomId": "e73dcd00-6953-431d-ae79-73fd2f2c528e",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -8,7 +8,7 @@
"presentationId": "63f1469e-dc4a-3689-8cc5-69e293c1eb21",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "f7f39cf6-ff3a-4bcb-8d1b-00a3324c016d",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -8,7 +8,7 @@
"presentationId": "c385e2bc-acb8-317b-be2a-6efd1f879720",
"deviceManufacturerCode": "SmartThings",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"roomId": "b277a3c0-b8fe-44de-9133-c1108747810c",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "LEDVANCE",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "94be4a1e-382a-4b7f-a5ef-fdb1a7d9f9e6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Sonos",
"locationId": "eed0e167-e793-459b-80cb-a0b02e2b86c2",
"ownerId": "2c69cc36-85ae-c41a-9981-a4ee96cd9137",
"roomId": "105e6d1a-52a4-4797-a235-5a48d7d433c8",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "c4189ac1-208f-461a-8ab6-ea67937b3743",
"ownerId": "85ea07e1-7063-f673-3ba5-125293f297c8",
"roomId": "db506ec3-83b1-4125-9c4c-eb597da5db6a",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF Network Audio Player",
"components": [
{

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Samsung Electronics",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "94be4a1e-382a-4b7f-a5ef-fdb1a7d9f9e6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"deviceTypeName": "Samsung OCF TV",
"components": [
{

View File

@ -8,7 +8,7 @@
"presentationId": "78906115-bf23-3c43-9cd6-f42ca3d5517a",
"locationId": "88a3a314-f0c8-40b4-bb44-44ba06c9c42f",
"ownerId": "12d4af93-cb68-b108-87f5-625437d7371f",
"roomId": "58826afc-9f38-426a-b868-dc94776286e3",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -8,7 +8,7 @@
"presentationId": "916408b6-c94e-38b8-9fbf-03c8a48af5c3",
"locationId": "88a3a314-f0c8-40b4-bb44-44ba06c9c42f",
"ownerId": "12d4af93-cb68-b108-87f5-625437d7371f",
"roomId": "58826afc-9f38-426a-b868-dc94776286e3",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -8,7 +8,7 @@
"presentationId": "838ae989-b832-3610-968c-2940491600f6",
"locationId": "88a3a314-f0c8-40b4-bb44-44ba06c9c42f",
"ownerId": "12d4af93-cb68-b108-87f5-625437d7371f",
"roomId": "58826afc-9f38-426a-b868-dc94776286e3",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -9,7 +9,7 @@
"deviceManufacturerCode": "Yale",
"locationId": "c4d3b2a1-09f8-765e-4d3c-2b1a09f8e7d6 ",
"ownerId": "d47f2b19-3a6e-4c8d-bf21-9e8a7c5d134e",
"roomId": "94be4a1e-382a-4b7f-a5ef-fdb1a7d9f9e6",
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"components": [
{
"id": "main",

View File

@ -0,0 +1,17 @@
{
"items": [
{
"roomId": "7715151d-0314-457a-a82c-5ce48900e065",
"locationId": "397678e5-9995-4a39-9d9f-ae6ba310236b",
"name": "Theater",
"backgroundImage": null
},
{
"roomId": "cdf080f0-0542-41d7-a606-aff69683e04c",
"locationId": "397678e5-9995-4a39-9d9f-ae6ba310236b",
"name": "Toilet",
"backgroundImage": null
}
],
"_links": null
}

View File

@ -1,7 +1,7 @@
# serializer version: 1
# name: test_devices[aeotec_home_energy_meter_gen5]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'toilet',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -27,14 +27,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Toilet',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[base_electric_meter]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -60,14 +60,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[c2c_arlo_pro_3_switch]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -93,7 +93,7 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
@ -133,7 +133,7 @@
# ---
# name: test_devices[centralite]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -159,14 +159,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[contact_sensor]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -192,14 +192,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[da_ac_rac_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -225,14 +225,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': '0.1.0',
'via_device_id': None,
})
# ---
# name: test_devices[da_ac_rac_01001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -258,14 +258,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'ARA-WW-TP1-22-COMMON_11240702',
'via_device_id': None,
})
# ---
# name: test_devices[da_ks_microwave_0101x]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -291,14 +291,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'AKS-WW-TP2-20-MICROWAVE-OTR_40230125',
'via_device_id': None,
})
# ---
# name: test_devices[da_ref_normal_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -324,14 +324,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'A-RFWW-TP2-21-COMMON_20220110',
'via_device_id': None,
})
# ---
# name: test_devices[da_rvc_normal_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -357,14 +357,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': '1.0',
'via_device_id': None,
})
# ---
# name: test_devices[da_wm_dw_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -390,14 +390,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'DA_DW_A51_20_COMMON_30230714',
'via_device_id': None,
})
# ---
# name: test_devices[da_wm_wd_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -423,14 +423,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'DA_WM_A51_20_COMMON_30230708',
'via_device_id': None,
})
# ---
# name: test_devices[da_wm_wm_000001]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -456,7 +456,7 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'DA_WM_TP2_20_COMMON_30230804',
'via_device_id': None,
})
@ -529,7 +529,7 @@
# ---
# name: test_devices[fake_fan]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -555,14 +555,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[ge_in_wall_smart_dimmer]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -588,7 +588,7 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
@ -694,7 +694,7 @@
# ---
# name: test_devices[multipurpose_sensor]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -720,7 +720,7 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
@ -760,7 +760,7 @@
# ---
# name: test_devices[smart_plug]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -786,14 +786,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[sonos_player]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -819,14 +819,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[vd_network_audio_002s]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -852,14 +852,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'SAT-iMX8M23WWC-1010.5',
'via_device_id': None,
})
# ---
# name: test_devices[vd_stv_2017_k]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -885,14 +885,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': 'T-KTMAKUC-1290.3',
'via_device_id': None,
})
# ---
# name: test_devices[virtual_thermostat]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -918,14 +918,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[virtual_valve]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -951,14 +951,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[virtual_water_sensor]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -984,14 +984,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_devices[yale_push_button_deadbolt_lock]
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
@ -1017,14 +1017,14 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_hub_via_device
DeviceRegistryEntrySnapshot({
'area_id': None,
'area_id': 'theater',
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': None,
@ -1054,7 +1054,7 @@
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'suggested_area': None,
'suggested_area': 'Theater',
'sw_version': '000.055.00005',
'via_device_id': None,
})