From 97d9c238556699242a1b4fb76967bd5b11a159e7 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 1 Jun 2026 17:38:57 +0200 Subject: [PATCH 01/39] Bump yoto-api to 3.1.5 (#172753) --- homeassistant/components/yoto/manifest.json | 2 +- homeassistant/components/yoto/media_player.py | 7 ++++--- requirements_all.txt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/yoto/manifest.json b/homeassistant/components/yoto/manifest.json index 02f3b40e2e647..c1ab18b3c8851 100644 --- a/homeassistant/components/yoto/manifest.json +++ b/homeassistant/components/yoto/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_push", "loggers": ["yoto_api"], "quality_scale": "bronze", - "requirements": ["yoto-api==3.1.3"] + "requirements": ["yoto-api==3.1.5"] } diff --git a/homeassistant/components/yoto/media_player.py b/homeassistant/components/yoto/media_player.py index 2c5224b0f3eff..5aa472f39ff69 100644 --- a/homeassistant/components/yoto/media_player.py +++ b/homeassistant/components/yoto/media_player.py @@ -80,9 +80,10 @@ def available(self) -> bool: @property def state(self) -> MediaPlayerState: """Return the playback state.""" - return PLAYBACK_STATE_MAP.get( - self.player.last_event.playback_status, MediaPlayerState.IDLE - ) + status = self.player.last_event.playback_status + if status is None: + return MediaPlayerState.IDLE + return PLAYBACK_STATE_MAP.get(status, MediaPlayerState.IDLE) @property def volume_level(self) -> float | None: diff --git a/requirements_all.txt b/requirements_all.txt index e47e04da6c224..c5a0dbf9a64bb 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -3415,7 +3415,7 @@ yeelightsunflower==0.0.10 yolink-api==0.6.5 # homeassistant.components.yoto -yoto-api==3.1.3 +yoto-api==3.1.5 # homeassistant.components.youless youless-api==2.2.0 From c22f10bf8742c9a4408e22cfce904e34e2e1d3a5 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Mon, 1 Jun 2026 17:43:37 +0200 Subject: [PATCH 02/39] Run Overkiz unique ID migration only once via config entry version (#172670) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- homeassistant/components/overkiz/__init__.py | 24 +++++++++++++------ .../components/overkiz/config_flow.py | 1 + tests/components/overkiz/test_init.py | 4 ++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/overkiz/__init__.py b/homeassistant/components/overkiz/__init__.py index 3a7b5d6bcc94d..42b0a13537fff 100644 --- a/homeassistant/components/overkiz/__init__.py +++ b/homeassistant/components/overkiz/__init__.py @@ -93,8 +93,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: OverkizDataConfigEntry) server=SUPPORTED_SERVERS[entry.data[CONF_HUB]], ) - await _async_migrate_entries(hass, entry) - try: await client.login() setup = await client.get_setup() @@ -196,10 +194,24 @@ async def async_unload_entry( return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) -async def _async_migrate_entries( - hass: HomeAssistant, config_entry: OverkizDataConfigEntry +async def async_migrate_entry( + hass: HomeAssistant, entry: OverkizDataConfigEntry ) -> bool: - """Migrate old entries to new unique IDs.""" + """Migrate old entry.""" + if entry.version > 1: + return False + + if entry.version == 1 and entry.minor_version < 2: + await _async_migrate_strenum_unique_ids(hass, entry) + hass.config_entries.async_update_entry(entry, minor_version=2) + + return True + + +async def _async_migrate_strenum_unique_ids( + hass: HomeAssistant, config_entry: OverkizDataConfigEntry +) -> None: + """Migrate entities to the StrEnum-style unique IDs.""" entity_registry = er.async_get(hass) @callback @@ -256,8 +268,6 @@ def update_unique_id(entry: er.RegistryEntry) -> dict[str, str] | None: await er.async_migrate_entries(hass, config_entry.entry_id, update_unique_id) - return True - def create_local_client( hass: HomeAssistant, host: str, token: str, verify_ssl: bool diff --git a/homeassistant/components/overkiz/config_flow.py b/homeassistant/components/overkiz/config_flow.py index c0bc23bd23996..ddd584a6ec11f 100644 --- a/homeassistant/components/overkiz/config_flow.py +++ b/homeassistant/components/overkiz/config_flow.py @@ -40,6 +40,7 @@ class OverkizConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Overkiz (by Somfy).""" VERSION = 1 + MINOR_VERSION = 2 _verify_ssl: bool = True _api_type: APIType = APIType.CLOUD diff --git a/tests/components/overkiz/test_init.py b/tests/components/overkiz/test_init.py index e86af135b3b0c..fcceb2f8d9777 100644 --- a/tests/components/overkiz/test_init.py +++ b/tests/components/overkiz/test_init.py @@ -25,6 +25,7 @@ async def test_unique_id_migration(hass: HomeAssistant) -> None: domain=DOMAIN, unique_id=TEST_GATEWAY_ID, data={"username": TEST_EMAIL, "password": TEST_PASSWORD, "hub": TEST_SERVER}, + minor_version=1, ) mock_entry.add_to_hass(hass) @@ -90,3 +91,6 @@ async def test_unique_id_migration(hass: HomeAssistant) -> None: for entity_id, unique_id in unique_id_map.items(): entry = ent_reg.async_get(entity_id) assert entry.unique_id == unique_id + + # Test if the config entry is migrated to the latest minor version + assert mock_entry.minor_version == 2 From ce46be110d948625b3908f54f15923b7b41e646f Mon Sep 17 00:00:00 2001 From: WardZhou <33411000+wardmatter@users.noreply.github.com> Date: Tue, 2 Jun 2026 00:38:27 +0800 Subject: [PATCH 03/39] Add support for Thread Integration to Display Icons for Yeelight TBRs and Fix for Amazon Echo (#169384) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ludovic BOUÉ <132135057+lboue@users.noreply.github.com> Co-authored-by: Stefan Agner Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- homeassistant/components/thread/discovery.py | 2 + tests/components/thread/test_discovery.py | 60 ++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/homeassistant/components/thread/discovery.py b/homeassistant/components/thread/discovery.py index e4a2885ce5ce0..38c351d4b5468 100644 --- a/homeassistant/components/thread/discovery.py +++ b/homeassistant/components/thread/discovery.py @@ -22,6 +22,7 @@ KNOWN_BRANDS: dict[str | None, str] = { "Amazon": "amazon", + "amazon": "amazon", "Apple": "apple", "Apple Inc.": "apple", "Aqara": "aqara_gateway", @@ -35,6 +36,7 @@ "OpenThread": "openthread", "Samsung": "samsung", "SmartThings": "smartthings", + "Yeelight": "yeelight", } THREAD_TYPE = "_meshcop._udp.local." CLASS_IN = 1 diff --git a/tests/components/thread/test_discovery.py b/tests/components/thread/test_discovery.py index 3cf195ad40eb8..1f200c8a0184d 100644 --- a/tests/components/thread/test_discovery.py +++ b/tests/components/thread/test_discovery.py @@ -245,6 +245,66 @@ async def test_discover_routers_bad_or_missing_optional_data( ) +@pytest.mark.parametrize( + ("vendor_name", "expected_brand"), + sorted( + (vendor_name, expected_brand) + for vendor_name, expected_brand in discovery.KNOWN_BRANDS.items() + if vendor_name is not None + ), +) +async def test_discover_routers_known_vendor_names( + hass: HomeAssistant, + mock_async_zeroconf: MagicMock, + vendor_name: str, + expected_brand: str, +) -> None: + """Test discovering thread routers with known vendor names.""" + mock_async_zeroconf.async_add_service_listener = AsyncMock() + mock_async_zeroconf.async_remove_service_listener = AsyncMock() + mock_async_zeroconf.async_get_service_info = AsyncMock() + + assert await async_setup_component(hass, DOMAIN, {}) + await hass.async_block_till_done() + + router_discovered_removed = Mock() + thread_discovery = discovery.ThreadRouterDiscovery( + hass, router_discovered_removed, router_discovered_removed + ) + await thread_discovery.async_start() + listener: discovery.ThreadRouterDiscovery.ThreadServiceListener = ( + mock_async_zeroconf.async_add_service_listener.mock_calls[0][1][1] + ) + + data = { + **ROUTER_DISCOVERY_HASS, + "properties": { + **ROUTER_DISCOVERY_HASS["properties"], + b"vn": vendor_name.encode(), + }, + } + mock_async_zeroconf.async_get_service_info.return_value = AsyncServiceInfo(**data) + listener.add_service(None, data["type_"], data["name"]) + await hass.async_block_till_done() + router_discovered_removed.assert_called_once_with( + "aeeb2f594b570bbf", + discovery.ThreadRouterDiscoveryData( + instance_name="HomeAssistant OpenThreadBorderRouter #0BBF", + addresses=["192.168.0.115"], + border_agent_id="230c6a1ac57f6f4be262acf32e5ef52c", + brand=expected_brand, + extended_address="aeeb2f594b570bbf", + extended_pan_id="e60fc7c186212ce5", + model_name="OpenThreadBorderRouter", + network_name="OpenThread HC", + server="core-silabs-multiprotocol.local.", + thread_version="1.3.0", + unconfigured=None, + vendor_name=vendor_name, + ), + ) + + @pytest.mark.parametrize( "service", [ From 0abc9b787b86c1d862c68f6d423a735b60dd872b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 1 Jun 2026 18:38:47 +0200 Subject: [PATCH 04/39] Ignore Beacons security policy flag in Thread dataset comparison (#172749) Co-authored-by: Claude --- .../components/thread/dataset_store.py | 52 +++++++++++--- tests/components/thread/test_dataset_store.py | 68 ++++++++++++++++--- 2 files changed, 103 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/thread/dataset_store.py b/homeassistant/components/thread/dataset_store.py index 95cbb2f19e796..15788cd6599b7 100644 --- a/homeassistant/components/thread/dataset_store.py +++ b/homeassistant/components/thread/dataset_store.py @@ -27,6 +27,12 @@ STORAGE_VERSION_MINOR = 4 SAVE_DELAY = 10 +# Bit 0x08 of the first security policy flags byte is the legacy "Beacons" +# flag. It was removed from the Thread security policy in v1.2.1 (2022), so +# current Thread stacks no longer set it; datasets that still carry it were +# created by older implementations. It is ignored when comparing datasets. +SECURITY_POLICY_BEACONS_FLAG = 0x08 + _LOGGER = logging.getLogger(__name__) @@ -48,6 +54,37 @@ def _format_dataset( return result +def _normalize_dataset( + dataset: dict[MeshcopTLVType | int, tlv_parser.MeshcopTLVItem], +) -> dict[MeshcopTLVType | int, tlv_parser.MeshcopTLVItem]: + """Normalize a dataset for equivalence comparison. + + Thread Border Routers may report functionally equivalent datasets without + incrementing the active timestamp. To recognize these as equivalent, ignore + the fields that don't affect how Home Assistant uses the dataset: + - WAKEUP_CHANNEL: added in newer OpenThread Border Router versions, but the + wake-up protocol isn't defined yet, so we treat it as if it were always + present. + - The legacy Beacons bit in the security policy flags: it was removed from + the Thread security policy in v1.2.1, so datasets created by older + implementations may still set it while current routers don't. + """ + normalized = { + key: value + for key, value in dataset.items() + if key != MeshcopTLVType.WAKEUP_CHANNEL + } + if (security_policy := normalized.get(MeshcopTLVType.SECURITYPOLICY)) and len( + security_policy.data + ) > 2: + flags = bytearray(security_policy.data) + flags[2] &= ~SECURITY_POLICY_BEACONS_FLAG + normalized[MeshcopTLVType.SECURITYPOLICY] = tlv_parser.MeshcopTLVItem( + security_policy.tag, bytes(flags) + ) + return normalized + + class DatasetPreferredError(HomeAssistantError): """Raised when attempting to delete the preferred dataset.""" @@ -280,15 +317,12 @@ def async_add( old_ts = (old_timestamp.seconds, old_timestamp.ticks) new_ts = (new_timestamp.seconds, new_timestamp.ticks) if old_ts >= new_ts: - # Silently accept if the only addition is WAKEUP_CHANNEL: - # it was added in OpenThread but the wake-up protocol isn't - # defined yet, so we treat it as if it were always present. - dataset_without_wakeup = { - k: v - for k, v in dataset.items() - if k != MeshcopTLVType.WAKEUP_CHANNEL - } - if old_ts > new_ts or dataset_without_wakeup != entry.dataset: + # Silently accept datasets that are functionally equivalent but + # reported without a newer active timestamp by some OpenThread + # Border Router versions (see _normalize_dataset). + if old_ts > new_ts or _normalize_dataset(dataset) != _normalize_dataset( + entry.dataset + ): _LOGGER.warning( "Got dataset with same extended PAN ID and same or older" " active timestamp\nold:\n%s\nnew:\n%s", diff --git a/tests/components/thread/test_dataset_store.py b/tests/components/thread/test_dataset_store.py index b236b7aafec81..4694925ecd0ad 100644 --- a/tests/components/thread/test_dataset_store.py +++ b/tests/components/thread/test_dataset_store.py @@ -68,6 +68,23 @@ "0212340410445F2B5CA6F2A93A55CE570A70EFEECB0C0402A0F7F84A0300000B" ) +# Same as DATASET_1 but with the legacy Beacons bit set in the security policy +# (02A0F7F8 -> 02A0FFF8), same timestamp. Newer OpenThread versions clear this +# bit by default without bumping the active timestamp. +DATASET_1_WITH_BEACONS_FLAG = ( + "0E080000000000010000000300000F35060004001FFFE0020811111111222222220708FDAD70BF" + "E5AA15DD051000112233445566778899AABBCCDDEEFF030E4F70656E54687265616444656D6F01" + "0212340410445F2B5CA6F2A93A55CE570A70EFEECB0C0402A0FFF8" +) + +# Same as DATASET_1 but with a different security policy rotation time (672h -> +# 673h, 02A0F7F8 -> 02A1F7F8), same timestamp. A genuine security policy change. +DATASET_1_OTHER_SECURITY_POLICY = ( + "0E080000000000010000000300000F35060004001FFFE0020811111111222222220708FDAD70BF" + "E5AA15DD051000112233445566778899AABBCCDDEEFF030E4F70656E54687265616444656D6F01" + "0212340410445F2B5CA6F2A93A55CE570A70EFEECB0C0402A1F7F8" +) + async def test_add_invalid_dataset(hass: HomeAssistant) -> None: """Test adding an invalid dataset.""" @@ -262,25 +279,60 @@ async def test_update_dataset_older( ) -async def test_update_dataset_wakeup_channel( +@pytest.mark.parametrize( + ("stored", "updated"), + [ + # WAKEUP_CHANNEL was added to OpenThread but the wake-up protocol isn't + # defined yet, so a dataset that only adds this field is equivalent. + pytest.param(DATASET_1, DATASET_1_WITH_WAKEUP_CHANNEL, id="wakeup_channel"), + # Newer OpenThread versions clear the legacy Beacons bit in the security + # policy without bumping the active timestamp. + pytest.param(DATASET_1_WITH_BEACONS_FLAG, DATASET_1, id="beacons_flag"), + ], +) +async def test_update_dataset_equivalent( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, + stored: str, + updated: str, +) -> None: + """Test that an equivalent dataset with the same timestamp is silently accepted. + + Some OpenThread Border Router versions report functionally equivalent + datasets without incrementing the active timestamp. We update the stored + TLV without logging a warning. + """ + await dataset_store.async_add_dataset(hass, "test", stored) + await dataset_store.async_add_dataset(hass, "test", updated) + + store = await dataset_store.async_get_store(hass) + assert len(store.datasets) == 1 + assert list(store.datasets.values())[0].tlv == updated + + assert ( + "Got dataset with same extended PAN ID and same or older active timestamp" + not in caplog.text + ) + + +async def test_update_dataset_changed_security_policy( hass: HomeAssistant, caplog: pytest.LogCaptureFixture ) -> None: - """Test that adding WAKEUP_CHANNEL with the same timestamp is silently accepted. + """Test a genuine security policy change with the same timestamp warns. - WAKEUP_CHANNEL was added to OpenThread but the wake-up protocol isn't - defined yet. We treat a dataset that only adds this key as equivalent, - updating the stored TLV without logging a warning. + Only the ignored Beacons bit and WAKEUP_CHANNEL are treated as equivalent; + any other change (here the rotation time) is still reported. """ await dataset_store.async_add_dataset(hass, "test", DATASET_1) - await dataset_store.async_add_dataset(hass, "test", DATASET_1_WITH_WAKEUP_CHANNEL) + await dataset_store.async_add_dataset(hass, "test", DATASET_1_OTHER_SECURITY_POLICY) store = await dataset_store.async_get_store(hass) assert len(store.datasets) == 1 - assert list(store.datasets.values())[0].tlv == DATASET_1_WITH_WAKEUP_CHANNEL + assert list(store.datasets.values())[0].tlv == DATASET_1 assert ( "Got dataset with same extended PAN ID and same or older active timestamp" - not in caplog.text + in caplog.text ) From 480a8d536fa4d751c3e5b916578e653852774a07 Mon Sep 17 00:00:00 2001 From: Perry Naseck <4472083+DaAwesomeP@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:01:48 -0400 Subject: [PATCH 05/39] upb: Move to SerialPortSelector (#170053) --- homeassistant/components/upb/__init__.py | 30 ++++++++++--- homeassistant/components/upb/config_flow.py | 49 +++++++-------------- homeassistant/components/upb/strings.json | 11 +++-- tests/components/upb/test_config_flow.py | 33 ++++++++------ tests/components/upb/test_init.py | 26 +++++++++-- 5 files changed, 88 insertions(+), 61 deletions(-) diff --git a/homeassistant/components/upb/__init__.py b/homeassistant/components/upb/__init__.py index 464fb9cf57b0b..b4150c631abd5 100644 --- a/homeassistant/components/upb/__init__.py +++ b/homeassistant/components/upb/__init__.py @@ -5,7 +5,13 @@ import upb_lib from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ATTR_COMMAND, CONF_FILE_PATH, CONF_HOST, Platform +from homeassistant.const import ( + ATTR_COMMAND, + CONF_DEVICE, + CONF_FILE_PATH, + CONF_HOST, + Platform, +) from homeassistant.core import HomeAssistant from .const import ATTR_ADDRESS, ATTR_BRIGHTNESS_PCT, ATTR_RATE, EVENT_UPB_SCENE_CHANGED @@ -19,7 +25,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: UpbConfigEntry) -> bool: """Set up a new config_entry for UPB PIM.""" - url = config_entry.data[CONF_HOST] + url = config_entry.data[CONF_DEVICE] file = config_entry.data[CONF_FILE_PATH] upb = upb_lib.UpbPim({"url": url, "UPStartExportFile": file}) @@ -65,14 +71,26 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: UpbConfigEntry) async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Migrate entry.""" - _LOGGER.debug("Migrating from version %s", entry.version) + _LOGGER.debug("Migrating from version %s.%s", entry.version, entry.minor_version) if entry.version == 1: - # 1 -> 2: Unique ID from integer to string + # 1.1 -> 1.2: Unique ID from integer to string if entry.minor_version == 1: - minor_version = 2 hass.config_entries.async_update_entry( - entry, unique_id=str(entry.unique_id), minor_version=minor_version + entry, unique_id=str(entry.unique_id), minor_version=2 + ) + + # 1.2 -> 1.3: Migrate from legacy CONF_HOST URL to CONF_DEVICE + if entry.minor_version < 3: + # upb-lib is backward compatible with the older URL formats, + # but we need to move to CONF_DEVICE + device = entry.data[CONF_HOST] + file_path = entry.data[CONF_FILE_PATH] + + hass.config_entries.async_update_entry( + entry, + data={CONF_DEVICE: device, CONF_FILE_PATH: file_path}, + minor_version=3, ) _LOGGER.debug("Migration successful") diff --git a/homeassistant/components/upb/config_flow.py b/homeassistant/components/upb/config_flow.py index af1ee7d5ab07a..803a7a2d3b6fe 100644 --- a/homeassistant/components/upb/config_flow.py +++ b/homeassistant/components/upb/config_flow.py @@ -4,32 +4,30 @@ from contextlib import suppress import logging from typing import Any -from urllib.parse import urlparse import upb_lib import voluptuous as vol from homeassistant.config_entries import ConfigFlow, ConfigFlowResult -from homeassistant.const import CONF_ADDRESS, CONF_FILE_PATH, CONF_HOST, CONF_PROTOCOL +from homeassistant.const import CONF_DEVICE, CONF_FILE_PATH from homeassistant.exceptions import HomeAssistantError +from homeassistant.helpers.selector import SerialPortSelector from .const import DOMAIN _LOGGER = logging.getLogger(__name__) -PROTOCOL_MAP = {"TCP": "tcp://", "Serial port": "serial://"} + DATA_SCHEMA = vol.Schema( { - vol.Required(CONF_PROTOCOL, default="Serial port"): vol.In( - ["TCP", "Serial port"] - ), - vol.Required(CONF_ADDRESS): str, + vol.Required(CONF_DEVICE): SerialPortSelector(), vol.Required(CONF_FILE_PATH, default=""): str, } ) + VALIDATE_TIMEOUT = 15 -async def _validate_input(data): +async def _validate_input(data: dict[str, Any]) -> tuple[str, dict[str, Any]]: """Validate the user input allows us to connect.""" def _connected_callback(): @@ -37,7 +35,7 @@ def _connected_callback(): connected_event = asyncio.Event() file_path = data.get(CONF_FILE_PATH) - url = _make_url_from_data(data) + url = data[CONF_DEVICE] upb = upb_lib.UpbPim({"url": url, "UPStartExportFile": file_path}) upb.add_handler("connected", _connected_callback) @@ -63,33 +61,26 @@ def _connected_callback(): raise CannotConnect # Return info that you want to store in the config entry. - return (upb.network_id, {"title": "UPB", CONF_HOST: url, CONF_FILE_PATH: file_path}) - - -def _make_url_from_data(data): - if host := data.get(CONF_HOST): - return host - - protocol = PROTOCOL_MAP[data[CONF_PROTOCOL]] - address = data[CONF_ADDRESS] - return f"{protocol}{address}" + return ( + upb.network_id, + {"title": "UPB", CONF_DEVICE: url, CONF_FILE_PATH: file_path}, + ) class UPBConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for UPB PIM.""" VERSION = 1 - MINOR_VERSION = 2 + MINOR_VERSION = 3 async def async_step_user( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle the initial step.""" - errors = {} + errors: dict[str, str] = {} if user_input is not None: + self._async_abort_entries_match({CONF_DEVICE: user_input[CONF_DEVICE]}) try: - if self._url_already_configured(_make_url_from_data(user_input)): - return self.async_abort(reason="already_configured") network_id, info = await _validate_input(user_input) except CannotConnect: errors["base"] = "cannot_connect" @@ -106,8 +97,8 @@ async def async_step_user( return self.async_create_entry( title=info["title"], data={ - CONF_HOST: info[CONF_HOST], - CONF_FILE_PATH: user_input[CONF_FILE_PATH], + CONF_DEVICE: info[CONF_DEVICE], + CONF_FILE_PATH: info[CONF_FILE_PATH], }, ) @@ -115,14 +106,6 @@ async def async_step_user( step_id="user", data_schema=DATA_SCHEMA, errors=errors ) - def _url_already_configured(self, url): - """See if we already have a UPB PIM matching user input configured.""" - existing_hosts = { - urlparse(entry.data[CONF_HOST]).hostname - for entry in self._async_current_entries() - } - return urlparse(url).hostname in existing_hosts - class CannotConnect(HomeAssistantError): """Error to indicate we cannot connect.""" diff --git a/homeassistant/components/upb/strings.json b/homeassistant/components/upb/strings.json index 95cf158f21677..a27357cb31eda 100644 --- a/homeassistant/components/upb/strings.json +++ b/homeassistant/components/upb/strings.json @@ -11,11 +11,14 @@ "step": { "user": { "data": { - "address": "Address (see description above)", - "file_path": "Path and name of the UPStart UPB export file.", - "protocol": "Protocol" + "device": "Device", + "file_path": "UPStart export file" }, - "description": "Connect a Universal Powerline Bus Powerline Interface Module (UPB PIM). The address string must be in the form 'address[:port]' for 'tcp'. The port is optional and defaults to 2101. Example: '192.168.1.42'. For the serial protocol, the address must be in the form 'tty[:baud]'. The baud is optional and defaults to 4800. Example: '/dev/ttyS1'.", + "data_description": { + "device": "The serial port or network address of the UPB PIM.", + "file_path": "Path and name of the UPStart UPB export file." + }, + "description": "Connect a Universal Powerline Bus Powerline Interface Module (UPB PIM).", "title": "Connect to UPB PIM" } } diff --git a/tests/components/upb/test_config_flow.py b/tests/components/upb/test_config_flow.py index 3909c7e5dc419..52cd797df89a7 100644 --- a/tests/components/upb/test_config_flow.py +++ b/tests/components/upb/test_config_flow.py @@ -10,7 +10,7 @@ from homeassistant.data_entry_flow import FlowResultType -def mocked_upb(sync_complete=True, config_ok=True): +def mocked_upb(sync_complete: bool = True, config_ok: bool = True): """Mock UPB lib.""" def _add_handler(_, callback): @@ -32,8 +32,11 @@ def _dummy_add_handler(_, _callback): ) -async def valid_tcp_flow( - hass: HomeAssistant, sync_complete: bool = True, config_ok: bool = True +async def valid_flow( + hass: HomeAssistant, + device: str = "socket://1.2.3.4:2101", + sync_complete: bool = True, + config_ok: bool = True, ) -> ConfigFlowResult: """Get result dict that are standard for most tests.""" @@ -46,7 +49,7 @@ async def valid_tcp_flow( ) return await hass.config_entries.flow.async_configure( flow["flow_id"], - {"protocol": "TCP", "address": "1.2.3.4", "file_path": "upb.upe"}, + {"device": device, "file_path": "upb.upe"}, ) @@ -66,8 +69,7 @@ async def test_full_upb_flow_with_serial_port(hass: HomeAssistant) -> None: result = await hass.config_entries.flow.async_configure( flow["flow_id"], { - "protocol": "Serial port", - "address": "/dev/ttyS0:115200", + "device": "/dev/ttyS0", "file_path": "upb.upe", }, ) @@ -78,17 +80,20 @@ async def test_full_upb_flow_with_serial_port(hass: HomeAssistant) -> None: assert result["type"] is FlowResultType.CREATE_ENTRY assert result["title"] == "UPB" assert result["data"] == { - "host": "serial:///dev/ttyS0:115200", + "device": "/dev/ttyS0", "file_path": "upb.upe", } assert len(mock_setup_entry.mock_calls) == 1 async def test_form_user_with_tcp_upb(hass: HomeAssistant) -> None: - """Test we can setup a serial upb.""" - result = await valid_tcp_flow(hass) + """Test we can setup a TCP upb.""" + result = await valid_flow(hass, device="socket://1.2.3.4:2101") assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["data"] == {"host": "tcp://1.2.3.4", "file_path": "upb.upe"} + assert result["data"] == { + "device": "socket://1.2.3.4:2101", + "file_path": "upb.upe", + } await hass.async_block_till_done() @@ -99,7 +104,7 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None: "homeassistant.components.upb.config_flow.asyncio.timeout", side_effect=TimeoutError, ): - result = await valid_tcp_flow(hass, sync_complete=False) + result = await valid_flow(hass, sync_complete=False) assert result["type"] is FlowResultType.FORM assert result["errors"] == {"base": "cannot_connect"} @@ -107,15 +112,15 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None: async def test_form_missing_upb_file(hass: HomeAssistant) -> None: """Test we handle cannot connect error.""" - result = await valid_tcp_flow(hass, config_ok=False) + result = await valid_flow(hass, config_ok=False) assert result["type"] is FlowResultType.FORM assert result["errors"] == {"base": "invalid_upb_file"} async def test_form_user_with_already_configured(hass: HomeAssistant) -> None: """Test we can setup a TCP upb.""" - _ = await valid_tcp_flow(hass) - result2 = await valid_tcp_flow(hass) + _ = await valid_flow(hass) + result2 = await valid_flow(hass) assert result2["type"] is FlowResultType.ABORT assert result2["reason"] == "already_configured" await hass.async_block_till_done() diff --git a/tests/components/upb/test_init.py b/tests/components/upb/test_init.py index a7621ce65fe52..03e70da44fdcb 100644 --- a/tests/components/upb/test_init.py +++ b/tests/components/upb/test_init.py @@ -8,12 +8,12 @@ from tests.common import MockConfigEntry -async def test_migrate_entry_minor_version_1_2(hass: HomeAssistant) -> None: - """Test migrating a 1.1 config entry to 1.2.""" +async def test_migrate_entry_minor_version_1_3(hass: HomeAssistant) -> None: + """Test migrating a 1.1 config entry to 1.3.""" with patch("homeassistant.components.upb.async_setup_entry", return_value=True): entry = MockConfigEntry( domain=DOMAIN, - data={"protocol": "TCP", "address": "1.2.3.4", "file_path": "upb.upe"}, + data={"host": "tcp://1.2.3.4", "file_path": "upb.upe"}, version=1, minor_version=1, unique_id=123456, @@ -21,5 +21,23 @@ async def test_migrate_entry_minor_version_1_2(hass: HomeAssistant) -> None: entry.add_to_hass(hass) assert await hass.config_entries.async_setup(entry.entry_id) assert entry.version == 1 - assert entry.minor_version == 2 + assert entry.minor_version == 3 assert entry.unique_id == "123456" + assert entry.data == {"device": "tcp://1.2.3.4", "file_path": "upb.upe"} + + +async def test_migrate_entry_minor_version_2_3(hass: HomeAssistant) -> None: + """Test migrating a 1.2 config entry to 1.3.""" + with patch("homeassistant.components.upb.async_setup_entry", return_value=True): + entry = MockConfigEntry( + domain=DOMAIN, + data={"host": "serial:///dev/ttyS0", "file_path": "upb.upe"}, + version=1, + minor_version=2, + unique_id="42", + ) + entry.add_to_hass(hass) + assert await hass.config_entries.async_setup(entry.entry_id) + assert entry.version == 1 + assert entry.minor_version == 3 + assert entry.data == {"device": "serial:///dev/ttyS0", "file_path": "upb.upe"} From e45f64b88037c15558d734255401e84df1ecc314 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 1 Jun 2026 19:27:20 +0200 Subject: [PATCH 06/39] Add media browser to Yoto (#172325) --- homeassistant/components/yoto/media_player.py | 261 ++++++++++- homeassistant/components/yoto/strings.json | 18 + tests/components/yoto/conftest.py | 24 +- .../yoto/snapshots/test_media_player.ambr | 4 +- tests/components/yoto/test_media_player.py | 440 +++++++++++++++++- 5 files changed, 736 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/yoto/media_player.py b/homeassistant/components/yoto/media_player.py index 5aa472f39ff69..1a1bd67010893 100644 --- a/homeassistant/components/yoto/media_player.py +++ b/homeassistant/components/yoto/media_player.py @@ -4,22 +4,31 @@ from datetime import datetime from typing import Any -from yoto_api import Card, PlaybackStatus, YotoError, YotoPlayer +from yoto_api import Card, Chapter, PlaybackStatus, Track, YotoError, YotoPlayer from homeassistant.components.media_player import ( + BrowseError, + BrowseMedia, + MediaClass, MediaPlayerDeviceClass, MediaPlayerEntity, MediaPlayerEntityFeature, MediaPlayerState, + MediaType, ) from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError +from homeassistant.exceptions import HomeAssistantError, ServiceValidationError from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from .const import DOMAIN from .coordinator import YotoConfigEntry, YotoDataUpdateCoordinator from .entity import YotoEntity +URI_SCHEME = "yoto" +# The URI authority ("card") names the content type. Only cards exist today; +# reserving it leaves room for groups without breaking URIs. +URI_CARD = "card" + PARALLEL_UPDATES = 0 # Yoto players expose 16 hardware volume steps. @@ -56,6 +65,8 @@ class YotoMediaPlayer(YotoEntity, MediaPlayerEntity): MediaPlayerEntityFeature.PLAY | MediaPlayerEntityFeature.PAUSE | MediaPlayerEntityFeature.STOP + | MediaPlayerEntityFeature.PLAY_MEDIA + | MediaPlayerEntityFeature.BROWSE_MEDIA | MediaPlayerEntityFeature.VOLUME_SET | MediaPlayerEntityFeature.VOLUME_STEP | MediaPlayerEntityFeature.PREVIOUS_TRACK @@ -170,6 +181,220 @@ async def async_media_previous_track(self) -> None: """Skip to the previous track on the active card.""" await self._async_run(self.coordinator.client.previous_track, self._player_id) + async def async_play_media( + self, media_type: MediaType | str, media_id: str, **kwargs: Any + ) -> None: + """Play a Yoto card, chapter, or track from the browse tree.""" + try: + card_id, chapter_key, track_key = _parse_uri(media_id) + except ValueError as err: + raise ServiceValidationError( + translation_domain=DOMAIN, + translation_key="invalid_media_id", + translation_placeholders={"media_id": media_id}, + ) from err + + client = self.coordinator.client + card = client.library.get(card_id) + if card is None: + raise ServiceValidationError( + translation_domain=DOMAIN, + translation_key="unknown_card", + translation_placeholders={"card_id": card_id}, + ) + + if chapter_key is not None: + # Library list may not include chapters yet; fetch detail on demand. + if not card.chapters: + try: + await client.update_card_detail(card_id) + except YotoError as err: + raise HomeAssistantError( + translation_domain=DOMAIN, + translation_key="card_detail_failed", + translation_placeholders={"error": str(err)}, + ) from err + + chapter = card.chapters.get(chapter_key) + if chapter is None: + raise ServiceValidationError( + translation_domain=DOMAIN, + translation_key="unknown_chapter", + translation_placeholders={ + "chapter_key": chapter_key, + "card_id": card_id, + }, + ) + if track_key is not None and track_key not in chapter.tracks: + raise ServiceValidationError( + translation_domain=DOMAIN, + translation_key="unknown_track", + translation_placeholders={ + "track_key": track_key, + "card_id": card_id, + }, + ) + # A chapter plays from its first track. + if track_key is None and chapter.tracks: + track_key = next(iter(chapter.tracks)) + + # Targeted chapter/track plays start at 0; a card play keeps its resume point. + seconds_in = 0 if chapter_key is not None else None + try: + await client.play_card( + self._player_id, + card_id, + chapter_key=chapter_key, + track_key=track_key, + seconds_in=seconds_in, + ) + except YotoError as err: + raise HomeAssistantError( + translation_domain=DOMAIN, + translation_key="play_failed", + translation_placeholders={"error": str(err)}, + ) from err + + async def async_browse_media( + self, + media_content_type: MediaType | str | None = None, + media_content_id: str | None = None, + ) -> BrowseMedia: + """Browse the Yoto card library.""" + if not media_content_id: + return self._browse_root() + + try: + card_id, chapter_key, _ = _parse_uri(media_content_id) + except ValueError as err: + raise BrowseError( + translation_domain=DOMAIN, + translation_key="invalid_media_id", + translation_placeholders={"media_id": media_content_id}, + ) from err + + card = self.coordinator.client.library.get(card_id) + if card is None: + raise BrowseError( + translation_domain=DOMAIN, + translation_key="unknown_card", + translation_placeholders={"card_id": card_id}, + ) + + if not card.chapters: + try: + await self.coordinator.client.update_card_detail(card_id) + except YotoError as err: + raise BrowseError( + translation_domain=DOMAIN, + translation_key="card_detail_failed", + translation_placeholders={"error": str(err)}, + ) from err + + if chapter_key is not None: + chapter = card.chapters.get(chapter_key) + if chapter is None: + raise BrowseError( + translation_domain=DOMAIN, + translation_key="unknown_chapter", + translation_placeholders={ + "chapter_key": chapter_key, + "card_id": card_id, + }, + ) + return self._browse_chapter(card_id, chapter_key, chapter) + + return self._browse_card(card) + + def _browse_root(self) -> BrowseMedia: + """List every card in the user's library.""" + return BrowseMedia( + media_class=MediaClass.DIRECTORY, + media_content_id="", + media_content_type=MediaType.MUSIC, + title="Yoto library", + can_play=False, + can_expand=True, + children=[ + self._card_node(card) + for card in self.coordinator.client.library.values() + ], + children_media_class=MediaClass.ALBUM, + ) + + def _browse_card(self, card: Card) -> BrowseMedia: + """List a card's chapters, collapsing single-chapter cards to tracks.""" + chapters = card.chapters + # Single-chapter cards expand straight to tracks (skip a one-item level). + if len(chapters) == 1: + chapter_key, chapter = next(iter(chapters.items())) + children = [ + self._track_node(card.id, chapter_key, track_key, track) + for track_key, track in chapter.tracks.items() + ] + else: + children = [ + self._chapter_node(card.id, chapter_key, chapter) + for chapter_key, chapter in chapters.items() + ] + node = self._card_node(card) + node.children = children + return node + + def _browse_chapter( + self, card_id: str, chapter_key: str, chapter: Chapter + ) -> BrowseMedia: + """List the tracks of a chapter.""" + node = self._chapter_node(card_id, chapter_key, chapter) + node.can_expand = True + node.children = [ + self._track_node(card_id, chapter_key, track_key, track) + for track_key, track in chapter.tracks.items() + ] + return node + + def _card_node(self, card: Card) -> BrowseMedia: + """Build a browse node for a card.""" + # MUSIC (not ALBUM) so children render in list view with thumbnails. + return BrowseMedia( + media_class=MediaClass.MUSIC, + media_content_id=_build_uri(card.id), + media_content_type=MediaType.MUSIC, + title=card.title or card.id, + can_play=True, + can_expand=True, + thumbnail=card.cover_image_large, + ) + + def _chapter_node( + self, card_id: str, chapter_key: str, chapter: Chapter + ) -> BrowseMedia: + """Build a browse node for a chapter.""" + # Single-track chapters aren't expandable: click plays the track. + return BrowseMedia( + media_class=MediaClass.MUSIC, + media_content_id=_build_uri(card_id, chapter_key), + media_content_type=MediaType.MUSIC, + title=chapter.title or chapter_key, + can_play=True, + can_expand=len(chapter.tracks) > 1, + thumbnail=chapter.icon, + ) + + def _track_node( + self, card_id: str, chapter_key: str, track_key: str, track: Track + ) -> BrowseMedia: + """Build a browse node for a track.""" + return BrowseMedia( + media_class=MediaClass.MUSIC, + media_content_id=_build_uri(card_id, chapter_key, track_key), + media_content_type=MediaType.MUSIC, + title=track.title or track_key, + can_play=True, + can_expand=False, + thumbnail=track.icon, + ) + async def _async_run( self, func: Callable[..., Awaitable[Any]], /, *args: Any ) -> None: @@ -182,3 +407,35 @@ async def _async_run( translation_key="command_failed", translation_placeholders={"error": str(err)}, ) from err + + +def _build_uri( + card_id: str, + chapter_key: str | None = None, + track_key: str | None = None, +) -> str: + """Build a yoto://card/... URI from card/chapter/track parts.""" + segments = [URI_CARD, card_id] + if chapter_key is not None: + segments.append(chapter_key) + if track_key is not None: + segments.append(track_key) + return f"{URI_SCHEME}://{'/'.join(segments)}" + + +def _parse_uri(media_id: str) -> tuple[str, str | None, str | None]: + """Parse a yoto://card/... URI into card/chapter/track parts. + + Parsed manually because URL parsers lower-case the authority and Yoto + IDs are case-sensitive. + """ + prefix = f"{URI_SCHEME}://{URI_CARD}/" + if not media_id.startswith(prefix): + raise ValueError(f"Not a Yoto media identifier: {media_id}") + parts = media_id[len(prefix) :].split("/") + if not parts or len(parts) > 3 or any(not segment for segment in parts): + raise ValueError(f"Not a Yoto media identifier: {media_id}") + card_id = parts[0] + chapter_key = parts[1] if len(parts) > 1 else None + track_key = parts[2] if len(parts) > 2 else None + return card_id, chapter_key, track_key diff --git a/homeassistant/components/yoto/strings.json b/homeassistant/components/yoto/strings.json index 7fa5d400632eb..a8c673ee61c21 100644 --- a/homeassistant/components/yoto/strings.json +++ b/homeassistant/components/yoto/strings.json @@ -31,12 +31,30 @@ } }, "exceptions": { + "card_detail_failed": { + "message": "Could not load Yoto card details: {error}" + }, "command_failed": { "message": "Yoto command failed: {error}" }, + "invalid_media_id": { + "message": "Not a Yoto media identifier: {media_id}" + }, "oauth2_implementation_unavailable": { "message": "[%key:common::exceptions::oauth2_implementation_unavailable::message%]" }, + "play_failed": { + "message": "Failed to play Yoto media: {error}" + }, + "unknown_card": { + "message": "Unknown Yoto card: {card_id}" + }, + "unknown_chapter": { + "message": "Unknown chapter {chapter_key} on card {card_id}" + }, + "unknown_track": { + "message": "Unknown track {track_key} on card {card_id}" + }, "update_error": { "message": "Error communicating with Yoto: {error}" } diff --git a/tests/components/yoto/conftest.py b/tests/components/yoto/conftest.py index fe3033d5f15dc..967eb50aaed72 100644 --- a/tests/components/yoto/conftest.py +++ b/tests/components/yoto/conftest.py @@ -9,11 +9,13 @@ import pytest from yoto_api import ( Card, + Chapter, Device, PlaybackEvent, PlaybackStatus, PlayerInfo, PlayerStatus, + Track, YotoPlayer, ) @@ -36,12 +38,32 @@ def _build_card() -> Card: - """Build a representative Yoto library card.""" + """Build a representative Yoto library card with chapters and tracks.""" return Card( id=CARD_ID, title="Outer Space", author="Ladybird Audio Adventures", cover_image_large="https://example.test/cover.jpg", + chapters={ + "01": Chapter( + key="01", + title="Introduction", + icon="https://example.test/ch01.png", + tracks={ + "01-INT": Track(key="01-INT", title="Welcome", duration=120), + "01-MAIN": Track( + key="01-MAIN", title="The Story Begins", duration=240 + ), + }, + ), + "02": Chapter( + key="02", + title="Planets", + tracks={ + "02-MER": Track(key="02-MER", title="Mercury", duration=180), + }, + ), + }, ) diff --git a/tests/components/yoto/snapshots/test_media_player.ambr b/tests/components/yoto/snapshots/test_media_player.ambr index 63cd745ed5671..0431b9ac67d96 100644 --- a/tests/components/yoto/snapshots/test_media_player.ambr +++ b/tests/components/yoto/snapshots/test_media_player.ambr @@ -31,7 +31,7 @@ 'platform': 'yoto', 'previous_unique_id': None, 'suggested_object_id': None, - 'supported_features': , + 'supported_features': , 'translation_key': None, 'unique_id': 'player-test', 'unit_of_measurement': None, @@ -50,7 +50,7 @@ 'media_position': 120, 'media_position_updated_at': datetime.datetime(2026, 5, 8, 12, 0, tzinfo=datetime.timezone.utc), 'media_title': 'Introduction', - 'supported_features': , + 'supported_features': , 'volume_level': 0.5, }), 'context': , diff --git a/tests/components/yoto/test_media_player.py b/tests/components/yoto/test_media_player.py index 1f731b6f3a565..a2ef208b2c174 100644 --- a/tests/components/yoto/test_media_player.py +++ b/tests/components/yoto/test_media_player.py @@ -1,11 +1,12 @@ """Tests for the Yoto media player platform.""" +from typing import Any from unittest.mock import MagicMock from freezegun.api import FrozenDateTimeFactory import pytest from syrupy.assertion import SnapshotAssertion -from yoto_api import YotoError +from yoto_api import Chapter, Track, YotoError from homeassistant.components.media_player import ( ATTR_MEDIA_SEEK_POSITION, @@ -17,22 +18,46 @@ SERVICE_MEDIA_PREVIOUS_TRACK, SERVICE_MEDIA_SEEK, SERVICE_MEDIA_STOP, + SERVICE_PLAY_MEDIA, SERVICE_VOLUME_SET, + MediaPlayerState, ) from homeassistant.const import ATTR_ENTITY_ID, STATE_UNAVAILABLE from homeassistant.core import HomeAssistant -from homeassistant.exceptions import HomeAssistantError +from homeassistant.exceptions import HomeAssistantError, ServiceValidationError from homeassistant.helpers import entity_registry as er from . import setup_integration from tests.common import MockConfigEntry, snapshot_platform +from tests.typing import WebSocketGenerator ENTITY_ID = "media_player.nursery_yoto" pytestmark = pytest.mark.usefixtures("setup_credentials") +def _build_chapters(structure: list[tuple[str, int]]) -> dict[str, Chapter]: + """Build chapters from a list of ``(chapter_title, track_count)`` tuples.""" + chapters = {} + for index, (title, track_count) in enumerate(structure, start=1): + chapter_key = f"{index:02d}" + chapters[chapter_key] = Chapter( + key=chapter_key, + title=title, + icon=f"https://example.test/ch{chapter_key}.png", + tracks={ + f"{chapter_key}-{track:02d}": Track( + key=f"{chapter_key}-{track:02d}", + title=f"{title} - Track {track}", + duration=60, + ) + for track in range(1, track_count + 1) + }, + ) + return chapters + + @pytest.mark.usefixtures("mock_token_hex", "mock_yoto_client") async def test_entity_state( hass: HomeAssistant, @@ -160,22 +185,425 @@ async def test_state_idle_before_first_event( state = hass.states.get(ENTITY_ID) assert state is not None - assert state.state == "idle" + assert state.state == MediaPlayerState.IDLE + + +@pytest.mark.parametrize( + ("media_content_id", "expected_call"), + [ + ( + "yoto://card/card-test", + {"chapter_key": None, "track_key": None, "seconds_in": None}, + ), + ( + "yoto://card/card-test/01", + {"chapter_key": "01", "track_key": "01-INT", "seconds_in": 0}, + ), + ( + "yoto://card/card-test/01/01-INT", + {"chapter_key": "01", "track_key": "01-INT", "seconds_in": 0}, + ), + ], +) +async def test_play_media( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + media_content_id: str, + expected_call: dict[str, Any], +) -> None: + """play_media routes a yoto:// URI to the right play_card call.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + MEDIA_PLAYER_DOMAIN, + SERVICE_PLAY_MEDIA, + { + ATTR_ENTITY_ID: ENTITY_ID, + "media_content_type": "music", + "media_content_id": media_content_id, + }, + blocking=True, + ) + + mock_yoto_client.play_card.assert_called_once_with( + "player-test", "card-test", **expected_call + ) + + +@pytest.mark.usefixtures("mock_yoto_client") +@pytest.mark.parametrize( + "media_content_id", + [ + pytest.param("spotify:track:abc", id="wrong_scheme"), + pytest.param("yoto://card-test/01", id="missing_card_prefix"), + pytest.param("yoto://card/", id="missing_card_id"), + pytest.param("yoto://card/card-test/01/01-INT/extra", id="too_many_segments"), + pytest.param("yoto://card/card-test//01-INT", id="empty_segment"), + ], +) +async def test_play_media_invalid_uri_raises( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + media_content_id: str, +) -> None: + """A media_id that isn't a complete yoto:// URI is rejected.""" + await setup_integration(hass, mock_config_entry) + + with pytest.raises(ServiceValidationError): + await hass.services.async_call( + MEDIA_PLAYER_DOMAIN, + SERVICE_PLAY_MEDIA, + { + ATTR_ENTITY_ID: ENTITY_ID, + "media_content_type": "music", + "media_content_id": media_content_id, + }, + blocking=True, + ) + + +@pytest.mark.parametrize( + "media_content_id", + [ + pytest.param("yoto://card/does-not-exist", id="unknown_card"), + pytest.param("yoto://card/card-test/does-not-exist", id="unknown_chapter"), + pytest.param("yoto://card/card-test/01/does-not-exist", id="unknown_track"), + ], +) +async def test_play_media_unknown_target_raises( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + media_content_id: str, +) -> None: + """A yoto:// URI pointing at unknown content is rejected.""" + await setup_integration(hass, mock_config_entry) + + with pytest.raises(ServiceValidationError): + await hass.services.async_call( + MEDIA_PLAYER_DOMAIN, + SERVICE_PLAY_MEDIA, + { + ATTR_ENTITY_ID: ENTITY_ID, + "media_content_type": "music", + "media_content_id": media_content_id, + }, + blocking=True, + ) + + mock_yoto_client.play_card.assert_not_called() + +async def test_play_media_card_detail_failure_raises( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, +) -> None: + """A failure fetching card chapters surfaces as HomeAssistantError.""" + card = mock_yoto_client.library["card-test"] + card.chapters = {} + mock_yoto_client.update_card_detail.side_effect = YotoError("offline") + await setup_integration(hass, mock_config_entry) + + with pytest.raises(HomeAssistantError): + await hass.services.async_call( + MEDIA_PLAYER_DOMAIN, + SERVICE_PLAY_MEDIA, + { + ATTR_ENTITY_ID: ENTITY_ID, + "media_content_type": "music", + "media_content_id": "yoto://card/card-test/01", + }, + blocking=True, + ) + + mock_yoto_client.play_card.assert_not_called() + + +@pytest.mark.usefixtures("mock_yoto_client") +async def test_browse_media_root_lists_cards( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """Browsing without a content id lists every library card.""" + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + {"id": 1, "type": "media_player/browse_media", "entity_id": ENTITY_ID} + ) + response = await client.receive_json() + + assert response["success"] + children = response["result"]["children"] + assert len(children) == 1 + assert children[0]["title"] == "Outer Space" + assert children[0]["media_content_id"] == "yoto://card/card-test" + assert children[0]["can_play"] is True + assert children[0]["can_expand"] is True + + +async def test_browse_card_with_multiple_chapters_and_multiple_tracks( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """N-N: multi-chapter card, multi-track chapters: list expandable chapters.""" + card = mock_yoto_client.library["card-test"] + card.chapters = _build_chapters([("Intro", 2), ("Planets", 3)]) + + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "music", + "media_content_id": "yoto://card/card-test", + } + ) + response = await client.receive_json() + + assert response["success"] + children = response["result"]["children"] + assert [c["title"] for c in children] == ["Intro", "Planets"] + assert all(c["can_expand"] for c in children) + + +async def test_browse_card_with_multiple_chapters_and_single_track( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """N-1: multi-chapter card, single-track chapters: list non-expandable chapters.""" + card = mock_yoto_client.library["card-test"] + card.chapters = _build_chapters([("Song A", 1), ("Song B", 1), ("Song C", 1)]) + + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "music", + "media_content_id": "yoto://card/card-test", + } + ) + response = await client.receive_json() + + assert response["success"] + children = response["result"]["children"] + assert [c["title"] for c in children] == ["Song A", "Song B", "Song C"] + assert not any(c["can_expand"] for c in children) + + +async def test_browse_card_with_single_chapter_collapses_to_tracks( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """1-N: single-chapter card expands straight to tracks (skips chapter level).""" + card = mock_yoto_client.library["card-test"] + card.chapters = _build_chapters([("Only chapter", 3)]) + + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "music", + "media_content_id": "yoto://card/card-test", + } + ) + response = await client.receive_json() + + assert response["success"] + children = response["result"]["children"] + assert [c["title"] for c in children] == [ + "Only chapter - Track 1", + "Only chapter - Track 2", + "Only chapter - Track 3", + ] + assert children[0]["media_content_id"] == "yoto://card/card-test/01/01-01" + + +@pytest.mark.usefixtures("mock_yoto_client") +async def test_browse_media_chapter_shows_tracks( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """Browsing a chapter lists its tracks.""" + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "playlist", + "media_content_id": "yoto://card/card-test/01", + } + ) + response = await client.receive_json() + + assert response["success"] + children = response["result"]["children"] + assert [c["title"] for c in children] == ["Welcome", "The Story Begins"] + assert children[0]["media_content_id"] == "yoto://card/card-test/01/01-INT" + + +async def test_browse_media_fetches_card_detail_lazily( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """Browsing a card without loaded chapters triggers update_card_detail.""" + card = mock_yoto_client.library["card-test"] + card.chapters = {} + + async def _populate(card_id: str) -> None: + card.chapters = {"01": Chapter(key="01", title="Intro", tracks={})} + + mock_yoto_client.update_card_detail.side_effect = _populate + + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "album", + "media_content_id": "yoto://card/card-test", + } + ) + response = await client.receive_json() + + assert response["success"] + mock_yoto_client.update_card_detail.assert_called_once_with("card-test") + + +@pytest.mark.usefixtures("mock_yoto_client") +async def test_browse_media_unknown_card_raises( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """Browsing a card that's not in the library returns a browse error.""" + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "album", + "media_content_id": "yoto://card/does-not-exist", + } + ) + response = await client.receive_json() + assert response["success"] is False + + +@pytest.mark.usefixtures("mock_yoto_client") +async def test_browse_media_unknown_chapter_raises( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """Browsing a chapter that's not in the card returns a browse error.""" + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "playlist", + "media_content_id": "yoto://card/card-test/does-not-exist", + } + ) + response = await client.receive_json() + assert response["success"] is False + + +async def test_browse_media_card_detail_failure_raises( + hass: HomeAssistant, + mock_yoto_client: MagicMock, + mock_config_entry: MockConfigEntry, + hass_ws_client: WebSocketGenerator, +) -> None: + """A failure fetching card chapters bubbles up as a browse error.""" + card = mock_yoto_client.library["card-test"] + card.chapters = {} + mock_yoto_client.update_card_detail.side_effect = YotoError("offline") + + await setup_integration(hass, mock_config_entry) + client = await hass_ws_client() + + await client.send_json( + { + "id": 1, + "type": "media_player/browse_media", + "entity_id": ENTITY_ID, + "media_content_type": "album", + "media_content_id": "yoto://card/card-test", + } + ) + response = await client.receive_json() + assert response["success"] is False + + +@pytest.mark.parametrize( + ("client_method", "service", "service_data"), + [ + pytest.param("pause", SERVICE_MEDIA_PAUSE, {}, id="playback"), + pytest.param( + "play_card", + SERVICE_PLAY_MEDIA, + { + "media_content_type": "music", + "media_content_id": "yoto://card/card-test", + }, + id="play_media", + ), + ], +) async def test_command_error_raises( hass: HomeAssistant, mock_yoto_client: MagicMock, mock_config_entry: MockConfigEntry, + client_method: str, + service: str, + service_data: dict[str, Any], ) -> None: """Yoto command failures surface as HomeAssistantError.""" await setup_integration(hass, mock_config_entry) - mock_yoto_client.pause.side_effect = YotoError("nope") + getattr(mock_yoto_client, client_method).side_effect = YotoError("nope") with pytest.raises(HomeAssistantError): await hass.services.async_call( MEDIA_PLAYER_DOMAIN, - SERVICE_MEDIA_PAUSE, - {ATTR_ENTITY_ID: ENTITY_ID}, + service, + {ATTR_ENTITY_ID: ENTITY_ID, **service_data}, blocking=True, ) From 8e19fd280eb8590348c16e4cbb861724c7418c2b Mon Sep 17 00:00:00 2001 From: markvp <6936351+markvp@users.noreply.github.com> Date: Tue, 2 Jun 2026 03:31:15 +1000 Subject: [PATCH 07/39] Add Thread and Wi-Fi RSSI diagnostic sensors to Matter integration (#167853) Co-authored-by: Claude Sonnet 4.6 Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- homeassistant/components/matter/sensor.py | 64 + homeassistant/components/matter/strings.json | 22 + .../matter/snapshots/test_sensor.ambr | 17461 ++++++++++------ tests/components/matter/test_sensor.py | 130 + 4 files changed, 11853 insertions(+), 5824 deletions(-) diff --git a/homeassistant/components/matter/sensor.py b/homeassistant/components/matter/sensor.py index 788fabac76350..06edeafce7c5a 100644 --- a/homeassistant/components/matter/sensor.py +++ b/homeassistant/components/matter/sensor.py @@ -27,6 +27,7 @@ LIGHT_LUX, PERCENTAGE, REVOLUTIONS_PER_MINUTE, + SIGNAL_STRENGTH_DECIBELS_MILLIWATT, EntityCategory, Platform, UnitOfApparentPower, @@ -137,6 +138,17 @@ _rvc_err.kNavigationSensorObscured: ("navigation_sensor_obscured"), } +THREAD_ROUTING_ROLE_MAP = { + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kUnspecified: "unspecified", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kUnassigned: "unassigned", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kSleepyEndDevice: "sleepy_end_device", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kEndDevice: "end_device", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kReed: "reed", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kRouter: "router", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kLeader: "leader", + clusters.ThreadNetworkDiagnostics.Enums.RoutingRoleEnum.kUnknownEnumValue: "unknown", +} + BOOT_REASON_MAP = { clusters.GeneralDiagnostics.Enums.BootReasonEnum.kUnspecified: "unspecified", clusters.GeneralDiagnostics.Enums.BootReasonEnum.kPowerOnReboot: "power_on_reboot", @@ -1599,6 +1611,58 @@ def _update_from_device(self) -> None: required_attributes=(clusters.DoorLock.Attributes.DoorClosedEvents,), featuremap_contains=clusters.DoorLock.Bitmaps.Feature.kDoorPositionSensor, ), + # WiFiNetworkDiagnostics cluster sensors + MatterDiscoverySchema( + platform=Platform.SENSOR, + entity_description=MatterSensorEntityDescription( + key="WiFiDiagnosticsRssi", + translation_key="wifi_rssi", + native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + state_class=SensorStateClass.MEASUREMENT, + ), + entity_class=MatterSensor, + required_attributes=(clusters.WiFiNetworkDiagnostics.Attributes.Rssi,), + ), + # ThreadNetworkDiagnostics cluster sensors + MatterDiscoverySchema( + platform=Platform.SENSOR, + entity_description=MatterSensorEntityDescription( + key="ThreadDiagnosticsChannel", + translation_key="thread_channel", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + entity_class=MatterSensor, + required_attributes=(clusters.ThreadNetworkDiagnostics.Attributes.Channel,), + ), + MatterDiscoverySchema( + platform=Platform.SENSOR, + entity_description=MatterSensorEntityDescription( + key="ThreadDiagnosticsRoutingRole", + translation_key="thread_routing_role", + device_class=SensorDeviceClass.ENUM, + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + options=list(THREAD_ROUTING_ROLE_MAP.values()), + device_to_ha=lambda value: THREAD_ROUTING_ROLE_MAP.get(value, "unknown"), + ), + entity_class=MatterSensor, + required_attributes=(clusters.ThreadNetworkDiagnostics.Attributes.RoutingRole,), + ), + MatterDiscoverySchema( + platform=Platform.SENSOR, + entity_description=MatterSensorEntityDescription( + key="ThreadDiagnosticsNetworkName", + translation_key="thread_network_name", + entity_category=EntityCategory.DIAGNOSTIC, + entity_registry_enabled_default=False, + ), + entity_class=MatterSensor, + required_attributes=(clusters.ThreadNetworkDiagnostics.Attributes.NetworkName,), + ), # GeneralDiagnostics cluster sensors MatterDiscoverySchema( platform=Platform.SENSOR, diff --git a/homeassistant/components/matter/strings.json b/homeassistant/components/matter/strings.json index b0d7b97608133..f6696e89aa5e6 100644 --- a/homeassistant/components/matter/strings.json +++ b/homeassistant/components/matter/strings.json @@ -615,6 +615,25 @@ "tank_volume": { "name": "Tank volume" }, + "thread_channel": { + "name": "Thread channel" + }, + "thread_network_name": { + "name": "Thread network name" + }, + "thread_routing_role": { + "name": "Thread routing role", + "state": { + "end_device": "End device", + "leader": "Leader", + "reed": "Router eligible end device", + "router": "Router", + "sleepy_end_device": "Sleepy end device", + "unassigned": "Unassigned", + "unknown": "Unknown", + "unspecified": "Unspecified" + } + }, "tvoc_level": { "name": "TVOC level", "state": { @@ -633,6 +652,9 @@ "voltage": { "name": "Voltage" }, + "wifi_rssi": { + "name": "Wi-Fi RSSI" + }, "window_covering_target_position": { "name": "Target opening position" } diff --git a/tests/components/matter/snapshots/test_sensor.ambr b/tests/components/matter/snapshots/test_sensor.ambr index 3c71f793c5745..31207671a4d6d 100644 --- a/tests/components/matter/snapshots/test_sensor.ambr +++ b/tests/components/matter/snapshots/test_sensor.ambr @@ -1641,6 +1641,178 @@ 'state': '1', }) # --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_channel-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_channel', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread channel', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread channel', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000016C-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_channel-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Multi-State Sensor P100 Thread channel', + }), + 'context': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_channel', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25', + }) +# --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_network_name-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_network_name', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread network name', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread network name', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000016C-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_network_name-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Multi-State Sensor P100 Thread network name', + }), + 'context': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_network_name', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'MyHome1895415629', + }) +# --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_routing_role-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_routing_role', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread routing role', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Thread routing role', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000016C-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_thread_routing_role-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Multi-State Sensor P100 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'context': , + 'entity_id': 'sensor.multi_state_sensor_p100_thread_routing_role', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'sleepy_end_device', + }) +# --- # name: test_sensors[aqara_multi_state_p100][sensor.multi_state_sensor_p100_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -2149,7 +2321,7 @@ 'state': '27.94', }) # --- -# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_uptime-entry] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -2163,7 +2335,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.presence_multi_sensor_fp300_1_uptime', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2171,44 +2343,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-00000000000000CD-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-00000000000000CD-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_uptime-state] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Presence Multi-Sensor FP300 1 Uptime', + 'friendly_name': 'Presence Multi-Sensor FP300 1 Thread channel', }), 'context': , - 'entity_id': 'sensor.presence_multi_sensor_fp300_1_uptime', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-19T13:09:31+00:00', + 'state': '25', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery-entry] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -2216,7 +2385,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.climate_sensor_w100_battery', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2224,44 +2393,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-00000000000000CD-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery-state] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Climate Sensor W100 Battery', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Presence Multi-Sensor FP300 1 Thread network name', }), 'context': , - 'entity_id': 'sensor.climate_sensor_w100_battery', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': 'MyHome1895415629', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_type-entry] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -2269,7 +2446,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.climate_sensor_w100_battery_type', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2277,43 +2454,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSourceBatReplacementDescription-47-19', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-00000000000000CD-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_type-state] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Climate Sensor W100 Battery type', + 'device_class': 'enum', + 'friendly_name': 'Presence Multi-Sensor FP300 1 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.climate_sensor_w100_battery_type', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'CR2450', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_voltage-entry] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -2321,7 +2507,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.climate_sensor_w100_battery_voltage', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2329,59 +2515,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-00000000000000CD-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_voltage-state] +# name: test_sensors[aqara_presence_fp300][sensor.presence_multi_sensor_fp300_1_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Climate Sensor W100 Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Presence Multi-Sensor FP300 1 Uptime', }), 'context': , - 'entity_id': 'sensor.climate_sensor_w100_battery_voltage', + 'entity_id': 'sensor.presence_multi_sensor_fp300_1_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.12', + 'state': '2024-12-19T13:09:31+00:00', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_boot_reason-entry] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2390,7 +2560,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.climate_sensor_w100_boot_reason', + 'entity_id': 'sensor.climate_sensor_w100_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2398,28 +2568,202 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_boot_reason-state] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Climate Sensor W100 Boot reason', - 'options': list([ - 'unspecified', + 'device_class': 'battery', + 'friendly_name': 'Climate Sensor W100 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.climate_sensor_w100_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100', + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_type-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.climate_sensor_w100_battery_type', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery type', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Battery type', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSourceBatReplacementDescription-47-19', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_type-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Climate Sensor W100 Battery type', + }), + 'context': , + 'entity_id': 'sensor.climate_sensor_w100_battery_type', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'CR2450', + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.climate_sensor_w100_battery_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery voltage', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-6-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_battery_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'Climate Sensor W100 Battery voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.climate_sensor_w100_battery_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.12', + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.climate_sensor_w100_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Climate Sensor W100 Boot reason', + 'options': list([ + 'unspecified', 'power_on_reboot', 'brown_out_reset', 'software_watchdog_reset', @@ -2761,7 +3105,7 @@ 'state': '27.73', }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_uptime-entry] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -2775,7 +3119,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.climate_sensor_w100_uptime', + 'entity_id': 'sensor.climate_sensor_w100_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2783,44 +3127,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_uptime-state] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Climate Sensor W100 Uptime', + 'friendly_name': 'Climate Sensor W100 Thread channel', }), 'context': , - 'entity_id': 'sensor.climate_sensor_w100_uptime', + 'entity_id': 'sensor.climate_sensor_w100_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:55:01+00:00', + 'state': '11', }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_active_current-entry] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -2828,7 +3169,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.floor_heating_thermostat_active_current', + 'entity_id': 'sensor.climate_sensor_w100_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2836,44 +3177,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_active_current-state] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Floor Heating Thermostat Active current', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Climate Sensor W100 Thread network name', }), 'context': , - 'entity_id': 'sensor.floor_heating_thermostat_active_current', + 'entity_id': 'sensor.climate_sensor_w100_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': 'AqaraHome-0123', }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_boot_reason-entry] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -2882,12 +3214,13 @@ 'capabilities': dict({ 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'config_entry_id': , @@ -2897,7 +3230,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.floor_heating_thermostat_boot_reason', + 'entity_id': 'sensor.climate_sensor_w100_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2905,61 +3238,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread routing role', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_boot_reason-state] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Floor Heating Thermostat Boot reason', + 'friendly_name': 'Climate Sensor W100 Thread routing role', 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'context': , - 'entity_id': 'sensor.floor_heating_thermostat_boot_reason', + 'entity_id': 'sensor.climate_sensor_w100_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_energy-entry] +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.floor_heating_thermostat_energy', + 'entity_category': , + 'entity_id': 'sensor.climate_sensor_w100_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2967,11 +3299,195 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000004B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_sensor_w100][sensor.climate_sensor_w100_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Climate Sensor W100 Uptime', + }), + 'context': , + 'entity_id': 'sensor.climate_sensor_w100_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:55:01+00:00', + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_active_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.floor_heating_thermostat_active_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Active current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Active current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_active_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'Floor Heating Thermostat Active current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.floor_heating_thermostat_active_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.floor_heating_thermostat_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Floor Heating Thermostat Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.floor_heating_thermostat_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'power_on_reboot', + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.floor_heating_thermostat_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), 'sensor.private': dict({ 'suggested_unit_of_measurement': , }), @@ -3170,7 +3686,7 @@ 'state': '21.18', }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_uptime-entry] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -3184,7 +3700,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.floor_heating_thermostat_uptime', + 'entity_id': 'sensor.floor_heating_thermostat_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3192,44 +3708,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_uptime-state] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Floor Heating Thermostat Uptime', + 'friendly_name': 'Floor Heating Thermostat Thread channel', }), 'context': , - 'entity_id': 'sensor.floor_heating_thermostat_uptime', + 'entity_id': 'sensor.floor_heating_thermostat_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:57:05+00:00', + 'state': '25', }) # --- -# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery-entry] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -3237,7 +3750,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.aqara_smart_lock_u200_battery', + 'entity_id': 'sensor.floor_heating_thermostat_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3245,45 +3758,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-2-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery-state] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Aqara Smart Lock U200 Battery', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Floor Heating Thermostat Thread network name', }), 'context': , - 'entity_id': 'sensor.aqara_smart_lock_u200_battery', + 'entity_id': 'sensor.floor_heating_thermostat_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '40', + 'state': '*********', }) # --- -# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery_voltage-entry] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -3292,7 +3811,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.aqara_smart_lock_u200_battery_voltage', + 'entity_id': 'sensor.floor_heating_thermostat_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3300,50 +3819,219 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-2-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery_voltage-state] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Aqara Smart Lock U200 Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Floor Heating Thermostat Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.aqara_smart_lock_u200_battery_voltage', + 'entity_id': 'sensor.floor_heating_thermostat_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '7.4', + 'state': 'router', }) # --- -# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_boot_reason-entry] +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.floor_heating_thermostat_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000064-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[aqara_thermostat_w500][sensor.floor_heating_thermostat_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Floor Heating Thermostat Uptime', + }), + 'context': , + 'entity_id': 'sensor.floor_heating_thermostat_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:57:05+00:00', + }) +# --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-2-PowerSource-47-12', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Aqara Smart Lock U200 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '40', + }) +# --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery voltage', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-2-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'Aqara Smart Lock U200 Battery voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '7.4', + }) +# --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ 'options': list([ 'unspecified', 'power_on_reboot', @@ -4073,6 +4761,61 @@ 'state': '22.5', }) # --- +# name: test_sensors[eberle_ute3000][sensor.connected_thermostat_ute_3000_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.connected_thermostat_ute_3000_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000007-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[eberle_ute3000][sensor.connected_thermostat_ute_3000_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Connected Thermostat UTE 3000 Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.connected_thermostat_ute_3000_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-53', + }) +# --- # name: test_sensors[ecovacs_deebot][sensor.ecodeebot_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -4705,6 +5448,61 @@ 'state': '2025-01-01T00:31:50+00:00', }) # --- +# name: test_sensors[ecovacs_deebot][sensor.ecodeebot_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.ecodeebot_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000002F-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[ecovacs_deebot][sensor.ecodeebot_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'ecodeebot Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.ecodeebot_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-45', + }) +# --- # name: test_sensors[eufy_vacuum_omni_e28][sensor.2bavs_ab6031x_44pe_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -5329,7 +6127,7 @@ 'state': '1', }) # --- -# name: test_sensors[eve_contact_sensor][sensor.eve_door_uptime-entry] +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -5343,7 +6141,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_door_uptime', + 'entity_id': 'sensor.eve_door_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5351,12 +6149,184 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000009-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_channel-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Eve Door Thread channel', + }), + 'context': , + 'entity_id': 'sensor.eve_door_thread_channel', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25', + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_network_name-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_door_thread_network_name', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread network name', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread network name', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000009-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_network_name-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Eve Door Thread network name', + }), + 'context': , + 'entity_id': 'sensor.eve_door_thread_network_name', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'MyHome1425454932', + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_routing_role-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_door_thread_routing_role', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread routing role', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Thread routing role', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000009-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_thread_routing_role-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Eve Door Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'context': , + 'entity_id': 'sensor.eve_door_thread_routing_role', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'sleepy_end_device', + }) +# --- +# name: test_sensors[eve_contact_sensor][sensor.eve_door_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_door_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, @@ -5607,7 +6577,7 @@ 'state': '11', }) # --- -# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_uptime-entry] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -5621,7 +6591,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_20ecn4101_uptime', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5629,44 +6599,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_uptime-state] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Eve Energy 20ECN4101 Uptime', + 'friendly_name': 'Eve Energy 20ECN4101 Thread channel', }), 'context': , - 'entity_id': 'sensor.eve_energy_20ecn4101_uptime', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-30T01:50:16+00:00', + 'state': '25', }) # --- -# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage_top-entry] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -5674,7 +6641,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_20ecn4101_voltage_top', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5682,48 +6649,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage (top)', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Voltage (top)', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-EveEnergySensorVoltage-319486977-319422472', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage_top-state] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Eve Energy 20ECN4101 Voltage (top)', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Energy 20ECN4101 Thread network name', }), 'context': , - 'entity_id': 'sensor.eve_energy_20ecn4101_voltage_top', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '123.099998474121', + 'state': 'MyHome********', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-entry] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -5732,7 +6702,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_current', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5740,57 +6710,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWattCurrent-319486977-319422473', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-state] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Eve Energy Plug Current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Eve Energy 20ECN4101 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_current', + 'entity_id': 'sensor.eve_energy_20ecn4101_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'router', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_energy-entry] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_energy_plug_energy', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5798,41 +6771,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWattAccumulated-319486977-319422475', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_energy-state] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'Eve Energy Plug Energy', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Eve Energy 20ECN4101 Uptime', }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_energy', + 'entity_id': 'sensor.eve_energy_20ecn4101_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.220000028610229', + 'state': '2024-12-30T01:50:16+00:00', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_power-entry] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage_top-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -5847,8 +6815,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_energy_plug_power', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_voltage_top', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5856,48 +6824,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Voltage (top)', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 0, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Voltage (top)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWatt-319486977-319422474', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-EveEnergySensorVoltage-319486977-319422472', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_power-state] +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage_top-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'Eve Energy Plug Power', + 'device_class': 'voltage', + 'friendly_name': 'Eve Energy 20ECN4101 Voltage (top)', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_power', + 'entity_id': 'sensor.eve_energy_20ecn4101_voltage_top', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '123.099998474121', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_reboot_count-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -5906,7 +6874,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5914,50 +6882,57 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Current', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWattCurrent-319486977-319422473', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_reboot_count-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Energy Plug Reboot count', - 'state_class': , + 'device_class': 'current', + 'friendly_name': 'Eve Energy Plug Current', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '95', + 'state': '0.0', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_uptime-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_uptime', + 'entity_category': None, + 'entity_id': 'sensor.eve_energy_plug_energy', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5965,36 +6940,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Energy', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Energy', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWattAccumulated-319486977-319422475', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_uptime-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_energy-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Eve Energy Plug Uptime', + 'device_class': 'energy', + 'friendly_name': 'Eve Energy Plug Energy', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_uptime', + 'entity_id': 'sensor.eve_energy_plug_energy', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-29T11:23:46+00:00', + 'state': '0.220000028610229', }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_voltage-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -6009,8 +6989,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_voltage', + 'entity_category': None, + 'entity_id': 'sensor.eve_energy_plug_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6018,48 +6998,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Power', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 0, + 'suggested_display_precision': 2, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorVoltage-319486977-319422472', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorWatt-319486977-319422474', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_voltage-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Eve Energy Plug Voltage', + 'device_class': 'power', + 'friendly_name': 'Eve Energy Plug Power', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_voltage', + 'entity_id': 'sensor.eve_energy_plug_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '238.800003051758', + 'state': '0.0', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_active_current-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -6068,7 +7048,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_patched_active_current', + 'entity_id': 'sensor.eve_energy_plug_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6076,60 +7056,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_active_current-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Eve Energy Plug Patched Active current', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Energy Plug Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_active_current', + 'entity_id': 'sensor.eve_energy_plug_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '95', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_energy-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_energy_plug_patched_energy', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_plug_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6137,60 +7107,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_energy-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'Eve Energy Plug Patched Energy', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Energy Plug Thread channel', }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_energy', + 'entity_id': 'sensor.eve_energy_plug_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0025', + 'state': '25', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_power-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_energy_plug_patched_power', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_plug_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6198,51 +7157,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_power-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'Eve Energy Plug Patched Power', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Energy Plug Thread network name', }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_power', + 'entity_id': 'sensor.eve_energy_plug_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '550.0', + 'state': 'MyHome23', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_reboot_count-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -6251,7 +7210,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_patched_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6259,36 +7218,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_reboot_count-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Energy Plug Patched Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Eve Energy Plug Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '95', + 'state': 'router', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_uptime-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -6302,7 +7271,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_patched_uptime', + 'entity_id': 'sensor.eve_energy_plug_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6321,25 +7290,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_uptime-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Eve Energy Plug Patched Uptime', + 'friendly_name': 'Eve Energy Plug Uptime', }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_uptime', + 'entity_id': 'sensor.eve_energy_plug_uptime', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '2024-12-29T11:23:46+00:00', }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_voltage-entry] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -6355,7 +7324,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_energy_plug_patched_voltage', + 'entity_id': 'sensor.eve_energy_plug_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6368,9 +7337,6 @@ 'sensor': dict({ 'suggested_display_precision': 0, }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), 'original_device_class': , 'original_icon': None, @@ -6379,35 +7345,35 @@ 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'voltage', - 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementVoltage-144-4', + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000003D-MatterNodeDevice-1-EveEnergySensorVoltage-319486977-319422472', 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_voltage-state] +# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'voltage', - 'friendly_name': 'Eve Energy Plug Patched Voltage', + 'friendly_name': 'Eve Energy Plug Voltage', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_energy_plug_patched_voltage', + 'entity_id': 'sensor.eve_energy_plug_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '220.0', + 'state': '238.800003051758', }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_reboot_count-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_active_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -6416,7 +7382,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_patched_active_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6424,50 +7390,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Active current', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Active current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_reboot_count-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_active_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Shutter Switch 20ECI1701 Reboot count', - 'state_class': , + 'device_class': 'current', + 'friendly_name': 'Eve Energy Plug Patched Active current', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_patched_active_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2.0', }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_target_opening_position-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_target_opening_position', + 'entity_category': None, + 'entity_id': 'sensor.eve_energy_plug_patched_energy', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6475,50 +7451,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Target opening position', + 'object_id_base': 'Energy', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Target opening position', + 'original_name': 'Energy', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'window_covering_target_position', - 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', - 'unit_of_measurement': '%', + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_target_opening_position-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_energy-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Shutter Switch 20ECI1701 Target opening position', - 'unit_of_measurement': '%', + 'device_class': 'energy', + 'friendly_name': 'Eve Energy Plug Patched Energy', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_target_opening_position', + 'entity_id': 'sensor.eve_energy_plug_patched_energy', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '0.0025', }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_uptime-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_uptime', + 'entity_category': None, + 'entity_id': 'sensor.eve_energy_plug_patched_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6526,43 +7512,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Power', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_uptime-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Eve Shutter Switch 20ECI1701 Uptime', + 'device_class': 'power', + 'friendly_name': 'Eve Energy Plug Patched Power', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_shutter_switch_20eci1701_uptime', + 'entity_id': 'sensor.eve_energy_plug_patched_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:56:27+00:00', + 'state': '550.0', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -6571,7 +7565,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_battery', + 'entity_id': 'sensor.eve_energy_plug_patched_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6579,46 +7573,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Eve Thermo 20EBP1701 Battery', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Eve Energy Plug Patched Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_battery', + 'entity_id': 'sensor.eve_energy_plug_patched_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '95', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -6626,7 +7616,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage', + 'entity_id': 'sensor.eve_energy_plug_patched_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6634,52 +7624,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Eve Thermo 20EBP1701 Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Energy Plug Patched Thread channel', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage', + 'entity_id': 'sensor.eve_energy_plug_patched_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.05', + 'state': '25', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_reboot_count-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -6687,7 +7666,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_patched_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6695,43 +7674,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_reboot_count-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20EBP1701 Reboot count', - 'state_class': , + 'friendly_name': 'Eve Energy Plug Patched Thread network name', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_reboot_count', + 'entity_id': 'sensor.eve_energy_plug_patched_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2', + 'state': 'MyHome23', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -6739,8 +7726,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_thermo_20ebp1701_temperature', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_plug_patched_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6748,41 +7735,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Eve Thermo 20EBP1701 Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Eve Energy Plug Patched Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_temperature', + 'entity_id': 'sensor.eve_energy_plug_patched_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '21.0', + 'state': 'router', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_uptime-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -6796,7 +7788,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_uptime', + 'entity_id': 'sensor.eve_energy_plug_patched_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6815,39 +7807,41 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_uptime-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Eve Thermo 20EBP1701 Uptime', + 'friendly_name': 'Eve Energy Plug Patched Uptime', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_uptime', + 'entity_id': 'sensor.eve_energy_plug_patched_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-29T00:54:08+00:00', + 'state': '2024-12-29T11:23:46+00:00', }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-entry] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_plug_patched_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6855,43 +7849,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve position', + 'object_id_base': 'Voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve position', + 'original_name': 'Voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'valve_position', - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-1-EveThermoValvePosition-319486977-319422488', - 'unit_of_measurement': '%', + 'translation_key': 'voltage', + 'unique_id': '00000000000004D2-00000000000000B7-MatterNodeDevice-2-ElectricalPowerMeasurementVoltage-144-4', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-state] +# name: test_sensors[eve_energy_plug_patched][sensor.eve_energy_plug_patched_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20EBP1701 Valve position', - 'unit_of_measurement': '%', + 'device_class': 'voltage', + 'friendly_name': 'Eve Energy Plug Patched Voltage', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position', + 'entity_id': 'sensor.eve_energy_plug_patched_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '10', + 'state': '220.0', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_battery-entry] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -6900,7 +7902,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_battery', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6908,46 +7910,93 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-PowerSource-47-12', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_target_opening_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_target_opening_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Target opening position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Target opening position', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'window_covering_target_position', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', 'unit_of_measurement': '%', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_battery-state] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_target_opening_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Eve Thermo 20ECD1701 Battery', - 'state_class': , + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Target opening position', 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_battery', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_target_opening_position', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '100', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_reboot_count-entry] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -6955,7 +8004,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_reboot_count', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -6963,52 +8012,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_reboot_count-state] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20ECD1701 Reboot count', - 'state_class': , + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Thread channel', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_reboot_count', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '9', + 'state': '25', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_temperature-entry] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_thermo_20ecd1701_temperature', + 'entity_category': , + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7016,47 +8062,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_temperature-state] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Eve Thermo 20ECD1701 Temperature', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Thread network name', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_temperature', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '16.2', + 'state': 'MyHome', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_uptime-entry] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7064,7 +8115,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_uptime', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7072,36 +8123,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_uptime-state] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Eve Thermo 20ECD1701 Uptime', + 'device_class': 'enum', + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_uptime', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:49+00:00', + 'state': 'router', }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_valve_position-entry] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -7114,8 +8175,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_thermo_20ecd1701_valve_position', + 'entity_category': , + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7123,36 +8184,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve position', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve position', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'valve_position', - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-1-EveThermoValvePosition-319486977-319422488', - 'unit_of_measurement': '%', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000094-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_valve_position-state] +# name: test_sensors[eve_shutter][sensor.eve_shutter_switch_20eci1701_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20ECD1701 Valve position', - 'unit_of_measurement': '%', + 'device_class': 'uptime', + 'friendly_name': 'Eve Shutter Switch 20ECI1701 Uptime', }), 'context': , - 'entity_id': 'sensor.eve_thermo_20ecd1701_valve_position', + 'entity_id': 'sensor.eve_shutter_switch_20eci1701_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2025-01-01T13:56:27+00:00', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -7168,7 +8229,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_weather_battery', + 'entity_id': 'sensor.eve_thermo_20ebp1701_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7187,27 +8248,27 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-PowerSource-47-12', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-PowerSource-47-12', 'unit_of_measurement': '%', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'battery', - 'friendly_name': 'Eve Weather Battery', + 'friendly_name': 'Eve Thermo 20EBP1701 Battery', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.eve_weather_battery', + 'entity_id': 'sensor.eve_thermo_20ebp1701_battery', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '100', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery_voltage-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -7223,7 +8284,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_weather_battery_voltage', + 'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7248,34 +8309,34 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery_voltage-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'voltage', - 'friendly_name': 'Eve Weather Battery voltage', + 'friendly_name': 'Eve Thermo 20EBP1701 Battery voltage', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_weather_battery_voltage', + 'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.956', + 'state': '3.05', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_humidity-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -7283,8 +8344,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_weather_humidity', + 'entity_category': , + 'entity_id': 'sensor.eve_thermo_20ebp1701_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7292,38 +8353,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Humidity', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-2-HumiditySensor-1029-0', - 'unit_of_measurement': '%', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_humidity-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'Eve Weather Humidity', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Eve Thermo 20EBP1701 Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.eve_weather_humidity', + 'entity_id': 'sensor.eve_thermo_20ebp1701_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '80.66', + 'state': '2', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_pressure-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -7339,7 +8398,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.eve_weather_pressure', + 'entity_id': 'sensor.eve_thermo_20ebp1701_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7347,49 +8406,47 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Pressure', + 'object_id_base': 'Temperature', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Pressure', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-EveWeatherPressure-319486977-319422484', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_pressure-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'Eve Weather Pressure', + 'device_class': 'temperature', + 'friendly_name': 'Eve Thermo 20EBP1701 Temperature', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.eve_weather_pressure', + 'entity_id': 'sensor.eve_thermo_20ebp1701_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1008.5', + 'state': '21.0', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_reboot_count-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7397,7 +8454,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_weather_reboot_count', + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7405,52 +8462,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_reboot_count-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Weather Reboot count', - 'state_class': , + 'friendly_name': 'Eve Thermo 20EBP1701 Thread channel', }), 'context': , - 'entity_id': 'sensor.eve_weather_reboot_count', + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '25', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_temperature-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_weather_temperature', + 'entity_category': , + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7458,47 +8512,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_temperature-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Eve Weather Temperature', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Thermo 20EBP1701 Thread network name', }), 'context': , - 'entity_id': 'sensor.eve_weather_temperature', + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '16.03', + 'state': '**REDACTED**', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_uptime-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7506,7 +8565,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.eve_weather_uptime', + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7514,57 +8573,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_uptime-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Eve Weather Uptime', + 'device_class': 'enum', + 'friendly_name': 'Eve Thermo 20EBP1701 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.eve_weather_uptime', + 'entity_id': 'sensor.eve_thermo_20ebp1701_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-11-23T01:03:13+00:00', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_weather_trend-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'sunny', - 'cloudy', - 'rainy', - 'stormy', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.eve_weather_weather_trend', + 'entity_category': , + 'entity_id': 'sensor.eve_thermo_20ebp1701_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7572,66 +8634,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Weather trend', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Weather trend', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'eve_weather_trend', - 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-EveWeatherWeatherTrend-319486977-319422485', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[eve_weather_sensor][sensor.eve_weather_weather_trend-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Eve Weather Weather trend', - 'options': list([ - 'sunny', - 'cloudy', - 'rainy', - 'stormy', - ]), + 'device_class': 'uptime', + 'friendly_name': 'Eve Thermo 20EBP1701 Uptime', }), 'context': , - 'entity_id': 'sensor.eve_weather_weather_trend', + 'entity_id': 'sensor.eve_thermo_20ebp1701_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'rainy', + 'state': '2024-12-29T00:54:08+00:00', }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_boot_reason-entry] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_extended_color_light_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7639,52 +8685,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Valve position', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Valve position', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': 'valve_position', + 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-1-EveThermoValvePosition-319486977-319422488', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_boot_reason-state] +# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Extended Color Light Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Eve Thermo 20EBP1701 Valve position', + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_extended_color_light_boot_reason', + 'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '10', }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_reboot_count-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -7693,7 +8730,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_extended_color_light_reboot_count', + 'entity_id': 'sensor.eve_thermo_20ecd1701_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7701,42 +8738,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_reboot_count-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Extended Color Light Reboot count', - 'state_class': , + 'device_class': 'battery', + 'friendly_name': 'Eve Thermo 20ECD1701 Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_extended_color_light_reboot_count', + 'entity_id': 'sensor.eve_thermo_20ecd1701_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '4', + 'state': '100', }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_uptime-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7744,7 +8785,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_extended_color_light_uptime', + 'entity_id': 'sensor.eve_thermo_20ecd1701_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7752,36 +8793,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_uptime-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Extended Color Light Uptime', + 'friendly_name': 'Eve Thermo 20ECD1701 Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_extended_color_light_uptime', + 'entity_id': 'sensor.eve_thermo_20ecd1701_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-22T22:08:39+00:00', + 'state': '9', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -7796,8 +8837,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_battery', + 'entity_category': None, + 'entity_id': 'sensor.eve_thermo_20ecd1701_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7805,46 +8846,47 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-PowerSource-47-12', - 'unit_of_measurement': '%', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'HJMT-6B Battery', + 'device_class': 'temperature', + 'friendly_name': 'Eve Thermo 20ECD1701 Temperature', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.hjmt_6b_battery', + 'entity_id': 'sensor.eve_thermo_20ecd1701_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '16.2', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery_voltage-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7852,7 +8894,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_battery_voltage', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7860,60 +8902,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery_voltage-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'HJMT-6B Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Thermo 20ECD1701 Thread channel', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_battery_voltage', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.316', + 'state': '25', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_boot_reason-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -7921,7 +8944,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_boot_reason', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7929,52 +8952,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_boot_reason-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'HJMT-6B Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Eve Thermo 20ECD1701 Thread network name', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_boot_reason', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'software_reset', + 'state': 'MyHome', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_1-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -7983,7 +9005,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_1', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -7991,44 +9013,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (1)', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (1)', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-1-SwitchCurrentPosition-59-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_1-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (1)', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Eve Thermo 20ECD1701 Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_1', + 'entity_id': 'sensor.eve_thermo_20ecd1701_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_2-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -8036,7 +9066,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_2', + 'entity_id': 'sensor.eve_thermo_20ecd1701_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8044,52 +9074,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (2)', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (2)', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-2-SwitchCurrentPosition-59-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_2-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (2)', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Eve Thermo 20ECD1701 Uptime', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_2', + 'entity_id': 'sensor.eve_thermo_20ecd1701_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2025-01-01T13:59:49+00:00', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_3-entry] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_valve_position-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_3', + 'entity_category': None, + 'entity_id': 'sensor.eve_thermo_20ecd1701_valve_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8097,36 +9125,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (3)', + 'object_id_base': 'Valve position', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (3)', + 'original_name': 'Valve position', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-3-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'valve_position', + 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-1-EveThermoValvePosition-319486977-319422488', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_3-state] +# name: test_sensors[eve_thermo_v5][sensor.eve_thermo_20ecd1701_valve_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (3)', - 'state_class': , + 'friendly_name': 'Eve Thermo 20ECD1701 Valve position', + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_3', + 'entity_id': 'sensor.eve_thermo_20ecd1701_valve_position', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '0', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_4-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8142,7 +9170,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_4', + 'entity_id': 'sensor.eve_weather_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8150,36 +9178,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (4)', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (4)', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-4-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_4-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (4)', + 'device_class': 'battery', + 'friendly_name': 'Eve Weather Battery', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_4', + 'entity_id': 'sensor.eve_weather_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '100', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_5-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8195,7 +9225,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_5', + 'entity_id': 'sensor.eve_weather_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8203,36 +9233,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (5)', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (5)', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-5-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_5-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (5)', + 'device_class': 'voltage', + 'friendly_name': 'Eve Weather Battery voltage', 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_5', + 'entity_id': 'sensor.eve_weather_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2.956', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_6-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8247,8 +9285,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_6', + 'entity_category': None, + 'entity_id': 'sensor.eve_weather_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8256,43 +9294,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (6)', + 'object_id_base': 'Humidity', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (6)', + 'original_name': 'Humidity', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-6-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-2-HumiditySensor-1029-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_6-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Current switch position (6)', + 'device_class': 'humidity', + 'friendly_name': 'Eve Weather Humidity', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.hjmt_6b_current_switch_position_6', + 'entity_id': 'sensor.eve_weather_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '80.66', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_reboot_count-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_pressure-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -8300,8 +9340,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.eve_weather_pressure', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8309,42 +9349,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Pressure', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Pressure', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-EveWeatherPressure-319486977-319422484', + 'unit_of_measurement': , }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_reboot_count-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_pressure-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'HJMT-6B Reboot count', - 'state_class': , - }), - 'context': , - 'entity_id': 'sensor.hjmt_6b_reboot_count', + 'device_class': 'pressure', + 'friendly_name': 'Eve Weather Pressure', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.eve_weather_pressure', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '1008.5', }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_uptime-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -8352,7 +9399,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.hjmt_6b_uptime', + 'entity_id': 'sensor.eve_weather_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8360,36 +9407,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[haojai_switch][sensor.hjmt_6b_uptime-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'HJMT-6B Uptime', + 'friendly_name': 'Eve Weather Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.hjmt_6b_uptime', + 'entity_id': 'sensor.eve_weather_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-04-26T18:51:31+00:00', + 'state': '1', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8404,8 +9451,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_battery', + 'entity_category': None, + 'entity_id': 'sensor.eve_weather_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8413,38 +9460,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSource-47-12', - 'unit_of_measurement': '%', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Smart CO sensor Battery', + 'device_class': 'temperature', + 'friendly_name': 'Eve Weather Temperature', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_battery', + 'entity_id': 'sensor.eve_weather_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '16.03', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_type-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8458,7 +9508,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_battery_type', + 'entity_id': 'sensor.eve_weather_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8466,43 +9516,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_type-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smart CO sensor Battery type', + 'friendly_name': 'Eve Weather Thread channel', }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_battery_type', + 'entity_id': 'sensor.eve_weather_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'AA', + 'state': '25', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_voltage-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -8510,7 +9558,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_battery_voltage', + 'entity_id': 'sensor.eve_weather_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8518,51 +9566,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_voltage-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Smart CO sensor Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Eve Weather Thread network name', }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_battery_voltage', + 'entity_id': 'sensor.eve_weather_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.0', + 'state': '**REDACTED**', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_carbon_monoxide-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -8570,8 +9618,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.smart_co_sensor_carbon_monoxide', + 'entity_category': , + 'entity_id': 'sensor.eve_weather_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8579,46 +9627,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Carbon monoxide', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Carbon monoxide', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-CarbonMonoxideSensor-1036-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_carbon_monoxide-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'carbon_monoxide', - 'friendly_name': 'Smart CO sensor Carbon monoxide', - 'state_class': , - 'unit_of_measurement': 'ppm', + 'device_class': 'enum', + 'friendly_name': 'Eve Weather Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_carbon_monoxide', + 'entity_id': 'sensor.eve_weather_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_reboot_count-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -8626,7 +9680,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_reboot_count', + 'entity_id': 'sensor.eve_weather_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8634,43 +9688,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_reboot_count-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smart CO sensor Reboot count', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Eve Weather Uptime', }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_reboot_count', + 'entity_id': 'sensor.eve_weather_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2024-11-23T01:03:13+00:00', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_time_remaining-entry] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_weather_trend-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'sunny', + 'cloudy', + 'rainy', + 'stormy', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -8678,8 +9737,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_time_remaining', + 'entity_category': None, + 'entity_id': 'sensor.eve_weather_weather_trend', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8687,50 +9746,58 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Time remaining', + 'object_id_base': 'Weather trend', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Time remaining', + 'original_name': 'Weather trend', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_time_remaining', - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', - 'unit_of_measurement': , + 'translation_key': 'eve_weather_trend', + 'unique_id': '00000000000004D2-000000000000001D-MatterNodeDevice-1-EveWeatherWeatherTrend-319486977-319422485', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_time_remaining-state] +# name: test_sensors[eve_weather_sensor][sensor.eve_weather_weather_trend-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'duration', - 'friendly_name': 'Smart CO sensor Time remaining', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Eve Weather Weather trend', + 'options': list([ + 'sunny', + 'cloudy', + 'rainy', + 'stormy', + ]), }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_time_remaining', + 'entity_id': 'sensor.eve_weather_weather_trend', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'rainy', }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_uptime-entry] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -8738,7 +9805,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_co_sensor_uptime', + 'entity_id': 'sensor.mock_extended_color_light_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8746,43 +9813,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_uptime-state] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Smart CO sensor Uptime', + 'device_class': 'enum', + 'friendly_name': 'Mock Extended Color Light Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.smart_co_sensor_uptime', + 'entity_id': 'sensor.mock_extended_color_light_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:57:22+00:00', + 'state': 'unspecified', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery-entry] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -8791,7 +9867,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_battery', + 'entity_id': 'sensor.mock_extended_color_light_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8799,38 +9875,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery-state] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Smart motion sensor Battery', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Mock Extended Color Light Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_battery', + 'entity_id': 'sensor.mock_extended_color_light_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '4', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_type-entry] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8844,7 +9918,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_battery_type', + 'entity_id': 'sensor.mock_extended_color_light_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8852,35 +9926,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000000A-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_type-state] +# name: test_sensors[extended_color_light][sensor.mock_extended_color_light_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smart motion sensor Battery type', + 'device_class': 'uptime', + 'friendly_name': 'Mock Extended Color Light Uptime', }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_battery_type', + 'entity_id': 'sensor.mock_extended_color_light_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'CR2', + 'state': '2024-12-22T22:08:39+00:00', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_voltage-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8896,7 +9971,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_battery_voltage', + 'entity_id': 'sensor.hjmt_6b_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8904,44 +9979,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Battery', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_voltage-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Smart motion sensor Battery voltage', + 'device_class': 'battery', + 'friendly_name': 'HJMT-6B Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_battery_voltage', + 'entity_id': 'sensor.hjmt_6b_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.0', + 'state': '1', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_illuminance-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8956,8 +10025,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.smart_motion_sensor_illuminance', + 'entity_category': , + 'entity_id': 'sensor.hjmt_6b_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8965,45 +10034,59 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Illuminance', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Illuminance', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-2-LightSensor-1024-0', - 'unit_of_measurement': 'lx', + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_illuminance-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'illuminance', - 'friendly_name': 'Smart motion sensor Illuminance', + 'device_class': 'voltage', + 'friendly_name': 'HJMT-6B Battery voltage', 'state_class': , - 'unit_of_measurement': 'lx', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_illuminance', + 'entity_id': 'sensor.hjmt_6b_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '105.0', + 'state': '2.316', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_reboot_count-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -9012,7 +10095,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_reboot_count', + 'entity_id': 'sensor.hjmt_6b_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9020,36 +10103,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_reboot_count-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smart motion sensor Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'HJMT-6B Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_reboot_count', + 'entity_id': 'sensor.hjmt_6b_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '28', + 'state': 'software_reset', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_time_remaining-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9065,7 +10157,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_time_remaining', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9073,50 +10165,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Time remaining', + 'object_id_base': 'Current switch position (1)', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Time remaining', + 'original_name': 'Current switch position (1)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_time_remaining', - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-1-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_time_remaining-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'duration', - 'friendly_name': 'Smart motion sensor Time remaining', + 'friendly_name': 'HJMT-6B Current switch position (1)', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_time_remaining', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '0', }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_uptime-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -9124,7 +10210,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smart_motion_sensor_uptime', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9132,36 +10218,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Current switch position (2)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Current switch position (2)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-2-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_uptime-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Smart motion sensor Uptime', + 'friendly_name': 'HJMT-6B Current switch position (2)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.smart_motion_sensor_uptime', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:53+00:00', + 'state': '0', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_3-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9177,7 +10263,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_battery', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_3', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9185,52 +10271,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Current switch position (3)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Current switch position (3)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-3-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_3-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Smoke sensor Battery', + 'friendly_name': 'HJMT-6B Current switch position (3)', 'state_class': , - 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.smoke_sensor_battery', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_3', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '94', + 'state': '0', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_type-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_4-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, - 'config_entry_id': , + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_battery_type', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_4', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9238,35 +10324,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Current switch position (4)', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Current switch position (4)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-4-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_type-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_4-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smoke sensor Battery type', + 'friendly_name': 'HJMT-6B Current switch position (4)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.smoke_sensor_battery_type', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_4', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'CR123A', + 'state': '0', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_voltage-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9282,7 +10369,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_battery_voltage', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9290,59 +10377,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Current switch position (5)', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Current switch position (5)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-5-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_voltage-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Smoke sensor Battery voltage', + 'friendly_name': 'HJMT-6B Current switch position (5)', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.smoke_sensor_battery_voltage', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_5', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '0', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_boot_reason-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_6-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -9351,7 +10422,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_boot_reason', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_6', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9359,45 +10430,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Current switch position (6)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Current switch position (6)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-6-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_boot_reason-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_current_switch_position_6-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Smoke sensor Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'HJMT-6B Current switch position (6)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.smoke_sensor_boot_reason', + 'entity_id': 'sensor.hjmt_6b_current_switch_position_6', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '0', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_reboot_count-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9413,7 +10475,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_reboot_count', + 'entity_id': 'sensor.hjmt_6b_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9432,25 +10494,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_reboot_count-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Smoke sensor Reboot count', + 'friendly_name': 'HJMT-6B Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.smoke_sensor_reboot_count', + 'entity_id': 'sensor.hjmt_6b_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1', }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_uptime-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9464,7 +10526,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.smoke_sensor_uptime', + 'entity_id': 'sensor.hjmt_6b_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9472,59 +10534,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_uptime-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Smoke sensor Uptime', + 'friendly_name': 'HJMT-6B Thread channel', }), 'context': , - 'entity_id': 'sensor.smoke_sensor_uptime', + 'entity_id': 'sensor.hjmt_6b_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-29T17:17:40+00:00', + 'state': '25', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_air_quality-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'extremely_poor', - 'very_poor', - 'poor', - 'fair', - 'good', - 'moderate', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.alpstuga_air_quality_monitor_air_quality', + 'entity_category': , + 'entity_id': 'sensor.hjmt_6b_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9532,44 +10584,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Air quality', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Air quality', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'air_quality', - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-AirQuality-91-0', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_air_quality-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'ALPSTUGA air quality monitor Air quality', - 'options': list([ - 'extremely_poor', - 'very_poor', - 'poor', - 'fair', - 'good', - 'moderate', - ]), + 'friendly_name': 'HJMT-6B Thread network name', }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_air_quality', + 'entity_id': 'sensor.hjmt_6b_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'good', + 'state': 'MyHome***', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_boot_reason-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9578,12 +10621,13 @@ 'capabilities': dict({ 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'config_entry_id': , @@ -9593,7 +10637,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_boot_reason', + 'entity_id': 'sensor.hjmt_6b_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9601,61 +10645,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread routing role', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_boot_reason-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'ALPSTUGA air quality monitor Boot reason', + 'friendly_name': 'HJMT-6B Thread routing role', 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_boot_reason', + 'entity_id': 'sensor.hjmt_6b_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_carbon_dioxide-entry] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.alpstuga_air_quality_monitor_carbon_dioxide', + 'entity_category': , + 'entity_id': 'sensor.hjmt_6b_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9663,38 +10706,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Carbon dioxide', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Carbon dioxide', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-CarbonDioxideSensor-1037-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000003-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_carbon_dioxide-state] +# name: test_sensors[haojai_switch][sensor.hjmt_6b_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'carbon_dioxide', - 'friendly_name': 'ALPSTUGA air quality monitor Carbon dioxide', - 'state_class': , - 'unit_of_measurement': 'ppm', + 'device_class': 'uptime', + 'friendly_name': 'HJMT-6B Uptime', }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_carbon_dioxide', + 'entity_id': 'sensor.hjmt_6b_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '394.0', + 'state': '2024-04-26T18:51:31+00:00', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_humidity-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9709,8 +10750,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.alpstuga_air_quality_monitor_humidity', + 'entity_category': , + 'entity_id': 'sensor.smart_co_sensor_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9718,54 +10759,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Humidity', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-HumiditySensor-1029-0', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSource-47-12', 'unit_of_measurement': '%', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_humidity-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'ALPSTUGA air quality monitor Humidity', + 'device_class': 'battery', + 'friendly_name': 'Smart CO sensor Battery', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_humidity', + 'entity_id': 'sensor.smart_co_sensor_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '46.21', + 'state': '100', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_pm2_5-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_type-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.alpstuga_air_quality_monitor_pm2_5', + 'entity_category': , + 'entity_id': 'sensor.smart_co_sensor_battery_type', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9773,45 +10812,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'PM2.5', + 'object_id_base': 'Battery type', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'PM2.5', + 'original_name': 'Battery type', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-PM25Sensor-1066-0', - 'unit_of_measurement': 'μg/m³', + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_pm2_5-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_type-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pm25', - 'friendly_name': 'ALPSTUGA air quality monitor PM2.5', - 'state_class': , - 'unit_of_measurement': 'μg/m³', + 'friendly_name': 'Smart CO sensor Battery type', }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_pm2_5', + 'entity_id': 'sensor.smart_co_sensor_battery_type', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'AA', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_reboot_count-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -9820,7 +10856,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_reboot_count', + 'entity_id': 'sensor.smart_co_sensor_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9828,36 +10864,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_reboot_count-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'ALPSTUGA air quality monitor Reboot count', - 'state_class': , + 'device_class': 'voltage', + 'friendly_name': 'Smart CO sensor Battery voltage', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_reboot_count', + 'entity_id': 'sensor.smart_co_sensor_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '4', + 'state': '3.0', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_temperature-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_carbon_monoxide-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9873,7 +10917,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.alpstuga_air_quality_monitor_temperature', + 'entity_id': 'sensor.smart_co_sensor_carbon_monoxide', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9881,47 +10925,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Carbon monoxide', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Carbon monoxide', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-CarbonMonoxideSensor-1036-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_temperature-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_carbon_monoxide-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'ALPSTUGA air quality monitor Temperature', + 'device_class': 'carbon_monoxide', + 'friendly_name': 'Smart CO sensor Carbon monoxide', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_temperature', + 'entity_id': 'sensor.smart_co_sensor_carbon_monoxide', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '19.71', + 'state': '0.0', }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_uptime-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -9929,7 +10972,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_uptime', + 'entity_id': 'sensor.smart_co_sensor_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9937,44 +10980,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_uptime-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'ALPSTUGA air quality monitor Uptime', + 'friendly_name': 'Smart CO sensor Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.alpstuga_air_quality_monitor_uptime', + 'entity_id': 'sensor.smart_co_sensor_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T01:26:39+00:00', + 'state': '1', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -9982,7 +11023,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_battery', + 'entity_id': 'sensor.smart_co_sensor_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9990,38 +11031,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'BILRESA dual button Battery', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Smart CO sensor Thread channel', }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_battery', + 'entity_id': 'sensor.smart_co_sensor_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '76', + 'state': '20', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_type-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10035,7 +11073,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_battery_type', + 'entity_id': 'sensor.smart_co_sensor_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10043,42 +11081,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSourceBatReplacementDescription-47-19', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_type-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA dual button Battery type', + 'friendly_name': 'Smart CO sensor Thread network name', }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_battery_type', + 'entity_id': 'sensor.smart_co_sensor_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'AAA', + 'state': 'OpenThread-da2f', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_voltage-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -10087,7 +11134,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_battery_voltage', + 'entity_id': 'sensor.smart_co_sensor_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10095,44 +11142,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_voltage-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'BILRESA dual button Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Smart CO sensor Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_battery_voltage', + 'entity_id': 'sensor.smart_co_sensor_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.82', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_1-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_time_remaining-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10148,7 +11197,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_1', + 'entity_id': 'sensor.smart_co_sensor_time_remaining', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10156,44 +11205,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (1)', + 'object_id_base': 'Time remaining', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (1)', + 'original_name': 'Time remaining', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-1-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_time_remaining', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', + 'unit_of_measurement': , }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_1-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_time_remaining-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA dual button Current switch position (1)', + 'device_class': 'duration', + 'friendly_name': 'Smart CO sensor Time remaining', 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_1', + 'entity_id': 'sensor.smart_co_sensor_time_remaining', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '0.0', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_2-entry] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -10201,7 +11256,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_2', + 'entity_id': 'sensor.smart_co_sensor_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10209,43 +11264,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (2)', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (2)', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-2-SwitchCurrentPosition-59-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000006-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_2-state] +# name: test_sensors[heiman_co_sensor][sensor.smart_co_sensor_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA dual button Current switch position (2)', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Smart CO sensor Uptime', }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_2', + 'entity_id': 'sensor.smart_co_sensor_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2025-01-01T13:57:22+00:00', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_reboot_count-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -10254,7 +11309,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_reboot_count', + 'entity_id': 'sensor.smart_motion_sensor_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10262,36 +11317,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_reboot_count-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA dual button Reboot count', - 'state_class': , + 'device_class': 'battery', + 'friendly_name': 'Smart motion sensor Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_reboot_count', + 'entity_id': 'sensor.smart_motion_sensor_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '100', }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_uptime-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_type-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10305,7 +11362,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_dual_button_uptime', + 'entity_id': 'sensor.smart_motion_sensor_battery_type', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10313,36 +11370,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Battery type', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Battery type', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_uptime-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_type-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'BILRESA dual button Uptime', + 'friendly_name': 'Smart motion sensor Battery type', }), 'context': , - 'entity_id': 'sensor.bilresa_dual_button_uptime', + 'entity_id': 'sensor.smart_motion_sensor_battery_type', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:10+00:00', + 'state': 'CR2', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10358,7 +11414,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery', + 'entity_id': 'sensor.smart_motion_sensor_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10366,52 +11422,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSource-47-12', - 'unit_of_measurement': '%', + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'BILRESA scroll wheel Battery', + 'device_class': 'voltage', + 'friendly_name': 'Smart motion sensor Battery voltage', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery', + 'entity_id': 'sensor.smart_motion_sensor_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '42', + 'state': '3.0', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_type-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_illuminance-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery_type', + 'entity_category': None, + 'entity_id': 'sensor.smart_motion_sensor_illuminance', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10419,42 +11483,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery type', + 'object_id_base': 'Illuminance', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery type', + 'original_name': 'Illuminance', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_replacement_description', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSourceBatReplacementDescription-47-19', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-2-LightSensor-1024-0', + 'unit_of_measurement': 'lx', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_type-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_illuminance-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Battery type', + 'device_class': 'illuminance', + 'friendly_name': 'Smart motion sensor Illuminance', + 'state_class': , + 'unit_of_measurement': 'lx', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery_type', + 'entity_id': 'sensor.smart_motion_sensor_illuminance', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'AAA', + 'state': '105.0', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_voltage-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -10463,7 +11530,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery_voltage', + 'entity_id': 'sensor.smart_motion_sensor_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10471,52 +11538,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_voltage-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'BILRESA scroll wheel Battery voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Smart motion sensor Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_battery_voltage', + 'entity_id': 'sensor.smart_motion_sensor_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.57', + 'state': '28', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_1-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -10524,7 +11581,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_1', + 'entity_id': 'sensor.smart_motion_sensor_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10532,44 +11589,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (1)', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (1)', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-1-SwitchCurrentPosition-59-1', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_1-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (1)', - 'state_class': , + 'friendly_name': 'Smart motion sensor Thread channel', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_1', + 'entity_id': 'sensor.smart_motion_sensor_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '25', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_2-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -10577,7 +11631,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_2', + 'entity_id': 'sensor.smart_motion_sensor_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10585,43 +11639,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (2)', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (2)', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-2-SwitchCurrentPosition-59-1', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_2-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (2)', - 'state_class': , + 'friendly_name': 'Smart motion sensor Thread network name', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_2', + 'entity_id': 'sensor.smart_motion_sensor_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'MyHome1632128124', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_3-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -10630,7 +11692,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_3', + 'entity_id': 'sensor.smart_motion_sensor_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10638,36 +11700,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (3)', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (3)', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-3-SwitchCurrentPosition-59-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_3-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (3)', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Smart motion sensor Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_3', + 'entity_id': 'sensor.smart_motion_sensor_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_4-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_time_remaining-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10683,7 +11755,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_4', + 'entity_id': 'sensor.smart_motion_sensor_time_remaining', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10691,44 +11763,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (4)', + 'object_id_base': 'Time remaining', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (4)', + 'original_name': 'Time remaining', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-4-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_time_remaining', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', + 'unit_of_measurement': , }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_4-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_time_remaining-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (4)', + 'device_class': 'duration', + 'friendly_name': 'Smart motion sensor Time remaining', 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_4', + 'entity_id': 'sensor.smart_motion_sensor_time_remaining', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '0.0', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_5-entry] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -10736,7 +11814,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_5', + 'entity_id': 'sensor.smart_motion_sensor_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10744,36 +11822,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (5)', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (5)', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-5-SwitchCurrentPosition-59-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000058-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_5-state] +# name: test_sensors[heiman_motion_sensor_m1][sensor.smart_motion_sensor_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (5)', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Smart motion sensor Uptime', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_5', + 'entity_id': 'sensor.smart_motion_sensor_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2025-01-01T13:59:53+00:00', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_6-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10789,7 +11867,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_6', + 'entity_id': 'sensor.smoke_sensor_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10797,44 +11875,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (6)', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (6)', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-6-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, - }) + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSource-47-12', + 'unit_of_measurement': '%', + }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_6-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (6)', + 'device_class': 'battery', + 'friendly_name': 'Smoke sensor Battery', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_6', + 'entity_id': 'sensor.smoke_sensor_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '94', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_7-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_type-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -10842,7 +11920,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_7', + 'entity_id': 'sensor.smoke_sensor_battery_type', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10850,36 +11928,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (7)', + 'object_id_base': 'Battery type', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (7)', + 'original_name': 'Battery type', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-7-SwitchCurrentPosition-59-1', + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSourceBatReplacementDescription-47-19', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_7-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_type-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (7)', - 'state_class': , + 'friendly_name': 'Smoke sensor Battery type', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_7', + 'entity_id': 'sensor.smoke_sensor_battery_type', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'CR123A', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_8-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10895,7 +11972,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_8', + 'entity_id': 'sensor.smoke_sensor_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10903,43 +11980,59 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (8)', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (8)', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-8-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_8-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (8)', + 'device_class': 'voltage', + 'friendly_name': 'Smoke sensor Battery voltage', 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_8', + 'entity_id': 'sensor.smoke_sensor_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '0.0', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_9-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -10948,7 +12041,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_9', + 'entity_id': 'sensor.smoke_sensor_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10956,36 +12049,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (9)', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (9)', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-9-SwitchCurrentPosition-59-1', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_9-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Current switch position (9)', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Smoke sensor Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_9', + 'entity_id': 'sensor.smoke_sensor_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'unspecified', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_reboot_count-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11001,7 +12103,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_reboot_count', + 'entity_id': 'sensor.smoke_sensor_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11020,25 +12122,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_reboot_count-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'BILRESA scroll wheel Reboot count', + 'friendly_name': 'Smoke sensor Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_reboot_count', + 'entity_id': 'sensor.smoke_sensor_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3', + 'state': '1', }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_uptime-entry] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11052,7 +12154,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.bilresa_scroll_wheel_uptime', + 'entity_id': 'sensor.smoke_sensor_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11071,32 +12173,39 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000000B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_uptime-state] +# name: test_sensors[heiman_smoke_detector][sensor.smoke_sensor_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'BILRESA scroll wheel Uptime', + 'friendly_name': 'Smoke sensor Uptime', }), 'context': , - 'entity_id': 'sensor.bilresa_scroll_wheel_uptime', + 'entity_id': 'sensor.smoke_sensor_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:06+00:00', + 'state': '2024-12-29T17:17:40+00:00', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_active_current-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_air_quality-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'extremely_poor', + 'very_poor', + 'poor', + 'fair', + 'good', + 'moderate', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -11104,8 +12213,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_active_current', + 'entity_category': None, + 'entity_id': 'sensor.alpstuga_air_quality_monitor_air_quality', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11113,44 +12222,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'Air quality', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'Air quality', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'air_quality', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-AirQuality-91-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_active_current-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_air_quality-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'White Series OnOff Switch Active current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'ALPSTUGA air quality monitor Air quality', + 'options': list([ + 'extremely_poor', + 'very_poor', + 'poor', + 'fair', + 'good', + 'moderate', + ]), }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_active_current', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_air_quality', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'good', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_boot_reason-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11174,7 +12283,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_boot_reason', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11193,15 +12302,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_boot_reason-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'White Series OnOff Switch Boot reason', + 'friendly_name': 'ALPSTUGA air quality monitor Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -11213,14 +12322,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_boot_reason', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'power_on_reboot', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_config-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_carbon_dioxide-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11235,8 +12344,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_config', + 'entity_category': None, + 'entity_id': 'sensor.alpstuga_air_quality_monitor_carbon_dioxide', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11244,36 +12353,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Config)', + 'object_id_base': 'Carbon dioxide', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (Config)', + 'original_name': 'Carbon dioxide', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-5-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-CarbonDioxideSensor-1037-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_config-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_carbon_dioxide-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'White Series OnOff Switch Current switch position (Config)', + 'device_class': 'carbon_dioxide', + 'friendly_name': 'ALPSTUGA air quality monitor Carbon dioxide', 'state_class': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_config', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_carbon_dioxide', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '394.0', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_down-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11288,8 +12399,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_down', + 'entity_category': None, + 'entity_id': 'sensor.alpstuga_air_quality_monitor_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11297,36 +12408,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Down)', + 'object_id_base': 'Humidity', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (Down)', + 'original_name': 'Humidity', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-4-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-HumiditySensor-1029-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_down-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'White Series OnOff Switch Current switch position (Down)', + 'device_class': 'humidity', + 'friendly_name': 'ALPSTUGA air quality monitor Humidity', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_down', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '46.21', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_up-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_pm2_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11341,8 +12454,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_up', + 'entity_category': None, + 'entity_id': 'sensor.alpstuga_air_quality_monitor_pm2_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11350,36 +12463,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Up)', + 'object_id_base': 'PM2.5', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (Up)', + 'original_name': 'PM2.5', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-3-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-PM25Sensor-1066-0', + 'unit_of_measurement': 'μg/m³', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_up-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_pm2_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'White Series OnOff Switch Current switch position (Up)', + 'device_class': 'pm25', + 'friendly_name': 'ALPSTUGA air quality monitor PM2.5', 'state_class': , + 'unit_of_measurement': 'μg/m³', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_up', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_pm2_5', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '0.0', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_energy-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11394,8 +12509,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.white_series_onoff_switch_energy', + 'entity_category': , + 'entity_id': 'sensor.alpstuga_air_quality_monitor_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11403,44 +12518,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_energy-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'White Series OnOff Switch Energy', + 'friendly_name': 'ALPSTUGA air quality monitor Reboot count', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_energy', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '13.13919', + 'state': '4', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_humidity-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11456,7 +12563,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.white_series_onoff_switch_humidity', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11464,54 +12571,55 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Humidity', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-8-HumiditySensor-1029-0', - 'unit_of_measurement': '%', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-1-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_humidity-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'White Series OnOff Switch Humidity', + 'device_class': 'temperature', + 'friendly_name': 'ALPSTUGA air quality monitor Temperature', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_humidity', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '62.92', + 'state': '19.71', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_power-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.white_series_onoff_switch_power', + 'entity_category': , + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11519,52 +12627,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_power-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'White Series OnOff Switch Power', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'ALPSTUGA air quality monitor Thread channel', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_power', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '25', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_reboot_count-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -11572,7 +12669,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_reboot_count', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11580,43 +12677,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_reboot_count-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'White Series OnOff Switch Reboot count', - 'state_class': , + 'friendly_name': 'ALPSTUGA air quality monitor Thread network name', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_reboot_count', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3', + 'state': 'Thread Beverage', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_temperature-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -11624,8 +12729,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.white_series_onoff_switch_temperature', + 'entity_category': , + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11633,41 +12738,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-9-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_temperature-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'White Series OnOff Switch Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'ALPSTUGA air quality monitor Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_temperature', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '21.83', + 'state': 'router', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_uptime-entry] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11681,7 +12791,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_uptime', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11700,25 +12810,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000025-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_uptime-state] +# name: test_sensors[ikea_air_quality_monitor][sensor.alpstuga_air_quality_monitor_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'White Series OnOff Switch Uptime', + 'friendly_name': 'ALPSTUGA air quality monitor Uptime', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_uptime', + 'entity_id': 'sensor.alpstuga_air_quality_monitor_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-11T21:15:20+00:00', + 'state': '2025-01-01T01:26:39+00:00', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_voltage-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11734,7 +12844,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.white_series_onoff_switch_voltage', + 'entity_id': 'sensor.bilresa_dual_button_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11742,60 +12852,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Battery', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'voltage', - 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementVoltage-144-4', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_voltage-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'White Series OnOff Switch Voltage', + 'device_class': 'battery', + 'friendly_name': 'BILRESA dual button Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.white_series_onoff_switch_voltage', + 'entity_id': 'sensor.bilresa_dual_button_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '124.643', + 'state': '76', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_boot_reason-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_type-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -11803,7 +12897,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_boot_reason', + 'entity_id': 'sensor.bilresa_dual_button_battery_type', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11811,45 +12905,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Battery type', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Battery type', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSourceBatReplacementDescription-47-19', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_boot_reason-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_type-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Inovelli Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'BILRESA dual button Battery type', }), 'context': , - 'entity_id': 'sensor.inovelli_boot_reason', + 'entity_id': 'sensor.bilresa_dual_button_battery_type', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': 'AAA', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_config-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11865,7 +12949,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_current_switch_position_config', + 'entity_id': 'sensor.bilresa_dual_button_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11873,36 +12957,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Config)', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (Config)', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-5-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_config-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Inovelli Current switch position (Config)', + 'device_class': 'voltage', + 'friendly_name': 'BILRESA dual button Battery voltage', 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.inovelli_current_switch_position_config', + 'entity_id': 'sensor.bilresa_dual_button_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2.82', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_down-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11918,7 +13010,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_current_switch_position_down', + 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11926,36 +13018,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Down)', + 'object_id_base': 'Current switch position (1)', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (Down)', + 'original_name': 'Current switch position (1)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-4-SwitchCurrentPosition-59-1', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-1-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_down-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Inovelli Current switch position (Down)', + 'friendly_name': 'BILRESA dual button Current switch position (1)', 'state_class': , }), 'context': , - 'entity_id': 'sensor.inovelli_current_switch_position_down', + 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_1', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '0', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_up-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11971,7 +13063,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_current_switch_position_up', + 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11979,36 +13071,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Up)', + 'object_id_base': 'Current switch position (2)', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (Up)', + 'original_name': 'Current switch position (2)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-3-SwitchCurrentPosition-59-1', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-2-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_up-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_current_switch_position_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Inovelli Current switch position (Up)', + 'friendly_name': 'BILRESA dual button Current switch position (2)', 'state_class': , }), 'context': , - 'entity_id': 'sensor.inovelli_current_switch_position_up', + 'entity_id': 'sensor.bilresa_dual_button_current_switch_position_2', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '0', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_reboot_count-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12024,7 +13116,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_reboot_count', + 'entity_id': 'sensor.bilresa_dual_button_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12043,25 +13135,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_reboot_count-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Inovelli Reboot count', + 'friendly_name': 'BILRESA dual button Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.inovelli_reboot_count', + 'entity_id': 'sensor.bilresa_dual_button_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '102', + 'state': '1', }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_uptime-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12075,7 +13167,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.inovelli_uptime', + 'entity_id': 'sensor.bilresa_dual_button_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12083,52 +13175,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[inovelli_vtm31][sensor.inovelli_uptime-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Inovelli Uptime', + 'friendly_name': 'BILRESA dual button Thread channel', }), 'context': , - 'entity_id': 'sensor.inovelli_uptime', + 'entity_id': 'sensor.bilresa_dual_button_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-20T04:52:48+00:00', + 'state': '25', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_boot_reason-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -12136,7 +13217,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_hvac_boot_reason', + 'entity_id': 'sensor.bilresa_dual_button_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12144,52 +13225,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_boot_reason-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Longan link HVAC Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'BILRESA dual button Thread network name', }), 'context': , - 'entity_id': 'sensor.longan_link_hvac_boot_reason', + 'entity_id': 'sensor.bilresa_dual_button_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': 'MyHome', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_outdoor_temperature-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -12197,8 +13277,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.longan_link_hvac_outdoor_temperature', + 'entity_category': , + 'entity_id': 'sensor.bilresa_dual_button_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12206,49 +13286,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Outdoor temperature', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Outdoor temperature', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'outdoor_temperature', - 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-1-ThermostatOutdoorTemperature-513-1', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_outdoor_temperature-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Longan link HVAC Outdoor temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'BILRESA dual button Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.longan_link_hvac_outdoor_temperature', + 'entity_id': 'sensor.bilresa_dual_button_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '12.5', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_reboot_count-entry] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -12256,7 +13339,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_hvac_reboot_count', + 'entity_id': 'sensor.bilresa_dual_button_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12264,36 +13347,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000089-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_reboot_count-state] +# name: test_sensors[ikea_bilresa_dual_button][sensor.bilresa_dual_button_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Longan link HVAC Reboot count', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'BILRESA dual button Uptime', }), 'context': , - 'entity_id': 'sensor.longan_link_hvac_reboot_count', + 'entity_id': 'sensor.bilresa_dual_button_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '4', + 'state': '2025-01-01T13:59:10+00:00', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_temperature-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12308,8 +13391,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.longan_link_hvac_temperature', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12317,41 +13400,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Battery', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_temperature-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Longan link HVAC Temperature', + 'device_class': 'battery', + 'friendly_name': 'BILRESA scroll wheel Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.longan_link_hvac_temperature', + 'entity_id': 'sensor.bilresa_scroll_wheel_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '28.3', + 'state': '42', }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_uptime-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_type-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12365,7 +13445,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_hvac_uptime', + 'entity_id': 'sensor.bilresa_scroll_wheel_battery_type', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12373,36 +13453,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Battery type', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Battery type', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'battery_replacement_description', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSourceBatReplacementDescription-47-19', 'unit_of_measurement': None, }) # --- -# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_uptime-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_type-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Longan link HVAC Uptime', + 'friendly_name': 'BILRESA scroll wheel Battery type', }), 'context': , - 'entity_id': 'sensor.longan_link_hvac_uptime', + 'entity_id': 'sensor.bilresa_scroll_wheel_battery_type', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:30+00:00', + 'state': 'AAA', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_activated_carbon_filter_condition-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12417,8 +13496,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_activated_carbon_filter_condition', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12426,51 +13505,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Activated carbon filter condition', + 'object_id_base': 'Battery voltage', 'options': dict({ - }), - 'original_device_class': None, + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , 'original_icon': None, - 'original_name': 'Activated carbon filter condition', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'activated_carbon_filter_condition', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-1-ActivatedCarbonFilterCondition-114-0', - 'unit_of_measurement': '%', + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_activated_carbon_filter_condition-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Air Purifier Activated carbon filter condition', + 'device_class': 'voltage', + 'friendly_name': 'BILRESA scroll wheel Battery voltage', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_activated_carbon_filter_condition', + 'entity_id': 'sensor.bilresa_scroll_wheel_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '2.57', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_air_quality-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'extremely_poor', - 'very_poor', - 'poor', - 'fair', - 'good', - 'moderate', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -12478,8 +13557,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_air_quality', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12487,59 +13566,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Air quality', + 'object_id_base': 'Current switch position (1)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Air quality', + 'original_name': 'Current switch position (1)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'air_quality', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-AirQuality-91-0', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-1-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_air_quality-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Air Purifier Air quality', - 'options': list([ - 'extremely_poor', - 'very_poor', - 'poor', - 'fair', - 'good', - 'moderate', - ]), + 'friendly_name': 'BILRESA scroll wheel Current switch position (1)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_air_quality', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'good', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_boot_reason-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -12548,7 +13611,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_air_purifier_boot_reason', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12556,45 +13619,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Current switch position (2)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Current switch position (2)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-2-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_boot_reason-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Air Purifier Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'BILRESA scroll wheel Current switch position (2)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_boot_reason', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_dioxide-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_3-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12609,8 +13663,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_carbon_dioxide', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_3', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12618,38 +13672,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Carbon dioxide', + 'object_id_base': 'Current switch position (3)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Carbon dioxide', + 'original_name': 'Current switch position (3)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-CarbonDioxideSensor-1037-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-3-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_dioxide-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_3-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'carbon_dioxide', - 'friendly_name': 'Mock Air Purifier Carbon dioxide', + 'friendly_name': 'BILRESA scroll wheel Current switch position (3)', 'state_class': , - 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_carbon_dioxide', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_3', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_monoxide-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_4-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12664,8 +13716,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_carbon_monoxide', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_4', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12673,38 +13725,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Carbon monoxide', + 'object_id_base': 'Current switch position (4)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Carbon monoxide', + 'original_name': 'Current switch position (4)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-CarbonMonoxideSensor-1036-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-4-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_monoxide-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_4-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'carbon_monoxide', - 'friendly_name': 'Mock Air Purifier Carbon monoxide', + 'friendly_name': 'BILRESA scroll wheel Current switch position (4)', 'state_class': , - 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_carbon_monoxide', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_4', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_hepa_filter_condition-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12719,8 +13769,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_hepa_filter_condition', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12728,37 +13778,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'HEPA filter condition', + 'object_id_base': 'Current switch position (5)', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'HEPA filter condition', + 'original_name': 'Current switch position (5)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hepa_filter_condition', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-1-HepaFilterCondition-113-0', - 'unit_of_measurement': '%', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-5-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_hepa_filter_condition-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Air Purifier HEPA filter condition', + 'friendly_name': 'BILRESA scroll wheel Current switch position (5)', 'state_class': , - 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_hepa_filter_condition', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_5', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_humidity-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_6-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12773,8 +13822,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_humidity', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_6', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12782,38 +13831,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Humidity', + 'object_id_base': 'Current switch position (6)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Current switch position (6)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-4-HumiditySensor-1029-0', - 'unit_of_measurement': '%', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-6-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_humidity-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_6-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'Mock Air Purifier Humidity', + 'friendly_name': 'BILRESA scroll wheel Current switch position (6)', 'state_class': , - 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_humidity', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_6', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '50.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_nitrogen_dioxide-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_7-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12828,8 +13875,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_nitrogen_dioxide', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_7', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12837,38 +13884,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Nitrogen dioxide', + 'object_id_base': 'Current switch position (7)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Nitrogen dioxide', + 'original_name': 'Current switch position (7)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-NitrogenDioxideSensor-1043-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-7-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_nitrogen_dioxide-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_7-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'nitrogen_dioxide', - 'friendly_name': 'Mock Air Purifier Nitrogen dioxide', + 'friendly_name': 'BILRESA scroll wheel Current switch position (7)', 'state_class': , - 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_nitrogen_dioxide', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_7', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_ozone-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_8-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12883,47 +13928,45 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_ozone', - 'has_entity_name': True, + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_8', + 'has_entity_name': True, 'hidden_by': None, 'icon': None, 'id': , 'labels': set({ }), 'name': None, - 'object_id_base': 'Ozone', + 'object_id_base': 'Current switch position (8)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Ozone', + 'original_name': 'Current switch position (8)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-OzoneConcentrationSensor-1045-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-8-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_ozone-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_8-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'ozone', - 'friendly_name': 'Mock Air Purifier Ozone', + 'friendly_name': 'BILRESA scroll wheel Current switch position (8)', 'state_class': , - 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_ozone', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_8', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm1-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_9-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12938,8 +13981,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_pm1', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_9', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12947,45 +13990,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'PM1', + 'object_id_base': 'Current switch position (9)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'PM1', + 'original_name': 'Current switch position (9)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM1Sensor-1068-0', - 'unit_of_measurement': 'μg/m³', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-9-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm1-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_current_switch_position_9-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pm1', - 'friendly_name': 'Mock Air Purifier PM1', + 'friendly_name': 'BILRESA scroll wheel Current switch position (9)', 'state_class': , - 'unit_of_measurement': 'μg/m³', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_pm1', + 'entity_id': 'sensor.bilresa_scroll_wheel_current_switch_position_9', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm10-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -12993,8 +14034,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_pm10', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13002,54 +14043,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'PM10', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'PM10', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM10Sensor-1069-0', - 'unit_of_measurement': 'μg/m³', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm10-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pm10', - 'friendly_name': 'Mock Air Purifier PM10', - 'state_class': , - 'unit_of_measurement': 'μg/m³', + 'friendly_name': 'BILRESA scroll wheel Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_pm10', + 'entity_id': 'sensor.bilresa_scroll_wheel_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '3', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm2_5-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_pm2_5', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13057,54 +14094,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'PM2.5', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'PM2.5', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM25Sensor-1066-0', - 'unit_of_measurement': 'μg/m³', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm2_5-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pm25', - 'friendly_name': 'Mock Air Purifier PM2.5', - 'state_class': , - 'unit_of_measurement': 'μg/m³', + 'friendly_name': 'BILRESA scroll wheel Thread channel', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_pm2_5', + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '15', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_radon_concentration-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_radon_concentration', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13112,44 +14144,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Radon concentration', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Radon concentration', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'radon_concentration', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-RadonSensor-1071-0', - 'unit_of_measurement': 'Bq/m³', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_radon_concentration-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Air Purifier Radon concentration', - 'state_class': , - 'unit_of_measurement': 'Bq/m³', + 'friendly_name': 'BILRESA scroll wheel Thread network name', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_radon_concentration', + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': 'NanoleafThread78', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_reboot_count-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -13158,7 +14197,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_air_purifier_reboot_count', + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13166,52 +14205,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_reboot_count-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Air Purifier Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'BILRESA scroll wheel Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_reboot_count', + 'entity_id': 'sensor.bilresa_scroll_wheel_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature-entry] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_temperature', + 'entity_category': , + 'entity_id': 'sensor.bilresa_scroll_wheel_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13219,41 +14266,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-3-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000002-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature-state] +# name: test_sensors[ikea_scroll_wheel][sensor.bilresa_scroll_wheel_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Air Purifier Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'BILRESA scroll wheel Uptime', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_temperature', + 'entity_id': 'sensor.bilresa_scroll_wheel_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '20.0', + 'state': '2025-01-01T13:59:06+00:00', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature_2-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_active_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13268,8 +14310,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_temperature_2', + 'entity_category': , + 'entity_id': 'sensor.white_series_onoff_switch_active_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13277,41 +14319,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Active current', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 1, + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Active current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-5-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature_2-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_active_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Air Purifier Temperature', + 'device_class': 'current', + 'friendly_name': 'White Series OnOff Switch Active current', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_temperature_2', + 'entity_id': 'sensor.white_series_onoff_switch_active_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '20.0', + 'state': '0.0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_tvoc_level-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13319,10 +14364,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'low', - 'medium', - 'high', - 'critical', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -13331,8 +14379,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_tvoc_level', + 'entity_category': , + 'entity_id': 'sensor.white_series_onoff_switch_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13340,48 +14388,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'TVOC level', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'TVOC level', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'tvoc_level', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-TotalVolatileOrganicCompoundsSensorLevel-1070-10', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_tvoc_level-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Air Purifier TVOC level', + 'friendly_name': 'White Series OnOff Switch Boot reason', 'options': list([ - 'low', - 'medium', - 'high', - 'critical', - ]), + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_tvoc_level', + 'entity_id': 'sensor.white_series_onoff_switch_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'low', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_uptime-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_config-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -13389,7 +14442,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_air_purifier_uptime', + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_config', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13397,36 +14450,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Current switch position (Config)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Current switch position (Config)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-5-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_uptime-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_config-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Air Purifier Uptime', + 'friendly_name': 'White Series OnOff Switch Current switch position (Config)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_uptime', + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_config', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:38+00:00', + 'state': '0', }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_volatile_organic_compounds_parts-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_down-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13441,8 +14494,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_air_purifier_volatile_organic_compounds_parts', + 'entity_category': , + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_down', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13450,38 +14503,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Volatile organic compounds parts', + 'object_id_base': 'Current switch position (Down)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Volatile organic compounds parts', + 'original_name': 'Current switch position (Down)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-TotalVolatileOrganicCompoundsSensor-1070-0', - 'unit_of_measurement': 'ppm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-4-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_volatile_organic_compounds_parts-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_down-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'volatile_organic_compounds_parts', - 'friendly_name': 'Mock Air Purifier Volatile organic compounds parts', + 'friendly_name': 'White Series OnOff Switch Current switch position (Down)', 'state_class': , - 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_air_purifier_volatile_organic_compounds_parts', + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_down', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_active_current-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_up-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13497,7 +14548,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_active_current', + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_up', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13505,57 +14556,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'Current switch position (Up)', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'Current switch position (Up)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-3-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_active_current-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_current_switch_position_up-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Mock Battery Storage Active current', + 'friendly_name': 'White Series OnOff Switch Current switch position (Up)', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_active_current', + 'entity_id': 'sensor.white_series_onoff_switch_current_switch_position_up', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '0', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_appliance_energy_state-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'offline', - 'online', - 'fault', - 'power_adjust_active', - 'paused', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -13563,8 +14600,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_appliance_energy_state', + 'entity_category': None, + 'entity_id': 'sensor.white_series_onoff_switch_energy', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13572,43 +14609,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Appliance energy state', + 'object_id_base': 'Energy', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Appliance energy state', + 'original_name': 'Energy', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'esa_state', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ESAState-152-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_appliance_energy_state-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_energy-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Battery Storage Appliance energy state', - 'options': list([ - 'offline', - 'online', - 'fault', - 'power_adjust_active', - 'paused', - ]), + 'device_class': 'energy', + 'friendly_name': 'White Series OnOff Switch Energy', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_appliance_energy_state', + 'entity_id': 'sensor.white_series_onoff_switch_energy', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'online', + 'state': '13.13919', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13623,8 +14661,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_battery', + 'entity_category': None, + 'entity_id': 'sensor.white_series_onoff_switch_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13632,38 +14670,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Humidity', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Humidity', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSource-47-12', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-8-HumiditySensor-1029-0', 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Mock Battery Storage Battery', + 'device_class': 'humidity', + 'friendly_name': 'White Series OnOff Switch Humidity', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_battery', + 'entity_id': 'sensor.white_series_onoff_switch_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '90', + 'state': '62.92', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_voltage-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13678,8 +14716,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_battery_voltage', + 'entity_category': None, + 'entity_id': 'sensor.white_series_onoff_switch_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13687,56 +14725,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery voltage', + 'object_id_base': 'Power', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery voltage', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_voltage', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_voltage-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Mock Battery Storage Battery voltage', + 'device_class': 'power', + 'friendly_name': 'White Series OnOff Switch Power', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_battery_voltage', + 'entity_id': 'sensor.white_series_onoff_switch_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '48.0', + 'state': '0.0', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_energy_optimization_opt_out-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'no_opt_out', - 'local_opt_out', - 'grid_opt_out', - 'opt_out', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -13745,7 +14778,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_energy_optimization_opt_out', + 'entity_id': 'sensor.white_series_onoff_switch_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13753,42 +14786,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy optimization opt-out', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy optimization opt-out', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'esa_opt_out_state', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ESAOptOutState-152-7', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_energy_optimization_opt_out-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Battery Storage Energy optimization opt-out', - 'options': list([ - 'no_opt_out', - 'local_opt_out', - 'grid_opt_out', - 'opt_out', - ]), + 'friendly_name': 'White Series OnOff Switch Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_energy_optimization_opt_out', + 'entity_id': 'sensor.white_series_onoff_switch_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_opt_out', + 'state': '3', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_power-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13804,7 +14831,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_battery_storage_power', + 'entity_id': 'sensor.white_series_onoff_switch_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13812,52 +14839,47 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Temperature', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-9-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_power-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'Mock Battery Storage Power', + 'device_class': 'temperature', + 'friendly_name': 'White Series OnOff Switch Temperature', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_power', + 'entity_id': 'sensor.white_series_onoff_switch_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '21.83', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_reboot_count-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -13865,7 +14887,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_reboot_count', + 'entity_id': 'sensor.white_series_onoff_switch_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13873,44 +14895,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_reboot_count-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Battery Storage Reboot count', - 'state_class': , + 'friendly_name': 'White Series OnOff Switch Thread channel', }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_reboot_count', + 'entity_id': 'sensor.white_series_onoff_switch_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '25', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_remaining-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -13918,7 +14937,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_time_remaining', + 'entity_id': 'sensor.white_series_onoff_switch_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13926,51 +14945,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Time remaining', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Time remaining', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_time_remaining', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_remaining-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'duration', - 'friendly_name': 'Mock Battery Storage Time remaining', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'White Series OnOff Switch Thread network name', }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_time_remaining', + 'entity_id': 'sensor.white_series_onoff_switch_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '120.0', + 'state': 'MyHome*****', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_to_full_charge-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -13979,7 +14998,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_time_to_full_charge', + 'entity_id': 'sensor.white_series_onoff_switch_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13987,44 +15006,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Time to full charge', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Time to full charge', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_time_to_full_charge', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatTimeToFullCharge-47-27', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_to_full_charge-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'duration', - 'friendly_name': 'Mock Battery Storage Time to full charge', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'White Series OnOff Switch Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_time_to_full_charge', + 'entity_id': 'sensor.white_series_onoff_switch_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '30.0', + 'state': 'router', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_uptime-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14038,7 +15059,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_uptime', + 'entity_id': 'sensor.white_series_onoff_switch_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14057,25 +15078,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_uptime-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Battery Storage Uptime', + 'friendly_name': 'White Series OnOff Switch Uptime', }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_uptime', + 'entity_id': 'sensor.white_series_onoff_switch_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:55:55+00:00', + 'state': '2024-12-11T21:15:20+00:00', }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_voltage-entry] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14091,7 +15112,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_battery_storage_voltage', + 'entity_id': 'sensor.white_series_onoff_switch_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14116,27 +15137,27 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'voltage', - 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', + 'unique_id': '00000000000004D2-0000000000000100-MatterNodeDevice-7-ElectricalPowerMeasurementVoltage-144-4', 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_voltage-state] +# name: test_sensors[inovelli_vtm30][sensor.white_series_onoff_switch_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'voltage', - 'friendly_name': 'Mock Battery Storage Voltage', + 'friendly_name': 'White Series OnOff Switch Voltage', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_battery_storage_voltage', + 'entity_id': 'sensor.white_series_onoff_switch_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '124.643', }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_boot_reason-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14160,7 +15181,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_cooktop_boot_reason', + 'entity_id': 'sensor.inovelli_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14179,15 +15200,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_boot_reason-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Cooktop Boot reason', + 'friendly_name': 'Inovelli Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -14199,21 +15220,21 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_cooktop_boot_reason', + 'entity_id': 'sensor.inovelli_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'unspecified', }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_reboot_count-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_config-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -14222,7 +15243,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_cooktop_reboot_count', + 'entity_id': 'sensor.inovelli_current_switch_position_config', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14230,36 +15251,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Current switch position (Config)', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Current switch position (Config)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-5-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_reboot_count-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_config-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Cooktop Reboot count', - 'state_class': , + 'friendly_name': 'Inovelli Current switch position (Config)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_cooktop_reboot_count', + 'entity_id': 'sensor.inovelli_current_switch_position_config', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '0', }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_temperature-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_down-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14274,8 +15295,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_cooktop_temperature', + 'entity_category': , + 'entity_id': 'sensor.inovelli_current_switch_position_down', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14283,47 +15304,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Current switch position (Down)', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Current switch position (Down)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-2-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-4-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_temperature-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_down-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Cooktop Temperature', + 'friendly_name': 'Inovelli Current switch position (Down)', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_cooktop_temperature', + 'entity_id': 'sensor.inovelli_current_switch_position_down', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '180.0', + 'state': '0', }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_uptime-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_up-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -14331,7 +15349,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_cooktop_uptime', + 'entity_id': 'sensor.inovelli_current_switch_position_up', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14339,51 +15357,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Current switch position (Up)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Current switch position (Up)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-3-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_cooktop][sensor.mock_cooktop_uptime-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_current_switch_position_up-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Cooktop Uptime', + 'friendly_name': 'Inovelli Current switch position (Up)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_cooktop_uptime', + 'entity_id': 'sensor.inovelli_current_switch_position_up', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:37+00:00', + 'state': '0', }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_boot_reason-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -14392,7 +15402,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_dimmable_light_boot_reason', + 'entity_id': 'sensor.inovelli_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14400,53 +15410,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_boot_reason-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Dimmable Light Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Inovelli Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_dimmable_light_boot_reason', + 'entity_id': 'sensor.inovelli_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': '102', }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_reboot_count-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -14454,7 +15453,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_dimmable_light_reboot_count', + 'entity_id': 'sensor.inovelli_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14462,36 +15461,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread channel', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_reboot_count-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Dimmable Light Reboot count', - 'state_class': , + 'friendly_name': 'Inovelli Thread channel', }), 'context': , - 'entity_id': 'sensor.mock_dimmable_light_reboot_count', + 'entity_id': 'sensor.inovelli_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '25', }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_uptime-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14505,7 +15503,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_dimmable_light_uptime', + 'entity_id': 'sensor.inovelli_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14513,36 +15511,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_uptime-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Dimmable Light Uptime', + 'friendly_name': 'Inovelli Thread network name', }), 'context': , - 'entity_id': 'sensor.mock_dimmable_light_uptime', + 'entity_id': 'sensor.inovelli_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T05:18:41+00:00', + 'state': 'MyHome442262884', }) # --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_boot_reason-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14551,12 +15548,13 @@ 'capabilities': dict({ 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'config_entry_id': , @@ -14566,7 +15564,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dimmable_plugin_unit_boot_reason', + 'entity_id': 'sensor.inovelli_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14574,98 +15572,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread routing role', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_boot_reason-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Dimmable Plugin Unit Boot reason', + 'friendly_name': 'Inovelli Thread routing role', 'options': list([ 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'context': , - 'entity_id': 'sensor.dimmable_plugin_unit_boot_reason', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unspecified', - }) -# --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_reboot_count-entry] - EntityRegistryEntrySnapshot({ - 'aliases': list([ - None, - ]), - 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.dimmable_plugin_unit_reboot_count', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Reboot count', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': 'Reboot count', - 'platform': 'matter', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, - }) -# --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_reboot_count-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Dimmable Plugin Unit Reboot count', - 'state_class': , - }), - 'context': , - 'entity_id': 'sensor.dimmable_plugin_unit_reboot_count', + 'entity_id': 'sensor.inovelli_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2', + 'state': 'router', }) # --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_uptime-entry] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14679,7 +15625,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dimmable_plugin_unit_uptime', + 'entity_id': 'sensor.inovelli_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14698,25 +15644,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-00000000000000C5-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_uptime-state] +# name: test_sensors[inovelli_vtm31][sensor.inovelli_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Dimmable Plugin Unit Uptime', + 'friendly_name': 'Inovelli Uptime', }), 'context': , - 'entity_id': 'sensor.dimmable_plugin_unit_uptime', + 'entity_id': 'sensor.inovelli_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-31T13:59:53+00:00', + 'state': '2024-12-20T04:52:48+00:00', }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_boot_reason-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14740,7 +15686,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_boot_reason', + 'entity_id': 'sensor.longan_link_hvac_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14759,15 +15705,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_boot_reason-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Door Lock Boot reason', + 'friendly_name': 'Longan link HVAC Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -14779,21 +15725,21 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_door_lock_boot_reason', + 'entity_id': 'sensor.longan_link_hvac_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'unspecified', }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_reboot_count-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_outdoor_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -14801,8 +15747,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.longan_link_hvac_outdoor_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14810,42 +15756,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Outdoor temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Outdoor temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'outdoor_temperature', + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-1-ThermostatOutdoorTemperature-513-1', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_reboot_count-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_outdoor_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Door Lock Reboot count', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'Longan link HVAC Outdoor temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_door_lock_reboot_count', + 'entity_id': 'sensor.longan_link_hvac_outdoor_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '12.5', }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_uptime-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -14853,7 +15806,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_uptime', + 'entity_id': 'sensor.longan_link_hvac_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14861,51 +15814,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_door_lock][sensor.mock_door_lock_uptime-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Door Lock Uptime', + 'friendly_name': 'Longan link HVAC Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_door_lock_uptime', + 'entity_id': 'sensor.longan_link_hvac_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:35+00:00', + 'state': '4', }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_boot_reason-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -14913,8 +15858,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.longan_link_hvac_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14922,53 +15867,47 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_boot_reason-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Door Lock with unbolt Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Longan link HVAC Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_boot_reason', + 'entity_id': 'sensor.longan_link_hvac_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '28.3', }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_reboot_count-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -14976,7 +15915,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_reboot_count', + 'entity_id': 'sensor.longan_link_hvac_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14984,42 +15923,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_reboot_count-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Door Lock with unbolt Reboot count', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Longan link HVAC Uptime', }), 'context': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_reboot_count', + 'entity_id': 'sensor.longan_link_hvac_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2025-01-01T13:59:30+00:00', }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_uptime-entry] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_wi_fi_rssi-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -15027,7 +15968,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_uptime', + 'entity_id': 'sensor.longan_link_hvac_wi_fi_rssi', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15035,36 +15976,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Wi-Fi RSSI', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Wi-Fi RSSI', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000004-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', }) # --- -# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_uptime-state] +# name: test_sensors[longan_link_thermostat][sensor.longan_link_hvac_wi_fi_rssi-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Door Lock with unbolt Uptime', + 'device_class': 'signal_strength', + 'friendly_name': 'Longan link HVAC Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', }), 'context': , - 'entity_id': 'sensor.mock_door_lock_with_unbolt_uptime', + 'entity_id': 'sensor.longan_link_hvac_wi_fi_rssi', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:35+00:00', + 'state': '-61', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_activated_carbon_filter_condition-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_activated_carbon_filter_condition-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15080,7 +16023,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_extractor_hood_activated_carbon_filter_condition', + 'entity_id': 'sensor.mock_air_purifier_activated_carbon_filter_condition', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15099,26 +16042,94 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'activated_carbon_filter_condition', - 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-1-ActivatedCarbonFilterCondition-114-0', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-1-ActivatedCarbonFilterCondition-114-0', 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_activated_carbon_filter_condition-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_activated_carbon_filter_condition-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Extractor hood Activated carbon filter condition', + 'friendly_name': 'Mock Air Purifier Activated carbon filter condition', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_extractor_hood_activated_carbon_filter_condition', + 'entity_id': 'sensor.mock_air_purifier_activated_carbon_filter_condition', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '100', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_boot_reason-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_air_quality-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'extremely_poor', + 'very_poor', + 'poor', + 'fair', + 'good', + 'moderate', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_air_quality', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Air quality', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Air quality', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'air_quality', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-AirQuality-91-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_air_quality-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Air Purifier Air quality', + 'options': list([ + 'extremely_poor', + 'very_poor', + 'poor', + 'fair', + 'good', + 'moderate', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_air_purifier_air_quality', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'good', + }) +# --- +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15142,7 +16153,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_extractor_hood_boot_reason', + 'entity_id': 'sensor.mock_air_purifier_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15161,15 +16172,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_boot_reason-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Extractor hood Boot reason', + 'friendly_name': 'Mock Air Purifier Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -15181,14 +16192,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_extractor_hood_boot_reason', + 'entity_id': 'sensor.mock_air_purifier_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'unspecified', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_hepa_filter_condition-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_dioxide-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15204,7 +16215,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_extractor_hood_hepa_filter_condition', + 'entity_id': 'sensor.mock_air_purifier_carbon_dioxide', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15212,44 +16223,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'HEPA filter condition', + 'object_id_base': 'Carbon dioxide', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'HEPA filter condition', + 'original_name': 'Carbon dioxide', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hepa_filter_condition', - 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-1-HepaFilterCondition-113-0', - 'unit_of_measurement': '%', + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-CarbonDioxideSensor-1037-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_hepa_filter_condition-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_dioxide-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Extractor hood HEPA filter condition', + 'device_class': 'carbon_dioxide', + 'friendly_name': 'Mock Air Purifier Carbon dioxide', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_extractor_hood_hepa_filter_condition', + 'entity_id': 'sensor.mock_air_purifier_carbon_dioxide', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '2.0', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_reboot_count-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_monoxide-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15257,8 +16269,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_extractor_hood_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_carbon_monoxide', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15266,50 +16278,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Carbon monoxide', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Carbon monoxide', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-CarbonMonoxideSensor-1036-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_reboot_count-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_carbon_monoxide-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Extractor hood Reboot count', - 'state_class': , + 'device_class': 'carbon_monoxide', + 'friendly_name': 'Mock Air Purifier Carbon monoxide', + 'state_class': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_extractor_hood_reboot_count', + 'entity_id': 'sensor.mock_air_purifier_carbon_monoxide', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2.0', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_uptime-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_hepa_filter_condition-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_extractor_hood_uptime', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_hepa_filter_condition', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15317,51 +16333,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'HEPA filter condition', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'HEPA filter condition', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'hepa_filter_condition', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-1-HepaFilterCondition-113-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_uptime-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_hepa_filter_condition-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Extractor hood Uptime', + 'friendly_name': 'Mock Air Purifier HEPA filter condition', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_extractor_hood_uptime', + 'entity_id': 'sensor.mock_air_purifier_hepa_filter_condition', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:28+00:00', + 'state': '100', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_boot_reason-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15369,8 +16378,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mocked_fan_switch_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15378,52 +16387,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Humidity', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Humidity', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-4-HumiditySensor-1029-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_boot_reason-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mocked Fan Switch Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'humidity', + 'friendly_name': 'Mock Air Purifier Humidity', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mocked_fan_switch_boot_reason', + 'entity_id': 'sensor.mock_air_purifier_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '50.0', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_reboot_count-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_nitrogen_dioxide-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15431,8 +16433,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mocked_fan_switch_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_nitrogen_dioxide', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15440,50 +16442,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Nitrogen dioxide', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Nitrogen dioxide', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-NitrogenDioxideSensor-1043-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_reboot_count-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_nitrogen_dioxide-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mocked Fan Switch Reboot count', - 'state_class': , + 'device_class': 'nitrogen_dioxide', + 'friendly_name': 'Mock Air Purifier Nitrogen dioxide', + 'state_class': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mocked_fan_switch_reboot_count', + 'entity_id': 'sensor.mock_air_purifier_nitrogen_dioxide', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '15', + 'state': '2.0', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_uptime-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_ozone-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mocked_fan_switch_uptime', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_ozone', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15491,36 +16497,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Ozone', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Ozone', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-OzoneConcentrationSensor-1045-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[mock_fan][sensor.mocked_fan_switch_uptime-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_ozone-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mocked Fan Switch Uptime', + 'device_class': 'ozone', + 'friendly_name': 'Mock Air Purifier Ozone', + 'state_class': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mocked_fan_switch_uptime', + 'entity_id': 'sensor.mock_air_purifier_ozone', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T12:25:12+00:00', + 'state': '2.0', }) # --- -# name: test_sensors[mock_flow_sensor][sensor.mock_flow_sensor_flow-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15536,7 +16544,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_flow_sensor_flow', + 'entity_id': 'sensor.mock_air_purifier_pm1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15544,37 +16552,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Flow', + 'object_id_base': 'PM1', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Flow', + 'original_name': 'PM1', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'flow', - 'unique_id': '00000000000004D2-0000000000000011-MatterNodeDevice-1-FlowSensor-1028-0', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM1Sensor-1068-0', + 'unit_of_measurement': 'μg/m³', }) # --- -# name: test_sensors[mock_flow_sensor][sensor.mock_flow_sensor_flow-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Flow Sensor Flow', + 'device_class': 'pm1', + 'friendly_name': 'Mock Air Purifier PM1', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': 'μg/m³', }), 'context': , - 'entity_id': 'sensor.mock_flow_sensor_flow', + 'entity_id': 'sensor.mock_air_purifier_pm1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '2.0', }) # --- -# name: test_sensors[mock_generic_switch][sensor.mock_generic_switch_current_switch_position-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm10-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15589,8 +16598,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_pm10', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15598,36 +16607,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position', + 'object_id_base': 'PM10', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position', + 'original_name': 'PM10', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000013-MatterNodeDevice-1-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM10Sensor-1069-0', + 'unit_of_measurement': 'μg/m³', }) # --- -# name: test_sensors[mock_generic_switch][sensor.mock_generic_switch_current_switch_position-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm10-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Generic Switch Current switch position', + 'device_class': 'pm10', + 'friendly_name': 'Mock Air Purifier PM10', 'state_class': , + 'unit_of_measurement': 'μg/m³', }), 'context': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position', + 'entity_id': 'sensor.mock_air_purifier_pm10', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2.0', }) # --- -# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_1-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm2_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15642,8 +16653,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position_1', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_pm2_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15651,36 +16662,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (1)', + 'object_id_base': 'PM2.5', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current switch position (1)', + 'original_name': 'PM2.5', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000012-MatterNodeDevice-1-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-PM25Sensor-1066-0', + 'unit_of_measurement': 'μg/m³', }) # --- -# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_1-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_pm2_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Generic Switch Current switch position (1)', + 'device_class': 'pm25', + 'friendly_name': 'Mock Air Purifier PM2.5', 'state_class': , + 'unit_of_measurement': 'μg/m³', }), 'context': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position_1', + 'entity_id': 'sensor.mock_air_purifier_pm2_5', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2.0', }) # --- -# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_fancy_button-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_radon_concentration-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15695,8 +16708,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position_fancy_button', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_radon_concentration', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15704,43 +16717,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position (Fancy Button)', + 'object_id_base': 'Radon concentration', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position (Fancy Button)', + 'original_name': 'Radon concentration', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-0000000000000012-MatterNodeDevice-2-SwitchCurrentPosition-59-1', - 'unit_of_measurement': None, + 'translation_key': 'radon_concentration', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-RadonSensor-1071-0', + 'unit_of_measurement': 'Bq/m³', }) # --- -# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_fancy_button-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_radon_concentration-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Generic Switch Current switch position (Fancy Button)', + 'friendly_name': 'Mock Air Purifier Radon concentration', 'state_class': , + 'unit_of_measurement': 'Bq/m³', }), 'context': , - 'entity_id': 'sensor.mock_generic_switch_current_switch_position_fancy_button', + 'entity_id': 'sensor.mock_air_purifier_radon_concentration', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2.0', }) # --- -# name: test_sensors[mock_humidity_sensor][sensor.mock_humidity_sensor_humidity-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15748,8 +16762,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_humidity_sensor_humidity', + 'entity_category': , + 'entity_id': 'sensor.mock_air_purifier_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15757,53 +16771,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Humidity', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000015-MatterNodeDevice-1-HumiditySensor-1029-0', - 'unit_of_measurement': '%', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_humidity_sensor][sensor.mock_humidity_sensor_humidity-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'Mock Humidity Sensor Humidity', - 'state_class': , - 'unit_of_measurement': '%', + 'friendly_name': 'Mock Air Purifier Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_humidity_sensor_humidity', + 'entity_id': 'sensor.mock_air_purifier_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '2', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_boot_reason-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15811,8 +16815,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_laundrydryer_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15820,56 +16824,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-3-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_boot_reason-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Laundrydryer Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Mock Air Purifier Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_boot_reason', + 'entity_id': 'sensor.mock_air_purifier_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '20.0', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_current_phase-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'pre-soak', - 'rinse', - 'spin', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -15878,7 +16874,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_laundrydryer_current_phase', + 'entity_id': 'sensor.mock_air_purifier_temperature_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15886,41 +16882,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current phase', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current phase', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'current_phase', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalStateCurrentPhase-96-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-5-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_current_phase-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_temperature_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Laundrydryer Current phase', - 'options': list([ - 'pre-soak', - 'rinse', - 'spin', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Mock Air Purifier Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_current_phase', + 'entity_id': 'sensor.mock_air_purifier_temperature_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'pre-soak', + 'state': '20.0', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_error-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_tvoc_level-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -15928,10 +16924,10 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', + 'low', + 'medium', + 'high', + 'critical', ]), }), 'config_entry_id': , @@ -15940,8 +16936,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_laundrydryer_operational_error', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_tvoc_level', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -15949,63 +16945,56 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'TVOC level', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'TVOC level', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'translation_key': 'tvoc_level', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-TotalVolatileOrganicCompoundsSensorLevel-1070-10', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_error-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_tvoc_level-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Laundrydryer Operational error', + 'friendly_name': 'Mock Air Purifier TVOC level', 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', + 'low', + 'medium', + 'high', + 'critical', ]), }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_operational_error', + 'entity_id': 'sensor.mock_air_purifier_tvoc_level', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': 'low', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_state-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_laundrydryer_operational_state', + 'entity_category': , + 'entity_id': 'sensor.mock_air_purifier_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16013,49 +17002,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalState-96-4', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_state-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Laundrydryer Operational state', - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - ]), + 'device_class': 'uptime', + 'friendly_name': 'Mock Air Purifier Uptime', }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_operational_state', + 'entity_id': 'sensor.mock_air_purifier_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'running', + 'state': '2025-01-01T13:59:38+00:00', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_reboot_count-entry] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_volatile_organic_compounds_parts-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -16063,8 +17046,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_laundrydryer_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_air_purifier_volatile_organic_compounds_parts', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16072,42 +17055,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Volatile organic compounds parts', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Volatile organic compounds parts', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000008F-MatterNodeDevice-2-TotalVolatileOrganicCompoundsSensor-1070-0', + 'unit_of_measurement': 'ppm', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_reboot_count-state] +# name: test_sensors[mock_air_purifier][sensor.mock_air_purifier_volatile_organic_compounds_parts-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Laundrydryer Reboot count', - 'state_class': , + 'device_class': 'volatile_organic_compounds_parts', + 'friendly_name': 'Mock Air Purifier Volatile organic compounds parts', + 'state_class': , + 'unit_of_measurement': 'ppm', }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_reboot_count', + 'entity_id': 'sensor.mock_air_purifier_volatile_organic_compounds_parts', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2.0', }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_uptime-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_active_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -16115,7 +17102,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_laundrydryer_uptime', + 'entity_id': 'sensor.mock_battery_storage_active_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16123,43 +17110,57 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Active current', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Active current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_uptime-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_active_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Laundrydryer Uptime', + 'device_class': 'current', + 'friendly_name': 'Mock Battery Storage Active current', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_laundrydryer_uptime', + 'entity_id': 'sensor.mock_battery_storage_active_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:49+00:00', + 'state': '0.0', }) # --- -# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_reboot_count-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_appliance_energy_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'offline', + 'online', + 'fault', + 'power_adjust_active', + 'paused', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -16168,7 +17169,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.water_leak_detector_reboot_count', + 'entity_id': 'sensor.mock_battery_storage_appliance_energy_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16176,42 +17177,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Appliance energy state', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Appliance energy state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000020-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'esa_state', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ESAState-152-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_reboot_count-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_appliance_energy_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Water Leak Detector Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Mock Battery Storage Appliance energy state', + 'options': list([ + 'offline', + 'online', + 'fault', + 'power_adjust_active', + 'paused', + ]), }), 'context': , - 'entity_id': 'sensor.water_leak_detector_reboot_count', + 'entity_id': 'sensor.mock_battery_storage_appliance_energy_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '7', + 'state': 'online', }) # --- -# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_uptime-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -16219,7 +17229,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.water_leak_detector_uptime', + 'entity_id': 'sensor.mock_battery_storage_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16227,36 +17237,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Battery', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Battery', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000020-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSource-47-12', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_uptime-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Water Leak Detector Uptime', + 'device_class': 'battery', + 'friendly_name': 'Mock Battery Storage Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.water_leak_detector_uptime', + 'entity_id': 'sensor.mock_battery_storage_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:43+00:00', + 'state': '90', }) # --- -# name: test_sensors[mock_light_sensor][sensor.mock_light_sensor_illuminance-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16271,8 +17283,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_light_sensor_illuminance', + 'entity_category': , + 'entity_id': 'sensor.mock_battery_storage_battery_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16280,38 +17292,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Illuminance', + 'object_id_base': 'Battery voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Illuminance', + 'original_name': 'Battery voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000016-MatterNodeDevice-1-LightSensor-1024-0', - 'unit_of_measurement': 'lx', + 'translation_key': 'battery_voltage', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatVoltage-47-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_light_sensor][sensor.mock_light_sensor_illuminance-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'illuminance', - 'friendly_name': 'Mock Light Sensor Illuminance', + 'device_class': 'voltage', + 'friendly_name': 'Mock Battery Storage Battery voltage', 'state_class': , - 'unit_of_measurement': 'lx', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_light_sensor_illuminance', + 'entity_id': 'sensor.mock_battery_storage_battery_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1.3', + 'state': '48.0', }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_boot_reason-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_energy_optimization_opt_out-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16319,13 +17337,10 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'no_opt_out', + 'local_opt_out', + 'grid_opt_out', + 'opt_out', ]), }), 'config_entry_id': , @@ -16335,7 +17350,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_lock_boot_reason', + 'entity_id': 'sensor.mock_battery_storage_energy_optimization_opt_out', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16343,52 +17358,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Energy optimization opt-out', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Energy optimization opt-out', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'esa_opt_out_state', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ESAOptOutState-152-7', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_boot_reason-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_energy_optimization_opt_out-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Lock Boot reason', + 'friendly_name': 'Mock Battery Storage Energy optimization opt-out', 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'no_opt_out', + 'local_opt_out', + 'grid_opt_out', + 'opt_out', ]), }), 'context': , - 'entity_id': 'sensor.mock_lock_boot_reason', + 'entity_id': 'sensor.mock_battery_storage_energy_optimization_opt_out', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': 'no_opt_out', }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_door_closed_events-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -16396,8 +17408,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_lock_door_closed_events', + 'entity_category': None, + 'entity_id': 'sensor.mock_battery_storage_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16405,36 +17417,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Door closed events', + 'object_id_base': 'Power', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Door closed events', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'door_closed_events', - 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-1-DoorLockDoorClosedEvents-257-5', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_door_closed_events-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Lock Door closed events', - 'state_class': , + 'device_class': 'power', + 'friendly_name': 'Mock Battery Storage Power', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_lock_door_closed_events', + 'entity_id': 'sensor.mock_battery_storage_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3', + 'state': '0.0', }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_door_open_events-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16450,7 +17470,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_lock_door_open_events', + 'entity_id': 'sensor.mock_battery_storage_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16458,43 +17478,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Door open events', + 'object_id_base': 'Reboot count', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Door open events', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'door_open_events', - 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-1-DoorLockDoorOpenEvents-257-4', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_door_open_events-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Lock Door open events', + 'friendly_name': 'Mock Battery Storage Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_lock_door_open_events', + 'entity_id': 'sensor.mock_battery_storage_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '5', + 'state': '1', }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_reboot_count-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_remaining-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -16503,7 +17523,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_lock_reboot_count', + 'entity_id': 'sensor.mock_battery_storage_time_remaining', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16511,42 +17531,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Time remaining', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Time remaining', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'battery_time_remaining', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatTimeRemaining-47-13', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_reboot_count-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_remaining-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Lock Reboot count', - 'state_class': , + 'device_class': 'duration', + 'friendly_name': 'Mock Battery Storage Time remaining', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_lock_reboot_count', + 'entity_id': 'sensor.mock_battery_storage_time_remaining', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '120.0', }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_uptime-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_to_full_charge-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -16554,7 +17584,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_lock_uptime', + 'entity_id': 'sensor.mock_battery_storage_time_to_full_charge', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16562,52 +17592,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Time to full charge', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Time to full charge', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'battery_time_to_full_charge', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatTimeToFullCharge-47-27', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_lock][sensor.mock_lock_uptime-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_time_to_full_charge-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Lock Uptime', + 'device_class': 'duration', + 'friendly_name': 'Mock Battery Storage Time to full charge', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_lock_uptime', + 'entity_id': 'sensor.mock_battery_storage_time_to_full_charge', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:41+00:00', + 'state': '30.0', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_boot_reason-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -16615,7 +17643,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_microwave_oven_boot_reason', + 'entity_id': 'sensor.mock_battery_storage_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16623,59 +17651,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_boot_reason-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Microwave Oven Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'uptime', + 'friendly_name': 'Mock Battery Storage Uptime', }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_boot_reason', + 'entity_id': 'sensor.mock_battery_storage_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '2025-01-01T13:55:55+00:00', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_estimated_end_time-entry] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_microwave_oven_estimated_end_time', + 'entity_category': , + 'entity_id': 'sensor.mock_battery_storage_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16683,36 +17704,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Estimated end time', + 'object_id_base': 'Voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Estimated end time', + 'original_name': 'Voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'estimated_end_time', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalStateCountdownTime-96-2', - 'unit_of_measurement': None, + 'translation_key': 'voltage', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_estimated_end_time-state] +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'Mock Microwave Oven Estimated end time', + 'device_class': 'voltage', + 'friendly_name': 'Mock Battery Storage Voltage', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_estimated_end_time', + 'entity_id': 'sensor.mock_battery_storage_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T14:00:30+00:00', + 'state': '0.0', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_error-entry] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16720,10 +17749,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -16733,7 +17765,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_microwave_oven_operational_error', + 'entity_id': 'sensor.mock_cooktop_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16741,54 +17773,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_error-state] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Microwave Oven Operational error', + 'friendly_name': 'Mock Cooktop Boot reason', 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_operational_error', + 'entity_id': 'sensor.mock_cooktop_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_state-entry] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -16796,8 +17826,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_microwave_oven_operational_state', + 'entity_category': , + 'entity_id': 'sensor.mock_cooktop_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16805,49 +17835,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalState-96-4', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_state-state] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Microwave Oven Operational state', - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - ]), + 'friendly_name': 'Mock Cooktop Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_operational_state', + 'entity_id': 'sensor.mock_cooktop_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'stopped', + 'state': '1', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_reboot_count-entry] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -16855,8 +17879,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_microwave_oven_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_cooktop_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16864,36 +17888,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-2-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_reboot_count-state] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Microwave Oven Reboot count', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'Mock Cooktop Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_reboot_count', + 'entity_id': 'sensor.mock_cooktop_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '180.0', }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_uptime-entry] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16907,7 +17936,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_microwave_oven_uptime', + 'entity_id': 'sensor.mock_cooktop_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16926,25 +17955,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000002B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_uptime-state] +# name: test_sensors[mock_cooktop][sensor.mock_cooktop_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Microwave Oven Uptime', + 'friendly_name': 'Mock Cooktop Uptime', }), 'context': , - 'entity_id': 'sensor.mock_microwave_oven_uptime', + 'entity_id': 'sensor.mock_cooktop_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:44+00:00', + 'state': '2025-01-01T13:59:37+00:00', }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_boot_reason-entry] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -16968,7 +17997,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_boot_reason', + 'entity_id': 'sensor.mock_dimmable_light_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -16987,15 +18016,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_boot_reason-state] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Mounted dimmable load control Boot reason', + 'friendly_name': 'Mock Dimmable Light Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -17007,14 +18036,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_boot_reason', + 'entity_id': 'sensor.mock_dimmable_light_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unavailable', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_reboot_count-entry] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17030,7 +18059,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_reboot_count', + 'entity_id': 'sensor.mock_dimmable_light_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17049,25 +18078,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_reboot_count-state] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Mounted dimmable load control Reboot count', + 'friendly_name': 'Mock Dimmable Light Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_reboot_count', + 'entity_id': 'sensor.mock_dimmable_light_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unavailable', + 'state': '6', }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_uptime-entry] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17081,7 +18110,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_uptime', + 'entity_id': 'sensor.mock_dimmable_light_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17100,40 +18129,32 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_uptime-state] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Mounted dimmable load control Uptime', + 'friendly_name': 'Mock Dimmable Light Uptime', }), 'context': , - 'entity_id': 'sensor.mock_mounted_dimmable_load_control_uptime', + 'entity_id': 'sensor.mock_dimmable_light_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unavailable', + 'state': '2025-01-01T05:18:41+00:00', }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_boot_reason-entry] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_wi_fi_rssi-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -17142,7 +18163,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_boot_reason', + 'entity_id': 'sensor.mock_dimmable_light_wi_fi_rssi', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17150,27 +18171,90 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Wi-Fi RSSI', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Wi-Fi RSSI', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000000D-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_boot_reason-state] +# name: test_sensors[mock_dimmable_light][sensor.mock_dimmable_light_wi_fi_rssi-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock OnOff Light Boot reason', - 'options': list([ + 'device_class': 'signal_strength', + 'friendly_name': 'Mock Dimmable Light Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.mock_dimmable_light_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-61', + }) +# --- +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dimmable_plugin_unit_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Dimmable Plugin Unit Boot reason', + 'options': list([ 'unspecified', 'power_on_reboot', 'brown_out_reset', @@ -17181,14 +18265,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_boot_reason', + 'entity_id': 'sensor.dimmable_plugin_unit_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_reboot_count-entry] +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17204,7 +18288,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_reboot_count', + 'entity_id': 'sensor.dimmable_plugin_unit_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17223,25 +18307,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_reboot_count-state] +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock OnOff Light Reboot count', + 'friendly_name': 'Dimmable Plugin Unit Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_reboot_count', + 'entity_id': 'sensor.dimmable_plugin_unit_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '2', }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_uptime-entry] +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17255,7 +18339,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_uptime', + 'entity_id': 'sensor.dimmable_plugin_unit_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17274,25 +18358,80 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_uptime-state] +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock OnOff Light Uptime', + 'friendly_name': 'Dimmable Plugin Unit Uptime', }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_uptime', + 'entity_id': 'sensor.dimmable_plugin_unit_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T05:18:41+00:00', + 'state': '2024-12-31T13:59:53+00:00', }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_boot_reason_2-entry] +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dimmable_plugin_unit_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000024-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_dimmable_plugin_unit][sensor.dimmable_plugin_unit_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Dimmable Plugin Unit Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.dimmable_plugin_unit_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-66', + }) +# --- +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17316,7 +18455,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_boot_reason_2', + 'entity_id': 'sensor.mock_door_lock_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17335,15 +18474,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_boot_reason_2-state] +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock OnOff Light Boot reason', + 'friendly_name': 'Mock Door Lock Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -17355,14 +18494,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_boot_reason_2', + 'entity_id': 'sensor.mock_door_lock_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_reboot_count_2-entry] +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17378,7 +18517,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_reboot_count_2', + 'entity_id': 'sensor.mock_door_lock_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17397,25 +18536,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_reboot_count_2-state] +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock OnOff Light Reboot count', + 'friendly_name': 'Mock Door Lock Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_reboot_count_2', + 'entity_id': 'sensor.mock_door_lock_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '1', }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_uptime_2-entry] +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17429,7 +18568,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_onoff_light_uptime_2', + 'entity_id': 'sensor.mock_door_lock_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17448,25 +18587,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000010-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_uptime_2-state] +# name: test_sensors[mock_door_lock][sensor.mock_door_lock_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock OnOff Light Uptime', + 'friendly_name': 'Mock Door Lock Uptime', }), 'context': , - 'entity_id': 'sensor.mock_onoff_light_uptime_2', + 'entity_id': 'sensor.mock_door_lock_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T05:18:41+00:00', + 'state': '2025-01-01T13:59:35+00:00', }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_boot_reason-entry] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17490,7 +18629,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_light_boot_reason', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17509,15 +18648,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_boot_reason-state] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Light Boot reason', + 'friendly_name': 'Mock Door Lock with unbolt Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -17529,14 +18668,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_light_boot_reason', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_reboot_count-entry] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17552,7 +18691,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_light_reboot_count', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17571,25 +18710,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_reboot_count-state] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Light Reboot count', + 'friendly_name': 'Mock Door Lock with unbolt Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_light_reboot_count', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '1', }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_uptime-entry] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17603,7 +18742,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_light_uptime', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17622,40 +18761,32 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000000F-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_uptime-state] +# name: test_sensors[mock_door_lock_with_unbolt][sensor.mock_door_lock_with_unbolt_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Light Uptime', + 'friendly_name': 'Mock Door Lock with unbolt Uptime', }), 'context': , - 'entity_id': 'sensor.mock_light_uptime', + 'entity_id': 'sensor.mock_door_lock_with_unbolt_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T05:18:41+00:00', + 'state': '2025-01-01T13:59:35+00:00', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_boot_reason-entry] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_activated_carbon_filter_condition-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -17663,8 +18794,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_oven_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.mock_extractor_hood_activated_carbon_filter_condition', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17672,45 +18803,37 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Activated carbon filter condition', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Activated carbon filter condition', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': 'activated_carbon_filter_condition', + 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-1-ActivatedCarbonFilterCondition-114-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_boot_reason-state] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_activated_carbon_filter_condition-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Oven Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Mock Extractor hood Activated carbon filter condition', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_oven_boot_reason', + 'entity_id': 'sensor.mock_extractor_hood_activated_carbon_filter_condition', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '100', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_current_phase-entry] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17718,9 +18841,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'pre-heating', - 'pre-heated', - 'cooling down', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -17729,8 +18856,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_oven_current_phase', + 'entity_category': , + 'entity_id': 'sensor.mock_extractor_hood_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17738,52 +18865,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current phase', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Current phase', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'current_phase', - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-OvenCavityOperationalStateCurrentPhase-72-1', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_current_phase-state] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Oven Current phase', + 'friendly_name': 'Mock Extractor hood Boot reason', 'options': list([ - 'pre-heating', - 'pre-heated', - 'cooling down', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'context': , - 'entity_id': 'sensor.mock_oven_current_phase', + 'entity_id': 'sensor.mock_extractor_hood_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'pre-heating', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_operational_state-entry] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_hepa_filter_condition-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'stopped', - 'running', - 'error', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -17792,7 +18919,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_oven_operational_state', + 'entity_id': 'sensor.mock_extractor_hood_hepa_filter_condition', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17800,41 +18927,37 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'HEPA filter condition', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'HEPA filter condition', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-OvenCavityOperationalState-72-4', - 'unit_of_measurement': None, + 'translation_key': 'hepa_filter_condition', + 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-1-HepaFilterCondition-113-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_operational_state-state] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_hepa_filter_condition-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Oven Operational state', - 'options': list([ - 'stopped', - 'running', - 'error', - ]), + 'friendly_name': 'Mock Extractor hood HEPA filter condition', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.mock_oven_operational_state', + 'entity_id': 'sensor.mock_extractor_hood_hepa_filter_condition', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'running', + 'state': '100', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_reboot_count-entry] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -17850,7 +18973,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_oven_reboot_count', + 'entity_id': 'sensor.mock_extractor_hood_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17869,41 +18992,39 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_reboot_count-state] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Oven Reboot count', + 'friendly_name': 'Mock Extractor hood Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_oven_reboot_count', + 'entity_id': 'sensor.mock_extractor_hood_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_temperature_2-entry] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_oven_temperature_2', + 'entity_category': , + 'entity_id': 'sensor.mock_extractor_hood_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17911,48 +19032,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature (2)', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature (2)', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000049-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_temperature_2-state] +# name: test_sensors[mock_extractor_hood][sensor.mock_extractor_hood_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Oven Temperature (2)', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Mock Extractor hood Uptime', }), 'context': , - 'entity_id': 'sensor.mock_oven_temperature_2', + 'entity_id': 'sensor.mock_extractor_hood_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '65.55', + 'state': '2025-01-01T13:59:28+00:00', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_temperature_4-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -17960,8 +19084,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_oven_temperature_4', + 'entity_category': , + 'entity_id': 'sensor.mocked_fan_switch_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -17969,47 +19093,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature (4)', + 'object_id_base': 'Boot reason', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature (4)', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-4-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_temperature_4-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Oven Temperature (4)', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mocked Fan Switch Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.mock_oven_temperature_4', + 'entity_id': 'sensor.mocked_fan_switch_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_uptime-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -18017,7 +19147,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_oven_uptime', + 'entity_id': 'sensor.mocked_fan_switch_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18025,52 +19155,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_oven][sensor.mock_oven_uptime-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Oven Uptime', + 'friendly_name': 'Mocked Fan Switch Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_oven_uptime', + 'entity_id': 'sensor.mocked_fan_switch_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:34+00:00', + 'state': '15', }) # --- -# name: test_sensors[mock_pressure_sensor][sensor.mock_pressure_sensor_pressure-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pressure_sensor_pressure', + 'entity_category': , + 'entity_id': 'sensor.mocked_fan_switch_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18078,64 +19206,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Pressure', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Pressure', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000001F-MatterNodeDevice-1-PressureSensor-1027-0', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pressure_sensor][sensor.mock_pressure_sensor_pressure-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'Mock Pressure Sensor Pressure', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Mocked Fan Switch Thread channel', }), 'context': , - 'entity_id': 'sensor.mock_pressure_sensor_pressure', + 'entity_id': 'sensor.mocked_fan_switch_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '25', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_control_mode-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'constant_speed', - 'constant_pressure', - 'proportional_pressure', - 'constant_flow', - 'constant_temperature', - 'automatic', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pump_control_mode', + 'entity_category': , + 'entity_id': 'sensor.mocked_fan_switch_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18143,51 +19256,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Control mode', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Control mode', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'pump_control_mode', - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PumpControlMode-512-33', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_control_mode-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Pump Control mode', - 'options': list([ - 'constant_speed', - 'constant_pressure', - 'proportional_pressure', - 'constant_flow', - 'constant_temperature', - 'automatic', - ]), + 'friendly_name': 'Mocked Fan Switch Thread network name', }), 'context': , - 'entity_id': 'sensor.mock_pump_control_mode', + 'entity_id': 'sensor.mocked_fan_switch_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'constant_temperature', + 'state': 'ha-thread', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_flow-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -18195,8 +19308,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pump_flow', + 'entity_category': , + 'entity_id': 'sensor.mocked_fan_switch_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18204,53 +19317,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Flow', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Flow', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'flow', - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-FlowSensor-1028-0', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_flow-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Pump Flow', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mocked Fan Switch Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.mock_pump_flow', + 'entity_id': 'sensor.mocked_fan_switch_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '5.0', + 'state': 'router', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_pressure-entry] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pump_pressure', + 'entity_category': , + 'entity_id': 'sensor.mocked_fan_switch_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18258,48 +19378,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Pressure', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Pressure', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PressureSensor-1027-0', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000037-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_pressure-state] +# name: test_sensors[mock_fan][sensor.mocked_fan_switch_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'Mock Pump Pressure', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Mocked Fan Switch Uptime', }), 'context': , - 'entity_id': 'sensor.mock_pump_pressure', + 'entity_id': 'sensor.mocked_fan_switch_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '10.0', + 'state': '2025-01-01T12:25:12+00:00', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_reboot_count-entry] +# name: test_sensors[mock_flow_sensor][sensor.mock_flow_sensor_flow-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -18307,8 +19422,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_pump_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_flow_sensor_flow', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18316,36 +19431,37 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Flow', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Flow', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'flow', + 'unique_id': '00000000000004D2-0000000000000011-MatterNodeDevice-1-FlowSensor-1028-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_reboot_count-state] +# name: test_sensors[mock_flow_sensor][sensor.mock_flow_sensor_flow-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Pump Reboot count', - 'state_class': , + 'friendly_name': 'Mock Flow Sensor Flow', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_pump_reboot_count', + 'entity_id': 'sensor.mock_flow_sensor_flow', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '0.0', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_rotation_speed-entry] +# name: test_sensors[mock_generic_switch][sensor.mock_generic_switch_current_switch_position-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18360,8 +19476,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pump_rotation_speed', + 'entity_category': , + 'entity_id': 'sensor.mock_generic_switch_current_switch_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18369,37 +19485,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Rotation speed', + 'object_id_base': 'Current switch position', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Rotation speed', + 'original_name': 'Current switch position', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'pump_speed', - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PumpSpeed-512-20', - 'unit_of_measurement': 'rpm', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000013-MatterNodeDevice-1-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_rotation_speed-state] +# name: test_sensors[mock_generic_switch][sensor.mock_generic_switch_current_switch_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Pump Rotation speed', + 'friendly_name': 'Mock Generic Switch Current switch position', 'state_class': , - 'unit_of_measurement': 'rpm', }), 'context': , - 'entity_id': 'sensor.mock_pump_rotation_speed', + 'entity_id': 'sensor.mock_generic_switch_current_switch_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1000', + 'state': '0', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_temperature-entry] +# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18414,8 +19529,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_pump_temperature', + 'entity_category': , + 'entity_id': 'sensor.mock_generic_switch_current_switch_position_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18423,47 +19538,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Current switch position (1)', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Current switch position (1)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000012-MatterNodeDevice-1-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_temperature-state] +# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Pump Temperature', + 'friendly_name': 'Mock Generic Switch Current switch position (1)', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_pump_temperature', + 'entity_id': 'sensor.mock_generic_switch_current_switch_position_1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '60.0', + 'state': '0', }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_uptime-entry] +# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_fancy_button-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -18471,7 +19583,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_pump_uptime', + 'entity_id': 'sensor.mock_generic_switch_current_switch_position_fancy_button', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18479,43 +19591,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Current switch position (Fancy Button)', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Current switch position (Fancy Button)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-0000000000000012-MatterNodeDevice-2-SwitchCurrentPosition-59-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_pump][sensor.mock_pump_uptime-state] +# name: test_sensors[mock_generic_switch_multi][sensor.mock_generic_switch_current_switch_position_fancy_button-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Pump Uptime', + 'friendly_name': 'Mock Generic Switch Current switch position (Fancy Button)', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_pump_uptime', + 'entity_id': 'sensor.mock_generic_switch_current_switch_position_fancy_button', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:55:18+00:00', + 'state': '0', }) # --- -# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_reboot_count-entry] +# name: test_sensors[mock_humidity_sensor][sensor.mock_humidity_sensor_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -18523,8 +19635,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.room_airconditioner_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_humidity_sensor_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18532,43 +19644,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Humidity', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Humidity', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000003B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000015-MatterNodeDevice-1-HumiditySensor-1029-0', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_reboot_count-state] +# name: test_sensors[mock_humidity_sensor][sensor.mock_humidity_sensor_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Room AirConditioner Reboot count', - 'state_class': , + 'device_class': 'humidity', + 'friendly_name': 'Mock Humidity Sensor Humidity', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.room_airconditioner_reboot_count', + 'entity_id': 'sensor.mock_humidity_sensor_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '0.0', }) # --- -# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_temperature-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -18576,8 +19698,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.room_airconditioner_temperature', + 'entity_category': , + 'entity_id': 'sensor.mock_laundrydryer_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18585,48 +19707,56 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Boot reason', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000003B-MatterNodeDevice-2-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_temperature-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Room AirConditioner Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mock Laundrydryer Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.room_airconditioner_temperature', + 'entity_id': 'sensor.mock_laundrydryer_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_soil_sensor][sensor.mock_soil_sensor_moisture-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_current_phase-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'pre-soak', + 'rinse', + 'spin', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -18635,7 +19765,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.mock_soil_sensor_moisture', + 'entity_id': 'sensor.mock_laundrydryer_current_phase', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18643,45 +19773,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Moisture', + 'object_id_base': 'Current phase', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Moisture', + 'original_name': 'Current phase', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000065-MatterNodeDevice-1-SoilMoistureSensor-1072-1', - 'unit_of_measurement': '%', + 'translation_key': 'current_phase', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalStateCurrentPhase-96-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_soil_sensor][sensor.mock_soil_sensor_moisture-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_current_phase-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'moisture', - 'friendly_name': 'Mock Soil Sensor Moisture', - 'state_class': , - 'unit_of_measurement': '%', + 'device_class': 'enum', + 'friendly_name': 'Mock Laundrydryer Current phase', + 'options': list([ + 'pre-soak', + 'rinse', + 'spin', + ]), }), 'context': , - 'entity_id': 'sensor.mock_soil_sensor_moisture', + 'entity_id': 'sensor.mock_laundrydryer_current_phase', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '50', + 'state': 'pre-soak', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_active_current-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_error-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -18690,7 +19828,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_solar_inverter_active_current', + 'entity_id': 'sensor.mock_laundrydryer_operational_error', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18698,44 +19836,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'Operational error', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'Operational error', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_active_current-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_error-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Mock solar inverter Active current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mock Laundrydryer Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_active_current', + 'entity_id': 'sensor.mock_laundrydryer_operational_error', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '-3.62', + 'state': 'no_error', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_boot_reason-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18743,13 +19879,10 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'stopped', + 'running', + 'paused', + 'error', ]), }), 'config_entry_id': , @@ -18758,8 +19891,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_solar_inverter_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.mock_laundrydryer_operational_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18767,45 +19900,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Operational state', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Operational state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-1-OperationalState-96-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_boot_reason-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_operational_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock solar inverter Boot reason', + 'friendly_name': 'Mock Laundrydryer Operational state', 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', + 'stopped', + 'running', + 'paused', + 'error', ]), }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_boot_reason', + 'entity_id': 'sensor.mock_laundrydryer_operational_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': 'running', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_energy_exported-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18820,8 +19950,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_solar_inverter_energy_exported', + 'entity_category': , + 'entity_id': 'sensor.mock_laundrydryer_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18829,60 +19959,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy exported', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy exported', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_exported', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyExported-145-2', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_energy_exported-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'Mock solar inverter Energy exported', + 'friendly_name': 'Mock Laundrydryer Reboot count', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_energy_exported', + 'entity_id': 'sensor.mock_laundrydryer_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '42.279', + 'state': '1', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_power-entry] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_solar_inverter_power', + 'entity_category': , + 'entity_id': 'sensor.mock_laundrydryer_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18890,44 +20010,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000008-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_power-state] +# name: test_sensors[mock_laundry_dryer][sensor.mock_laundrydryer_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'Mock solar inverter Power', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Mock Laundrydryer Uptime', }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_power', + 'entity_id': 'sensor.mock_laundrydryer_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '-850.0', + 'state': '2025-01-01T13:59:49+00:00', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_reboot_count-entry] +# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18943,7 +20055,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_solar_inverter_reboot_count', + 'entity_id': 'sensor.water_leak_detector_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -18962,25 +20074,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000020-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_reboot_count-state] +# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock solar inverter Reboot count', + 'friendly_name': 'Water Leak Detector Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_reboot_count', + 'entity_id': 'sensor.water_leak_detector_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '7', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_uptime-entry] +# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -18994,7 +20106,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_solar_inverter_uptime', + 'entity_id': 'sensor.water_leak_detector_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19013,25 +20125,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000020-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_uptime-state] +# name: test_sensors[mock_leak_sensor][sensor.water_leak_detector_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock solar inverter Uptime', + 'friendly_name': 'Water Leak Detector Uptime', }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_uptime', + 'entity_id': 'sensor.water_leak_detector_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:23+00:00', + 'state': '2025-01-01T13:59:43+00:00', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_voltage-entry] +# name: test_sensors[mock_light_sensor][sensor.mock_light_sensor_illuminance-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19046,8 +20158,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_solar_inverter_voltage', + 'entity_category': None, + 'entity_id': 'sensor.mock_light_sensor_illuminance', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19055,51 +20167,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Illuminance', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Illuminance', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'voltage', - 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000016-MatterNodeDevice-1-LightSensor-1024-0', + 'unit_of_measurement': 'lx', }) # --- -# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_voltage-state] +# name: test_sensors[mock_light_sensor][sensor.mock_light_sensor_illuminance-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Mock solar inverter Voltage', + 'device_class': 'illuminance', + 'friendly_name': 'Mock Light Sensor Illuminance', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': 'lx', }), 'context': , - 'entity_id': 'sensor.mock_solar_inverter_voltage', + 'entity_id': 'sensor.mock_light_sensor_illuminance', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '234.899', + 'state': '1.3', }) # --- -# name: test_sensors[mock_speaker][sensor.mock_speaker_reboot_count-entry] +# name: test_sensors[mock_lock][sensor.mock_lock_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -19108,7 +20222,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_speaker_reboot_count', + 'entity_id': 'sensor.mock_lock_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19116,42 +20230,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000006B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_speaker][sensor.mock_speaker_reboot_count-state] +# name: test_sensors[mock_lock][sensor.mock_lock_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock speaker Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Mock Lock Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.mock_speaker_reboot_count', + 'entity_id': 'sensor.mock_lock_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '12', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_speaker][sensor.mock_speaker_uptime-entry] +# name: test_sensors[mock_lock][sensor.mock_lock_door_closed_events-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -19159,7 +20284,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_speaker_uptime', + 'entity_id': 'sensor.mock_lock_door_closed_events', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19167,43 +20292,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Door closed events', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Door closed events', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000006B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'door_closed_events', + 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-1-DoorLockDoorClosedEvents-257-5', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_speaker][sensor.mock_speaker_uptime-state] +# name: test_sensors[mock_lock][sensor.mock_lock_door_closed_events-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock speaker Uptime', + 'friendly_name': 'Mock Lock Door closed events', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_speaker_uptime', + 'entity_id': 'sensor.mock_lock_door_closed_events', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:58:15+00:00', + 'state': '3', }) # --- -# name: test_sensors[mock_temperature_sensor][sensor.mock_temperature_sensor_temperature-entry] +# name: test_sensors[mock_lock][sensor.mock_lock_door_open_events-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -19211,8 +20336,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_temperature_sensor_temperature', + 'entity_category': , + 'entity_id': 'sensor.mock_lock_door_open_events', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19220,56 +20345,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Door open events', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Door open events', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000026-MatterNodeDevice-1-TemperatureSensor-1026-0', - 'unit_of_measurement': , + 'translation_key': 'door_open_events', + 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-1-DoorLockDoorOpenEvents-257-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_temperature_sensor][sensor.mock_temperature_sensor_temperature-state] +# name: test_sensors[mock_lock][sensor.mock_lock_door_open_events-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Temperature Sensor Temperature', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Mock Lock Door open events', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_temperature_sensor_temperature', + 'entity_id': 'sensor.mock_lock_door_open_events', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '21.0', + 'state': '5', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_boot_reason-entry] +# name: test_sensors[mock_lock][sensor.mock_lock_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -19278,7 +20390,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_thermostat_boot_reason', + 'entity_id': 'sensor.mock_lock_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19286,45 +20398,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_boot_reason-state] +# name: test_sensors[mock_lock][sensor.mock_lock_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Thermostat Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Mock Lock Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_thermostat_boot_reason', + 'entity_id': 'sensor.mock_lock_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '1', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_heating_demand-entry] +# name: test_sensors[mock_lock][sensor.mock_lock_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19338,7 +20441,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_thermostat_heating_demand', + 'entity_id': 'sensor.mock_lock_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19346,43 +20449,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Heating demand', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating demand', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'pi_heating_demand', - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatPIHeatingDemand-513-8', - 'unit_of_measurement': '%', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000097-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_heating_demand-state] +# name: test_sensors[mock_lock][sensor.mock_lock_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Thermostat Heating demand', - 'unit_of_measurement': '%', + 'device_class': 'uptime', + 'friendly_name': 'Mock Lock Uptime', }), 'context': , - 'entity_id': 'sensor.mock_thermostat_heating_demand', + 'entity_id': 'sensor.mock_lock_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '25', + 'state': '2025-01-01T13:59:41+00:00', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_outdoor_temperature-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -19390,8 +20501,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_thermostat_outdoor_temperature', + 'entity_category': , + 'entity_id': 'sensor.mock_microwave_oven_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19399,57 +20510,59 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Outdoor temperature', + 'object_id_base': 'Boot reason', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Outdoor temperature', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'outdoor_temperature', - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatOutdoorTemperature-513-1', - 'unit_of_measurement': , + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_outdoor_temperature-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Thermostat Outdoor temperature', - 'state_class': , - 'unit_of_measurement': , - }), - 'context': , - 'entity_id': 'sensor.mock_thermostat_outdoor_temperature', - 'last_changed': , + 'device_class': 'enum', + 'friendly_name': 'Mock Microwave Oven Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_microwave_oven_boot_reason', + 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '5.0', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_reboot_count-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_estimated_end_time-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_thermostat_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_microwave_oven_estimated_end_time', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19457,43 +20570,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Estimated end time', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Estimated end time', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'estimated_end_time', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalStateCountdownTime-96-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_reboot_count-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_estimated_end_time-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Thermostat Reboot count', - 'state_class': , + 'device_class': 'timestamp', + 'friendly_name': 'Mock Microwave Oven Estimated end time', }), 'context': , - 'entity_id': 'sensor.mock_thermostat_reboot_count', + 'entity_id': 'sensor.mock_microwave_oven_estimated_end_time', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '2025-01-01T14:00:30+00:00', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_temperature-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_error-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -19501,8 +20619,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_thermostat_temperature', + 'entity_category': , + 'entity_id': 'sensor.mock_microwave_oven_operational_error', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19510,55 +20628,63 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Operational error', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Operational error', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_temperature-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_error-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Mock Thermostat Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mock Microwave Oven Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'context': , - 'entity_id': 'sensor.mock_thermostat_temperature', + 'entity_id': 'sensor.mock_microwave_oven_operational_error', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '18.0', + 'state': 'no_error', }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_uptime-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_thermostat_uptime', + 'entity_category': None, + 'entity_id': 'sensor.mock_microwave_oven_operational_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19566,51 +20692,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Operational state', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Operational state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-1-OperationalState-96-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_thermostat][sensor.mock_thermostat_uptime-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_operational_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Mock Thermostat Uptime', + 'device_class': 'enum', + 'friendly_name': 'Mock Microwave Oven Operational state', + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + ]), }), 'context': , - 'entity_id': 'sensor.mock_thermostat_uptime', + 'entity_id': 'sensor.mock_microwave_oven_operational_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:44+00:00', + 'state': 'stopped', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_boot_reason-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -19619,7 +20743,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_vacuum_boot_reason', + 'entity_id': 'sensor.mock_microwave_oven_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19627,45 +20751,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_boot_reason-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Mock Vacuum Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Mock Microwave Oven Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_vacuum_boot_reason', + 'entity_id': 'sensor.mock_microwave_oven_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '1', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_estimated_end_time-entry] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19678,8 +20793,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_vacuum_estimated_end_time', + 'entity_category': , + 'entity_id': 'sensor.mock_microwave_oven_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19687,36 +20802,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Estimated end time', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Estimated end time', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'estimated_end_time', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-ServiceAreaEstimatedEndTime-336-4', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000009D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_estimated_end_time-state] +# name: test_sensors[mock_microwave_oven][sensor.mock_microwave_oven_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'Mock Vacuum Estimated end time', + 'device_class': 'uptime', + 'friendly_name': 'Mock Microwave Oven Uptime', }), 'context': , - 'entity_id': 'sensor.mock_vacuum_estimated_end_time', + 'entity_id': 'sensor.mock_microwave_oven_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-08-29T21:00:00+00:00', + 'state': '2025-01-01T13:59:44+00:00', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_error-entry] +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19724,25 +20839,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - 'failed_to_find_charging_dock', - 'stuck', - 'dust_bin_missing', - 'dust_bin_full', - 'water_tank_empty', - 'water_tank_missing', - 'water_tank_lid_open', - 'mop_cleaning_pad_missing', - 'low_battery', - 'cannot_reach_target_area', - 'dirty_water_tank_full', - 'dirty_water_tank_missing', - 'wheels_jammed', - 'brush_jammed', - 'navigation_sensor_obscured', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -19752,7 +20855,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_vacuum_operational_error', + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19760,57 +20863,149 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-RvcOperationalStateOperationalError-97-5', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_error-state] +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Vacuum Operational error', + 'friendly_name': 'Mock Mounted dimmable load control Boot reason', 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - 'failed_to_find_charging_dock', - 'stuck', - 'dust_bin_missing', - 'dust_bin_full', - 'water_tank_empty', - 'water_tank_missing', - 'water_tank_lid_open', - 'mop_cleaning_pad_missing', - 'low_battery', - 'cannot_reach_target_area', - 'dirty_water_tank_full', - 'dirty_water_tank_missing', - 'wheels_jammed', - 'brush_jammed', - 'navigation_sensor_obscured', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'context': , - 'entity_id': 'sensor.mock_vacuum_operational_error', + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': 'unavailable', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_state-entry] +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Mounted dimmable load control Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000000E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_mounted_dimmable_load_control_fixture][sensor.mock_mounted_dimmable_load_control_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Mock Mounted dimmable load control Uptime', + }), + 'context': , + 'entity_id': 'sensor.mock_mounted_dimmable_load_control_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19818,13 +21013,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'seeking_charger', - 'charging', - 'docked', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -19833,8 +21028,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_vacuum_operational_state', + 'entity_category': , + 'entity_id': 'sensor.mock_onoff_light_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19842,45 +21037,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-RvcOperationalState-97-4', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_state-state] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Vacuum Operational state', + 'friendly_name': 'Mock OnOff Light Boot reason', 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'seeking_charger', - 'charging', - 'docked', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'context': , - 'entity_id': 'sensor.mock_vacuum_operational_state', + 'entity_id': 'sensor.mock_onoff_light_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'stopped', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_reboot_count-entry] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19896,7 +21091,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_vacuum_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19915,25 +21110,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_reboot_count-state] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Vacuum Reboot count', + 'friendly_name': 'Mock OnOff Light Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_vacuum_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '6', }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_uptime-entry] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -19947,7 +21142,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_vacuum_uptime', + 'entity_id': 'sensor.mock_onoff_light_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -19966,39 +21161,41 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_uptime-state] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Vacuum Uptime', + 'friendly_name': 'Mock OnOff Light Uptime', }), 'context': , - 'entity_id': 'sensor.mock_vacuum_uptime', + 'entity_id': 'sensor.mock_onoff_light_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:13+00:00', + 'state': '2025-01-01T05:18:41+00:00', }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_auto_close_time-entry] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_wi_fi_rssi-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.mock_valve_auto_close_time', + 'entity_category': , + 'entity_id': 'sensor.mock_onoff_light_wi_fi_rssi', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20006,36 +21203,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Auto-close time', + 'object_id_base': 'Wi-Fi RSSI', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Auto-close time', + 'original_name': 'Wi-Fi RSSI', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'auto_close_time', - 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-1-ValveConfigurationAndControlAutoCloseTime-129-2', - 'unit_of_measurement': None, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000001E-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_auto_close_time-state] +# name: test_sensors[mock_onoff_light][sensor.mock_onoff_light_wi_fi_rssi-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', - 'friendly_name': 'Mock Valve Auto-close time', + 'device_class': 'signal_strength', + 'friendly_name': 'Mock OnOff Light Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', }), 'context': , - 'entity_id': 'sensor.mock_valve_auto_close_time', + 'entity_id': 'sensor.mock_onoff_light_wi_fi_rssi', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T00:00:00+00:00', + 'state': '-61', }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_boot_reason-entry] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_boot_reason_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20059,7 +21258,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_valve_boot_reason', + 'entity_id': 'sensor.mock_onoff_light_boot_reason_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20078,15 +21277,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_boot_reason-state] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_boot_reason_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Mock Valve Boot reason', + 'friendly_name': 'Mock OnOff Light Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -20098,14 +21297,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.mock_valve_boot_reason', + 'entity_id': 'sensor.mock_onoff_light_boot_reason_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_reboot_count-entry] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_reboot_count_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20121,7 +21320,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_valve_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_reboot_count_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20140,25 +21339,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_reboot_count-state] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_reboot_count_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Valve Reboot count', + 'friendly_name': 'Mock OnOff Light Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_valve_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_reboot_count_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '6', }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_uptime-entry] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_uptime_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20172,7 +21371,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_valve_uptime', + 'entity_id': 'sensor.mock_onoff_light_uptime_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20191,32 +21390,32 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_valve][sensor.mock_valve_uptime-state] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_uptime_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Mock Valve Uptime', + 'friendly_name': 'Mock OnOff Light Uptime', }), 'context': , - 'entity_id': 'sensor.mock_valve_uptime', + 'entity_id': 'sensor.mock_onoff_light_uptime_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:58:43+00:00', + 'state': '2025-01-01T05:18:41+00:00', }) # --- -# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_reboot_count-entry] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_wi_fi_rssi_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -20225,7 +21424,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_full_window_covering_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_wi_fi_rssi_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20233,42 +21432,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Wi-Fi RSSI', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Wi-Fi RSSI', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000032-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000001B-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', }) # --- -# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_reboot_count-state] +# name: test_sensors[mock_onoff_light_alt_name][sensor.mock_onoff_light_wi_fi_rssi_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Full Window Covering Reboot count', - 'state_class': , + 'device_class': 'signal_strength', + 'friendly_name': 'Mock OnOff Light Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', }), 'context': , - 'entity_id': 'sensor.mock_full_window_covering_reboot_count', + 'entity_id': 'sensor.mock_onoff_light_wi_fi_rssi_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '-61', }) # --- -# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_target_opening_position-entry] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -20276,7 +21487,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_full_window_covering_target_opening_position', + 'entity_id': 'sensor.mock_light_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20284,36 +21495,45 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Target opening position', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Target opening position', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'window_covering_target_position', - 'unique_id': '00000000000004D2-0000000000000032-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', - 'unit_of_measurement': '%', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_target_opening_position-state] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Full Window Covering Target opening position', - 'unit_of_measurement': '%', + 'device_class': 'enum', + 'friendly_name': 'Mock Light Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.mock_full_window_covering_target_opening_position', + 'entity_id': 'sensor.mock_light_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_reboot_count-entry] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20329,7 +21549,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_lift_window_covering_reboot_count', + 'entity_id': 'sensor.mock_light_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20348,41 +21568,31 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000033-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_reboot_count-state] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Lift Window Covering Reboot count', + 'friendly_name': 'Mock Light Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_lift_window_covering_reboot_count', + 'entity_id': 'sensor.mock_light_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '6', }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_boot_reason-entry] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -20390,7 +21600,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_wncv_da01_boot_reason', + 'entity_id': 'sensor.mock_light_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20398,52 +21608,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_boot_reason-state] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Longan link WNCV DA01 Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'uptime', + 'friendly_name': 'Mock Light Uptime', }), 'context': , - 'entity_id': 'sensor.longan_link_wncv_da01_boot_reason', + 'entity_id': 'sensor.mock_light_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'software_reset', + 'state': '2025-01-01T05:18:41+00:00', }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_reboot_count-entry] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_wi_fi_rssi-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -20452,7 +21653,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_wncv_da01_reboot_count', + 'entity_id': 'sensor.mock_light_wi_fi_rssi', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20460,42 +21661,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Wi-Fi RSSI', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Wi-Fi RSSI', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000001C-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_reboot_count-state] +# name: test_sensors[mock_onoff_light_no_name][sensor.mock_light_wi_fi_rssi-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Longan link WNCV DA01 Reboot count', - 'state_class': , + 'device_class': 'signal_strength', + 'friendly_name': 'Mock Light Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', }), 'context': , - 'entity_id': 'sensor.longan_link_wncv_da01_reboot_count', + 'entity_id': 'sensor.mock_light_wi_fi_rssi', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '35', + 'state': '-61', }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_target_opening_position-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -20503,7 +21716,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.longan_link_wncv_da01_target_opening_position', + 'entity_id': 'sensor.mock_oven_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20511,50 +21724,65 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Target opening position', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Target opening position', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'window_covering_target_position', - 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', - 'unit_of_measurement': '%', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_target_opening_position-state] +# name: test_sensors[mock_oven][sensor.mock_oven_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Longan link WNCV DA01 Target opening position', - 'unit_of_measurement': '%', + 'device_class': 'enum', + 'friendly_name': 'Mock Oven Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.longan_link_wncv_da01_target_opening_position', + 'entity_id': 'sensor.mock_oven_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': 'unspecified', }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_uptime-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_current_phase-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'options': list([ + 'pre-heating', + 'pre-heated', + 'cooling down', + ]), + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.longan_link_wncv_da01_uptime', + 'entity_category': None, + 'entity_id': 'sensor.mock_oven_current_phase', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20562,43 +21790,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Current phase', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Current phase', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'current_phase', + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-OvenCavityOperationalStateCurrentPhase-72-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_uptime-state] +# name: test_sensors[mock_oven][sensor.mock_oven_current_phase-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Longan link WNCV DA01 Uptime', + 'device_class': 'enum', + 'friendly_name': 'Mock Oven Current phase', + 'options': list([ + 'pre-heating', + 'pre-heated', + 'cooling down', + ]), }), 'context': , - 'entity_id': 'sensor.longan_link_wncv_da01_uptime', + 'entity_id': 'sensor.mock_oven_current_phase', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:57:57+00:00', + 'state': 'pre-heating', }) # --- -# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_reboot_count-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_operational_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'stopped', + 'running', + 'error', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -20606,8 +21843,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.mock_pa_tilt_window_covering_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_oven_operational_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20615,36 +21852,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Operational state', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Operational state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000034-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-OvenCavityOperationalState-72-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_reboot_count-state] +# name: test_sensors[mock_oven][sensor.mock_oven_operational_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock PA Tilt Window Covering Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Mock Oven Operational state', + 'options': list([ + 'stopped', + 'running', + 'error', + ]), }), 'context': , - 'entity_id': 'sensor.mock_pa_tilt_window_covering_reboot_count', + 'entity_id': 'sensor.mock_oven_operational_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': 'running', }) # --- -# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_reboot_count-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20660,7 +21902,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.mock_tilt_window_covering_reboot_count', + 'entity_id': 'sensor.mock_oven_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20679,40 +21921,32 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000035-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_reboot_count-state] +# name: test_sensors[mock_oven][sensor.mock_oven_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Mock Tilt Window Covering Reboot count', + 'friendly_name': 'Mock Oven Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.mock_tilt_window_covering_reboot_count', + 'entity_id': 'sensor.mock_oven_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1', }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_boot_reason-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_temperature_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -20720,8 +21954,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.d215s_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.mock_oven_temperature_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20729,52 +21963,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Temperature (2)', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Temperature (2)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-2-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_boot_reason-state] +# name: test_sensors[mock_oven][sensor.mock_oven_temperature_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'D215S Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Mock Oven Temperature (2)', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.d215s_boot_reason', + 'entity_id': 'sensor.mock_oven_temperature_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unspecified', + 'state': '65.55', }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_reboot_count-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_temperature_4-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -20782,8 +22012,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.d215s_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_oven_temperature_4', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20791,36 +22021,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Temperature (4)', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Temperature (4)', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-4-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_reboot_count-state] +# name: test_sensors[mock_oven][sensor.mock_oven_temperature_4-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'D215S Reboot count', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'Mock Oven Temperature (4)', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.d215s_reboot_count', + 'entity_id': 'sensor.mock_oven_temperature_4', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': '0.0', }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_uptime-entry] +# name: test_sensors[mock_oven][sensor.mock_oven_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -20834,7 +22069,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.d215s_uptime', + 'entity_id': 'sensor.mock_oven_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20853,32 +22088,32 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000029-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_uptime-state] +# name: test_sensors[mock_oven][sensor.mock_oven_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'D215S Uptime', + 'friendly_name': 'Mock Oven Uptime', }), 'context': , - 'entity_id': 'sensor.d215s_uptime', + 'entity_id': 'sensor.mock_oven_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-12-05T00:36:53+00:00', + 'state': '2025-01-01T13:59:34+00:00', }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_reboot_count-entry] +# name: test_sensors[mock_pressure_sensor][sensor.mock_pressure_sensor_pressure-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -20886,8 +22121,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.x2s_smart_thermostat_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_pressure_sensor_pressure', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20895,43 +22130,55 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Pressure', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Pressure', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000001F-MatterNodeDevice-1-PressureSensor-1027-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_reboot_count-state] +# name: test_sensors[mock_pressure_sensor][sensor.mock_pressure_sensor_pressure-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'X2S Smart Thermostat Reboot count', - 'state_class': , + 'device_class': 'pressure', + 'friendly_name': 'Mock Pressure Sensor Pressure', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.x2s_smart_thermostat_reboot_count', + 'entity_id': 'sensor.mock_pressure_sensor_pressure', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2', + 'state': '0.0', }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_temperature-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_control_mode-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'constant_speed', + 'constant_pressure', + 'proportional_pressure', + 'constant_flow', + 'constant_temperature', + 'automatic', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -20940,7 +22187,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.x2s_smart_thermostat_temperature', + 'entity_id': 'sensor.mock_pump_control_mode', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -20948,55 +22195,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Temperature', + 'object_id_base': 'Control mode', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Control mode', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', - 'unit_of_measurement': , + 'translation_key': 'pump_control_mode', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PumpControlMode-512-33', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_temperature-state] +# name: test_sensors[mock_pump][sensor.mock_pump_control_mode-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'X2S Smart Thermostat Temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'Mock Pump Control mode', + 'options': list([ + 'constant_speed', + 'constant_pressure', + 'proportional_pressure', + 'constant_flow', + 'constant_temperature', + 'automatic', + ]), }), 'context': , - 'entity_id': 'sensor.x2s_smart_thermostat_temperature', + 'entity_id': 'sensor.mock_pump_control_mode', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '20.55', + 'state': 'constant_temperature', }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_uptime-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_flow-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.x2s_smart_thermostat_uptime', + 'entity_category': None, + 'entity_id': 'sensor.mock_pump_flow', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21004,36 +22256,37 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Flow', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Flow', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'flow', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-FlowSensor-1028-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_uptime-state] +# name: test_sensors[mock_pump][sensor.mock_pump_flow-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'X2S Smart Thermostat Uptime', + 'friendly_name': 'Mock Pump Flow', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.x2s_smart_thermostat_uptime', + 'entity_id': 'sensor.mock_pump_flow', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T12:34:55+00:00', + 'state': '5.0', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_pressure-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21048,8 +22301,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_battery', + 'entity_category': None, + 'entity_id': 'sensor.mock_pump_pressure', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21057,49 +22310,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery', + 'object_id_base': 'Pressure', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery', + 'original_name': 'Pressure', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-PowerSource-47-12', - 'unit_of_measurement': '%', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PressureSensor-1027-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery-state] +# name: test_sensors[mock_pump][sensor.mock_pump_pressure-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'Robotic Vacuum Cleaner Battery', + 'device_class': 'pressure', + 'friendly_name': 'Mock Pump Pressure', 'state_class': , - 'unit_of_measurement': '%', + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_battery', + 'entity_id': 'sensor.mock_pump_pressure', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '100', + 'state': '10.0', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery_charge_state-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'not_charging', - 'charging', - 'full_charge', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21108,7 +22360,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_battery_charge_state', + 'entity_id': 'sensor.mock_pump_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21116,68 +22368,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Battery charge state', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Battery charge state', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'battery_charge_state', - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-PowerSourceBatChargeState-47-26', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery_charge_state-state] +# name: test_sensors[mock_pump][sensor.mock_pump_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Robotic Vacuum Cleaner Battery charge state', - 'options': list([ - 'not_charging', - 'charging', - 'full_charge', - ]), + 'friendly_name': 'Mock Pump Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_battery_charge_state', + 'entity_id': 'sensor.mock_pump_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'full_charge', + 'state': '1', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_error-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_rotation_speed-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - 'failed_to_find_charging_dock', - 'stuck', - 'dust_bin_missing', - 'dust_bin_full', - 'water_tank_empty', - 'water_tank_missing', - 'water_tank_lid_open', - 'mop_cleaning_pad_missing', - 'low_battery', - 'cannot_reach_target_area', - 'dirty_water_tank_full', - 'dirty_water_tank_missing', - 'wheels_jammed', - 'brush_jammed', - 'navigation_sensor_obscured', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21185,8 +22412,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_error', + 'entity_category': None, + 'entity_id': 'sensor.mock_pump_rotation_speed', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21194,72 +22421,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'Rotation speed', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'Rotation speed', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-RvcOperationalStateOperationalError-97-5', - 'unit_of_measurement': None, + 'translation_key': 'pump_speed', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-PumpSpeed-512-20', + 'unit_of_measurement': 'rpm', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_error-state] +# name: test_sensors[mock_pump][sensor.mock_pump_rotation_speed-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Robotic Vacuum Cleaner Operational error', - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - 'failed_to_find_charging_dock', - 'stuck', - 'dust_bin_missing', - 'dust_bin_full', - 'water_tank_empty', - 'water_tank_missing', - 'water_tank_lid_open', - 'mop_cleaning_pad_missing', - 'low_battery', - 'cannot_reach_target_area', - 'dirty_water_tank_full', - 'dirty_water_tank_missing', - 'wheels_jammed', - 'brush_jammed', - 'navigation_sensor_obscured', - ]), + 'friendly_name': 'Mock Pump Rotation speed', + 'state_class': , + 'unit_of_measurement': 'rpm', }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_error', + 'entity_id': 'sensor.mock_pump_rotation_speed', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': '1000', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_state-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'seeking_charger', - 'charging', - 'docked', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21268,7 +22467,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_state', + 'entity_id': 'sensor.mock_pump_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21276,53 +22475,47 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-RvcOperationalState-97-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-1-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_state-state] +# name: test_sensors[mock_pump][sensor.mock_pump_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Robotic Vacuum Cleaner Operational state', - 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'seeking_charger', - 'charging', - 'docked', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Mock Pump Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_state', + 'entity_id': 'sensor.mock_pump_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'docked', + 'state': '60.0', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_reboot_count-entry] +# name: test_sensors[mock_pump][sensor.mock_pump_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -21330,7 +22523,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_reboot_count', + 'entity_id': 'sensor.mock_pump_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21338,42 +22531,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000002C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_reboot_count-state] +# name: test_sensors[mock_pump][sensor.mock_pump_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Robotic Vacuum Cleaner Reboot count', - 'state_class': , + 'device_class': 'uptime', + 'friendly_name': 'Mock Pump Uptime', }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_reboot_count', + 'entity_id': 'sensor.mock_pump_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '296', + 'state': '2025-01-01T13:55:18+00:00', }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_uptime-entry] +# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -21381,7 +22576,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_uptime', + 'entity_id': 'sensor.room_airconditioner_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21389,51 +22584,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000003B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_uptime-state] +# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Robotic Vacuum Cleaner Uptime', + 'friendly_name': 'Room AirConditioner Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.robotic_vacuum_cleaner_uptime', + 'entity_id': 'sensor.room_airconditioner_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:52+00:00', + 'state': '0', }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_boot_reason-entry] +# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21441,8 +22628,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.secuyou_smart_lock_boot_reason', + 'entity_category': None, + 'entity_id': 'sensor.room_airconditioner_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21450,52 +22637,48 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Temperature', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Temperature', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000003B-MatterNodeDevice-2-TemperatureSensor-1026-0', + 'unit_of_measurement': , }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_boot_reason-state] +# name: test_sensors[mock_room_airconditioner][sensor.room_airconditioner_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Secuyou Smart Lock Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'device_class': 'temperature', + 'friendly_name': 'Room AirConditioner Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.secuyou_smart_lock_boot_reason', + 'entity_id': 'sensor.room_airconditioner_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': '0.0', }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_reboot_count-entry] +# name: test_sensors[mock_soil_sensor][sensor.mock_soil_sensor_moisture-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21503,8 +22686,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.secuyou_smart_lock_reboot_count', + 'entity_category': None, + 'entity_id': 'sensor.mock_soil_sensor_moisture', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21512,42 +22695,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Moisture', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Moisture', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000065-MatterNodeDevice-1-SoilMoistureSensor-1072-1', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_reboot_count-state] +# name: test_sensors[mock_soil_sensor][sensor.mock_soil_sensor_moisture-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Secuyou Smart Lock Reboot count', - 'state_class': , + 'device_class': 'moisture', + 'friendly_name': 'Mock Soil Sensor Moisture', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.secuyou_smart_lock_reboot_count', + 'entity_id': 'sensor.mock_soil_sensor_moisture', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '50', }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_uptime-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_active_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -21555,7 +22742,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.secuyou_smart_lock_uptime', + 'entity_id': 'sensor.mock_solar_inverter_active_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21563,36 +22750,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Active current', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Active current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , }) # --- -# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_uptime-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_active_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Secuyou Smart Lock Uptime', + 'device_class': 'current', + 'friendly_name': 'Mock solar inverter Active current', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.secuyou_smart_lock_uptime', + 'entity_id': 'sensor.mock_solar_inverter_active_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2024-09-16T14:46:00+00:00', + 'state': '-3.62', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_boot_reason-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21616,7 +22811,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dishwasher_boot_reason', + 'entity_id': 'sensor.mock_solar_inverter_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21635,15 +22830,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_boot_reason-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Dishwasher Boot reason', + 'friendly_name': 'Mock solar inverter Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -21655,21 +22850,21 @@ ]), }), 'context': , - 'entity_id': 'sensor.dishwasher_boot_reason', + 'entity_id': 'sensor.mock_solar_inverter_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'unspecified', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_current-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_energy_exported-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -21677,8 +22872,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.dishwasher_effective_current', + 'entity_category': None, + 'entity_id': 'sensor.mock_solar_inverter_energy_exported', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21686,44 +22881,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective current', + 'object_id_base': 'Energy exported', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 3, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Effective current', + 'original_name': 'Energy exported', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_current', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementRMSCurrent-144-12', - 'unit_of_measurement': , + 'translation_key': 'energy_exported', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyExported-145-2', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_current-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_energy_exported-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'Dishwasher Effective current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'energy', + 'friendly_name': 'Mock solar inverter Energy exported', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.dishwasher_effective_current', + 'entity_id': 'sensor.mock_solar_inverter_energy_exported', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '42.279', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_voltage-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21738,8 +22933,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.dishwasher_effective_voltage', + 'entity_category': None, + 'entity_id': 'sensor.mock_solar_inverter_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21747,44 +22942,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective voltage', + 'object_id_base': 'Power', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 0, + 'suggested_display_precision': 2, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Effective voltage', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_voltage', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementRMSVoltage-144-11', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_voltage-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'Dishwasher Effective voltage', + 'device_class': 'power', + 'friendly_name': 'Mock solar inverter Power', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.dishwasher_effective_voltage', + 'entity_id': 'sensor.mock_solar_inverter_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '120.0', + 'state': '-850.0', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_energy-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21799,8 +22994,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.dishwasher_energy', + 'entity_category': , + 'entity_id': 'sensor.mock_solar_inverter_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21808,57 +23003,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_energy-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'Dishwasher Energy', + 'friendly_name': 'Mock solar inverter Reboot count', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.dishwasher_energy', + 'entity_id': 'sensor.mock_solar_inverter_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '1', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_error-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -21866,7 +23046,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dishwasher_operational_error', + 'entity_id': 'sensor.mock_solar_inverter_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21874,42 +23054,4437 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_error-state] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Dishwasher Operational error', - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - ]), + 'device_class': 'uptime', + 'friendly_name': 'Mock solar inverter Uptime', }), 'context': , - 'entity_id': 'sensor.dishwasher_operational_error', + 'entity_id': 'sensor.mock_solar_inverter_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': '2025-01-01T13:59:23+00:00', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_state-entry] +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_solar_inverter_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'voltage', + 'unique_id': '00000000000004D2-0000000000000022-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[mock_solar_inverter][sensor.mock_solar_inverter_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'Mock solar inverter Voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.mock_solar_inverter_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '234.899', + }) +# --- +# name: test_sensors[mock_speaker][sensor.mock_speaker_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_speaker_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000006B-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_speaker][sensor.mock_speaker_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock speaker Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_speaker_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '12', + }) +# --- +# name: test_sensors[mock_speaker][sensor.mock_speaker_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_speaker_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000006B-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_speaker][sensor.mock_speaker_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Mock speaker Uptime', + }), + 'context': , + 'entity_id': 'sensor.mock_speaker_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:58:15+00:00', + }) +# --- +# name: test_sensors[mock_temperature_sensor][sensor.mock_temperature_sensor_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_temperature_sensor_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000026-MatterNodeDevice-1-TemperatureSensor-1026-0', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[mock_temperature_sensor][sensor.mock_temperature_sensor_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Mock Temperature Sensor Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.mock_temperature_sensor_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '21.0', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_thermostat_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Thermostat Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unspecified', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_heating_demand-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_thermostat_heating_demand', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Heating demand', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Heating demand', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'pi_heating_demand', + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatPIHeatingDemand-513-8', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_heating_demand-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Thermostat Heating demand', + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_heating_demand', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_outdoor_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_thermostat_outdoor_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Outdoor temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Outdoor temperature', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'outdoor_temperature', + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatOutdoorTemperature-513-1', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_outdoor_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Mock Thermostat Outdoor temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_outdoor_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '5.0', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_thermostat_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Thermostat Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_thermostat_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Mock Thermostat Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '18.0', + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_thermostat_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000096-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_thermostat][sensor.mock_thermostat_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Mock Thermostat Uptime', + }), + 'context': , + 'entity_id': 'sensor.mock_thermostat_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:59:44+00:00', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_vacuum_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Vacuum Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unspecified', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_estimated_end_time-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_vacuum_estimated_end_time', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Estimated end time', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Estimated end time', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'estimated_end_time', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-ServiceAreaEstimatedEndTime-336-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_estimated_end_time-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'timestamp', + 'friendly_name': 'Mock Vacuum Estimated end time', + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_estimated_end_time', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-08-29T21:00:00+00:00', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_error-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + 'failed_to_find_charging_dock', + 'stuck', + 'dust_bin_missing', + 'dust_bin_full', + 'water_tank_empty', + 'water_tank_missing', + 'water_tank_lid_open', + 'mop_cleaning_pad_missing', + 'low_battery', + 'cannot_reach_target_area', + 'dirty_water_tank_full', + 'dirty_water_tank_missing', + 'wheels_jammed', + 'brush_jammed', + 'navigation_sensor_obscured', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_vacuum_operational_error', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational error', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational error', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-RvcOperationalStateOperationalError-97-5', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_error-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Vacuum Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + 'failed_to_find_charging_dock', + 'stuck', + 'dust_bin_missing', + 'dust_bin_full', + 'water_tank_empty', + 'water_tank_missing', + 'water_tank_lid_open', + 'mop_cleaning_pad_missing', + 'low_battery', + 'cannot_reach_target_area', + 'dirty_water_tank_full', + 'dirty_water_tank_missing', + 'wheels_jammed', + 'brush_jammed', + 'navigation_sensor_obscured', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_operational_error', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'no_error', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'seeking_charger', + 'charging', + 'docked', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_vacuum_operational_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-1-RvcOperationalState-97-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_operational_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Vacuum Operational state', + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'seeking_charger', + 'charging', + 'docked', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_operational_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'stopped', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_vacuum_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Vacuum Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_vacuum_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000042-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_vacuum_cleaner][sensor.mock_vacuum_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Mock Vacuum Uptime', + }), + 'context': , + 'entity_id': 'sensor.mock_vacuum_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:59:13+00:00', + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_auto_close_time-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mock_valve_auto_close_time', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Auto-close time', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Auto-close time', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'auto_close_time', + 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-1-ValveConfigurationAndControlAutoCloseTime-129-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_auto_close_time-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'timestamp', + 'friendly_name': 'Mock Valve Auto-close time', + }), + 'context': , + 'entity_id': 'sensor.mock_valve_auto_close_time', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T00:00:00+00:00', + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_valve_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Mock Valve Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_valve_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unspecified', + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_valve_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Valve Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_valve_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_valve_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000003C-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_valve][sensor.mock_valve_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Mock Valve Uptime', + }), + 'context': , + 'entity_id': 'sensor.mock_valve_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:58:43+00:00', + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_full_window_covering_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000032-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Full Window Covering Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_full_window_covering_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_target_opening_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_full_window_covering_target_opening_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Target opening position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Target opening position', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'window_covering_target_position', + 'unique_id': '00000000000004D2-0000000000000032-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_target_opening_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Full Window Covering Target opening position', + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.mock_full_window_covering_target_opening_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100', + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_full_window_covering_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000032-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_window_covering_full][sensor.mock_full_window_covering_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Mock Full Window Covering Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.mock_full_window_covering_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-88', + }) +# --- +# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_lift_window_covering_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000033-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Lift Window Covering Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_lift_window_covering_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_lift_window_covering_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000033-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_window_covering_lift][sensor.mock_lift_window_covering_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Mock Lift Window Covering Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.mock_lift_window_covering_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-88', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.longan_link_wncv_da01_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Longan link WNCV DA01 Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.longan_link_wncv_da01_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'software_reset', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.longan_link_wncv_da01_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Longan link WNCV DA01 Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.longan_link_wncv_da01_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '35', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_target_opening_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.longan_link_wncv_da01_target_opening_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Target opening position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Target opening position', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'window_covering_target_position', + 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-1-TargetPositionLiftPercent100ths-258-11', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_target_opening_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Longan link WNCV DA01 Target opening position', + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.longan_link_wncv_da01_target_opening_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.longan_link_wncv_da01_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Longan link WNCV DA01 Uptime', + }), + 'context': , + 'entity_id': 'sensor.longan_link_wncv_da01_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:57:57+00:00', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.longan_link_wncv_da01_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000027-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_window_covering_pa_lift][sensor.longan_link_wncv_da01_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Longan link WNCV DA01 Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.longan_link_wncv_da01_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-36', + }) +# --- +# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_pa_tilt_window_covering_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000034-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock PA Tilt Window Covering Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_pa_tilt_window_covering_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_pa_tilt_window_covering_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000034-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_window_covering_pa_tilt][sensor.mock_pa_tilt_window_covering_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Mock PA Tilt Window Covering Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.mock_pa_tilt_window_covering_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-88', + }) +# --- +# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_tilt_window_covering_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000035-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Mock Tilt Window Covering Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.mock_tilt_window_covering_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_tilt_window_covering_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000035-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[mock_window_covering_tilt][sensor.mock_tilt_window_covering_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'Mock Tilt Window Covering Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.mock_tilt_window_covering_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-88', + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.d215s_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'D215S Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.d215s_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unspecified', + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.d215s_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'D215S Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.d215s_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1', + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.d215s_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'D215S Uptime', + }), + 'context': , + 'entity_id': 'sensor.d215s_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2024-12-05T00:36:53+00:00', + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.d215s_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-0000000000000030-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[onoff_light_with_levelcontrol_present][sensor.d215s_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'D215S Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.d215s_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-43', + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.x2s_smart_thermostat_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'X2S Smart Thermostat Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.x2s_smart_thermostat_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2', + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.x2s_smart_thermostat_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-1-ThermostatLocalTemperature-513-0', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'X2S Smart Thermostat Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.x2s_smart_thermostat_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '20.55', + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.x2s_smart_thermostat_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000002D-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[resideo_x2s_thermostat][sensor.x2s_smart_thermostat_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'X2S Smart Thermostat Uptime', + }), + 'context': , + 'entity_id': 'sensor.x2s_smart_thermostat_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T12:34:55+00:00', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-PowerSource-47-12', + 'unit_of_measurement': '%', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Robotic Vacuum Cleaner Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery_charge_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'not_charging', + 'charging', + 'full_charge', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_battery_charge_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery charge state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery charge state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_charge_state', + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-PowerSourceBatChargeState-47-26', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_battery_charge_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Robotic Vacuum Cleaner Battery charge state', + 'options': list([ + 'not_charging', + 'charging', + 'full_charge', + ]), + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_battery_charge_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'full_charge', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_error-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + 'failed_to_find_charging_dock', + 'stuck', + 'dust_bin_missing', + 'dust_bin_full', + 'water_tank_empty', + 'water_tank_missing', + 'water_tank_lid_open', + 'mop_cleaning_pad_missing', + 'low_battery', + 'cannot_reach_target_area', + 'dirty_water_tank_full', + 'dirty_water_tank_missing', + 'wheels_jammed', + 'brush_jammed', + 'navigation_sensor_obscured', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_error', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational error', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational error', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-RvcOperationalStateOperationalError-97-5', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_error-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Robotic Vacuum Cleaner Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + 'failed_to_find_charging_dock', + 'stuck', + 'dust_bin_missing', + 'dust_bin_full', + 'water_tank_empty', + 'water_tank_missing', + 'water_tank_lid_open', + 'mop_cleaning_pad_missing', + 'low_battery', + 'cannot_reach_target_area', + 'dirty_water_tank_full', + 'dirty_water_tank_missing', + 'wheels_jammed', + 'brush_jammed', + 'navigation_sensor_obscured', + ]), + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_error', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'no_error', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'seeking_charger', + 'charging', + 'docked', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-1-RvcOperationalState-97-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_operational_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Robotic Vacuum Cleaner Operational state', + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'seeking_charger', + 'charging', + 'docked', + ]), + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_operational_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'docked', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Robotic Vacuum Cleaner Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '296', + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-00000000000000CA-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[roborock_saros_10][sensor.robotic_vacuum_cleaner_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Robotic Vacuum Cleaner Uptime', + }), + 'context': , + 'entity_id': 'sensor.robotic_vacuum_cleaner_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:59:52+00:00', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Secuyou Smart Lock Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'power_on_reboot', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Secuyou Smart Lock Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '6', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_channel-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_channel', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread channel', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread channel', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_channel-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Secuyou Smart Lock Thread channel', + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_channel', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '15', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_network_name-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_network_name', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread network name', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread network name', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_network_name-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Secuyou Smart Lock Thread network name', + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_network_name', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'ha-thread-a2f2', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_routing_role-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_routing_role', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread routing role', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Thread routing role', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_thread_routing_role-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Secuyou Smart Lock Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_thread_routing_role', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'sleepy_end_device', + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.secuyou_smart_lock_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000002A-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[secuyou_smart_lock][sensor.secuyou_smart_lock_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Secuyou Smart Lock Uptime', + }), + 'context': , + 'entity_id': 'sensor.secuyou_smart_lock_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2024-09-16T14:46:00+00:00', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_boot_reason-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_boot_reason', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Boot reason', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boot reason', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_boot_reason-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Dishwasher Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), + }), + 'context': , + 'entity_id': 'sensor.dishwasher_boot_reason', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'power_on_reboot', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_effective_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Effective current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Effective current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'rms_current', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementRMSCurrent-144-12', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'Dishwasher Effective current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.dishwasher_effective_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_effective_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Effective voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Effective voltage', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'rms_voltage', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementRMSVoltage-144-11', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_effective_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'Dishwasher Effective voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.dishwasher_effective_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '120.0', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.dishwasher_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Dishwasher Energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.dishwasher_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_error-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_operational_error', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational error', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational error', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_error-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Dishwasher Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), + }), + 'context': , + 'entity_id': 'sensor.dishwasher_operational_error', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'no_error', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'extra_state', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.dishwasher_operational_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Operational state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Operational state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-OperationalState-96-4', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Dishwasher Operational state', + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + 'extra_state', + ]), + }), + 'context': , + 'entity_id': 'sensor.dishwasher_operational_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'stopped', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.dishwasher_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Dishwasher Power', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.dishwasher_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_reboot_count-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_reboot_count', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reboot count', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reboot count', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_reboot_count-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Dishwasher Reboot count', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.dishwasher_reboot_count', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '6', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_channel-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_thread_channel', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread channel', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread channel', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_channel-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Dishwasher Thread channel', + }), + 'context': , + 'entity_id': 'sensor.dishwasher_thread_channel', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_network_name-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_thread_network_name', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread network name', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread network name', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_network_name-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Dishwasher Thread network name', + }), + 'context': , + 'entity_id': 'sensor.dishwasher_thread_network_name', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '**REDACTED**', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_routing_role-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_thread_routing_role', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread routing role', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Thread routing role', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_thread_routing_role-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Dishwasher Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'context': , + 'entity_id': 'sensor.dishwasher_thread_routing_role', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'router', + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_uptime-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.dishwasher_uptime', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Uptime', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Uptime', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_dishwasher][sensor.dishwasher_uptime-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'uptime', + 'friendly_name': 'Dishwasher Uptime', + }), + 'context': , + 'entity_id': 'sensor.dishwasher_uptime', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-01-01T13:59:50+00:00', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_active_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_active_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Active current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Active current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'active_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_active_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'evse Active current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_active_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_apparent_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'apparent_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementApparentCurrent-144-7', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'evse Apparent current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_apparent_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementApparentPower-144-10', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'apparent_power', + 'friendly_name': 'evse Apparent power', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_appliance_energy_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'offline', + 'online', + 'fault', + 'power_adjust_active', + 'paused', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_appliance_energy_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Appliance energy state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Appliance energy state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'esa_state', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ESAState-152-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_appliance_energy_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'evse Appliance energy state', + 'options': list([ + 'offline', + 'online', + 'fault', + 'power_adjust_active', + 'paused', + ]), + }), + 'context': , + 'entity_id': 'sensor.evse_appliance_energy_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'online', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_circuit_capacity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_circuit_capacity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Circuit capacity', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Circuit capacity', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'evse_circuit_capacity', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseCircuitCapacity-153-5', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_circuit_capacity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'evse Circuit capacity', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_circuit_capacity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '32.0', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_effective_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_effective_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Effective current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Effective current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'rms_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementRMSCurrent-144-12', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_effective_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'evse Effective current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_effective_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_effective_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_effective_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Effective voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Effective voltage', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'rms_voltage', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementRMSVoltage-144-11', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_effective_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'evse Effective voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_effective_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.evse_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'evse Energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy_exported-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.evse_energy_exported', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy exported', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy exported', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_exported', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyExported-145-2', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy_exported-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'evse Energy exported', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_energy_exported', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy_optimization_opt_out-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'no_opt_out', + 'local_opt_out', + 'grid_opt_out', + 'opt_out', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_energy_optimization_opt_out', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy optimization opt-out', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy optimization opt-out', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'esa_opt_out_state', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ESAOptOutState-152-7', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_energy_optimization_opt_out-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'evse Energy optimization opt-out', + 'options': list([ + 'no_opt_out', + 'local_opt_out', + 'grid_opt_out', + 'opt_out', + ]), + }), + 'context': , + 'entity_id': 'sensor.evse_energy_optimization_opt_out', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'no_opt_out', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_fault_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21917,11 +27492,22 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'extra_state', + 'no_error', + 'meter_failure', + 'over_voltage', + 'under_voltage', + 'over_current', + 'contact_wet_failure', + 'contact_dry_failure', + 'power_loss', + 'power_quality', + 'pilot_short_circuit', + 'emergency_stop', + 'ev_disconnected', + 'wrong_power_supply', + 'live_neutral_swap', + 'over_temperature', + 'other', ]), }), 'config_entry_id': , @@ -21930,8 +27516,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.dishwasher_operational_state', + 'entity_category': , + 'entity_id': 'sensor.evse_fault_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21939,43 +27525,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Fault state', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Fault state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-1-OperationalState-96-4', + 'translation_key': 'evse_fault_state', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseFaultState-153-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_operational_state-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_fault_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'Dishwasher Operational state', + 'friendly_name': 'evse Fault state', 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', - 'extra_state', + 'no_error', + 'meter_failure', + 'over_voltage', + 'under_voltage', + 'over_current', + 'contact_wet_failure', + 'contact_dry_failure', + 'power_loss', + 'power_quality', + 'pilot_short_circuit', + 'emergency_stop', + 'ev_disconnected', + 'wrong_power_supply', + 'live_neutral_swap', + 'over_temperature', + 'other', ]), }), 'context': , - 'entity_id': 'sensor.dishwasher_operational_state', + 'entity_id': 'sensor.evse_fault_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'stopped', + 'state': 'no_error', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_power-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_max_charge_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -21990,8 +27587,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.dishwasher_power', + 'entity_category': , + 'entity_id': 'sensor.evse_max_charge_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -21999,51 +27596,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Max charge current', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Max charge current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'translation_key': 'evse_max_charge_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseMaximumChargeCurrent-153-7', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_power-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_max_charge_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'Dishwasher Power', + 'device_class': 'current', + 'friendly_name': 'evse Max charge current', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.dishwasher_power', + 'entity_id': 'sensor.evse_max_charge_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '30.0', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_reboot_count-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_min_charge_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -22052,7 +27649,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dishwasher_reboot_count', + 'entity_id': 'sensor.evse_min_charge_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22060,42 +27657,174 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Min charge current', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Min charge current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', - 'unit_of_measurement': None, + 'translation_key': 'evse_min_charge_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseMinimumChargeCurrent-153-6', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_reboot_count-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_min_charge_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Dishwasher Reboot count', - 'state_class': , + 'device_class': 'current', + 'friendly_name': 'evse Min charge current', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.dishwasher_reboot_count', + 'entity_id': 'sensor.evse_min_charge_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '6', + 'state': '2.0', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_reactive_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reactive_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementReactiveCurrent-144-6', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'evse Reactive current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_reactive_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.evse_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementReactivePower-144-9', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'reactive_power', + 'friendly_name': 'evse Reactive power', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.evse_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_uptime-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -22103,7 +27832,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.dishwasher_uptime', + 'entity_id': 'sensor.evse_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22111,36 +27840,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000036-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_dishwasher][sensor.dishwasher_uptime-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'Dishwasher Uptime', + 'friendly_name': 'evse Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.dishwasher_uptime', + 'entity_id': 'sensor.evse_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:59:50+00:00', + 'state': '1', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_active_current-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_state_of_charge-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -22155,8 +27884,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.evse_active_current', + 'entity_category': None, + 'entity_id': 'sensor.evse_state_of_charge', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22164,52 +27893,44 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Active current', + 'object_id_base': 'State of charge', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Active current', + 'original_name': 'State of charge', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'active_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementActiveCurrent-144-5', - 'unit_of_measurement': , + 'translation_key': 'evse_soc', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseStateOfCharge-153-48', + 'unit_of_measurement': '%', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_active_current-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_state_of_charge-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Active current', + 'device_class': 'battery', + 'friendly_name': 'evse State of charge', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.evse_active_current', + 'entity_id': 'sensor.evse_state_of_charge', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '75', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_current-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -22217,7 +27938,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_apparent_current', + 'entity_id': 'sensor.evse_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22225,44 +27946,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Apparent current', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent current', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'apparent_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementApparentCurrent-144-7', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_current-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Apparent current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'evse Uptime', }), 'context': , - 'entity_id': 'sensor.evse_apparent_current', + 'entity_id': 'sensor.evse_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '2025-01-01T11:11:11+00:00', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_power-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_user_max_charge_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -22278,7 +27991,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_apparent_power', + 'entity_id': 'sensor.evse_user_max_charge_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22286,57 +27999,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Apparent power', + 'object_id_base': 'User max charge current', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'User max charge current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementApparentPower-144-10', - 'unit_of_measurement': , + 'translation_key': 'evse_user_max_charge_current', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseUserMaximumChargeCurrent-153-9', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_apparent_power-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_user_max_charge_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'apparent_power', - 'friendly_name': 'evse Apparent power', + 'device_class': 'current', + 'friendly_name': 'evse User max charge current', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_apparent_power', + 'entity_id': 'sensor.evse_user_max_charge_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '32.0', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_appliance_energy_state-entry] +# name: test_sensors[silabs_evse_charging][sensor.evse_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'offline', - 'online', - 'fault', - 'power_adjust_active', - 'paused', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -22345,7 +28052,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_appliance_energy_state', + 'entity_id': 'sensor.evse_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22353,50 +28060,59 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Appliance energy state', + 'object_id_base': 'Voltage', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Appliance energy state', + 'original_name': 'Voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'esa_state', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ESAState-152-2', - 'unit_of_measurement': None, + 'translation_key': 'voltage', + 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_appliance_energy_state-state] +# name: test_sensors[silabs_evse_charging][sensor.evse_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'evse Appliance energy state', - 'options': list([ - 'offline', - 'online', - 'fault', - 'power_adjust_active', - 'paused', - ]), + 'device_class': 'voltage', + 'friendly_name': 'evse Voltage', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_appliance_energy_state', + 'entity_id': 'sensor.evse_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'online', + 'state': 'unknown', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_circuit_capacity-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -22405,7 +28121,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_circuit_capacity', + 'entity_id': 'sensor.sl_fan_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22413,51 +28129,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Circuit capacity', + 'object_id_base': 'Boot reason', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Circuit capacity', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_circuit_capacity', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseCircuitCapacity-153-5', - 'unit_of_measurement': , + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_circuit_capacity-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Circuit capacity', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'SL_Fan Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.evse_circuit_capacity', + 'entity_id': 'sensor.sl_fan_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '32.0', + 'state': 'software_reset', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_effective_current-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -22466,7 +28183,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_effective_current', + 'entity_id': 'sensor.sl_fan_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22474,52 +28191,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective current', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Effective current', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementRMSCurrent-144-12', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_effective_current-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Effective current', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'SL_Fan Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.evse_effective_current', + 'entity_id': 'sensor.sl_fan_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '1', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_effective_voltage-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -22527,7 +28234,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_effective_voltage', + 'entity_id': 'sensor.sl_fan_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22535,60 +28242,49 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective voltage', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Effective voltage', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_voltage', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementRMSVoltage-144-11', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_effective_voltage-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'evse Effective voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'SL_Fan Thread channel', }), 'context': , - 'entity_id': 'sensor.evse_effective_voltage', + 'entity_id': 'sensor.sl_fan_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '25', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.evse_energy', + 'entity_category': , + 'entity_id': 'sensor.sl_fan_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22596,51 +28292,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Thread network name', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', - 'unit_of_measurement': , + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'evse Energy', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'SL_Fan Thread network name', }), 'context': , - 'entity_id': 'sensor.evse_energy', + 'entity_id': 'sensor.sl_fan_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': 'MyHome', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy_exported-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -22648,8 +28344,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.evse_energy_exported', + 'entity_category': , + 'entity_id': 'sensor.sl_fan_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22657,57 +28353,52 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy exported', + 'object_id_base': 'Thread routing role', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Energy exported', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_exported', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalEnergyMeasurementCumulativeEnergyExported-145-2', - 'unit_of_measurement': , + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy_exported-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'evse Energy exported', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'SL_Fan Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.evse_energy_exported', + 'entity_id': 'sensor.sl_fan_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': 'router', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy_optimization_opt_out-entry] +# name: test_sensors[silabs_fan][sensor.sl_fan_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'no_opt_out', - 'local_opt_out', - 'grid_opt_out', - 'opt_out', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -22715,7 +28406,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_energy_optimization_opt_out', + 'entity_id': 'sensor.sl_fan_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22723,42 +28414,36 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy optimization opt-out', + 'object_id_base': 'Uptime', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Energy optimization opt-out', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'esa_opt_out_state', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ESAOptOutState-152-7', + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_energy_optimization_opt_out-state] +# name: test_sensors[silabs_fan][sensor.sl_fan_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'evse Energy optimization opt-out', - 'options': list([ - 'no_opt_out', - 'local_opt_out', - 'grid_opt_out', - 'opt_out', - ]), + 'device_class': 'uptime', + 'friendly_name': 'SL_Fan Uptime', }), 'context': , - 'entity_id': 'sensor.evse_energy_optimization_opt_out', + 'entity_id': 'sensor.sl_fan_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_opt_out', + 'state': '2025-01-01T13:53:26+00:00', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_fault_state-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -22766,22 +28451,13 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'no_error', - 'meter_failure', - 'over_voltage', - 'under_voltage', - 'over_current', - 'contact_wet_failure', - 'contact_dry_failure', - 'power_loss', - 'power_quality', - 'pilot_short_circuit', - 'emergency_stop', - 'ev_disconnected', - 'wrong_power_supply', - 'live_neutral_swap', - 'over_temperature', - 'other', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'config_entry_id': , @@ -22791,7 +28467,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_fault_state', + 'entity_id': 'sensor.laundrywasher_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22799,61 +28475,56 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Fault state', + 'object_id_base': 'Boot reason', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Fault state', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_fault_state', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseFaultState-153-2', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_fault_state-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'evse Fault state', + 'friendly_name': 'LaundryWasher Boot reason', 'options': list([ - 'no_error', - 'meter_failure', - 'over_voltage', - 'under_voltage', - 'over_current', - 'contact_wet_failure', - 'contact_dry_failure', - 'power_loss', - 'power_quality', - 'pilot_short_circuit', - 'emergency_stop', - 'ev_disconnected', - 'wrong_power_supply', - 'live_neutral_swap', - 'over_temperature', - 'other', + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', ]), }), 'context': , - 'entity_id': 'sensor.evse_fault_state', + 'entity_id': 'sensor.laundrywasher_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': 'software_reset', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_max_charge_current-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_current_phase-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'pre-soak', + 'rinse', + 'spin', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -22861,8 +28532,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.evse_max_charge_current', + 'entity_category': None, + 'entity_id': 'sensor.laundrywasher_current_phase', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22870,44 +28541,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Max charge current', + 'object_id_base': 'Current phase', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Max charge current', + 'original_name': 'Current phase', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_max_charge_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseMaximumChargeCurrent-153-7', - 'unit_of_measurement': , + 'translation_key': 'current_phase', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalStateCurrentPhase-96-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_max_charge_current-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_current_phase-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Max charge current', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'LaundryWasher Current phase', + 'options': list([ + 'pre-soak', + 'rinse', + 'spin', + ]), }), 'context': , - 'entity_id': 'sensor.evse_max_charge_current', + 'entity_id': 'sensor.laundrywasher_current_phase', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '30.0', + 'state': 'pre-soak', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_min_charge_current-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -22923,7 +28591,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_min_charge_current', + 'entity_id': 'sensor.laundrywasher_effective_current', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22931,7 +28599,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Min charge current', + 'object_id_base': 'Effective current', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -22942,33 +28610,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Min charge current', + 'original_name': 'Effective current', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_min_charge_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseMinimumChargeCurrent-153-6', + 'translation_key': 'rms_current', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementRMSCurrent-144-12', 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_min_charge_current-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_current-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'current', - 'friendly_name': 'evse Min charge current', + 'friendly_name': 'LaundryWasher Effective current', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_min_charge_current', + 'entity_id': 'sensor.laundrywasher_effective_current', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.0', + 'state': '0.0', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_current-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -22984,7 +28652,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_reactive_current', + 'entity_id': 'sensor.laundrywasher_effective_voltage', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -22992,51 +28660,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reactive current', + 'object_id_base': 'Effective voltage', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 0, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reactive current', + 'original_name': 'Effective voltage', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reactive_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementReactiveCurrent-144-6', - 'unit_of_measurement': , + 'translation_key': 'rms_voltage', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementRMSVoltage-144-11', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_current-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_voltage-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse Reactive current', + 'device_class': 'voltage', + 'friendly_name': 'LaundryWasher Effective voltage', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_reactive_current', + 'entity_id': 'sensor.laundrywasher_effective_voltage', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '120.0', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_power-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -23044,8 +28712,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.evse_reactive_power', + 'entity_category': None, + 'entity_id': 'sensor.laundrywasher_energy', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23053,51 +28721,56 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reactive power', + 'object_id_base': 'Energy', 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 3, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': , + 'suggested_unit_of_measurement': , }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reactive power', + 'original_name': 'Energy', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementReactivePower-144-9', - 'unit_of_measurement': , + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reactive_power-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_energy-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'reactive_power', - 'friendly_name': 'evse Reactive power', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'energy', + 'friendly_name': 'LaundryWasher Energy', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_reactive_power', + 'entity_id': 'sensor.laundrywasher_energy', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '0.0', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reboot_count-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_error-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -23106,7 +28779,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_reboot_count', + 'entity_id': 'sensor.laundrywasher_operational_error', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23114,43 +28787,54 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Operational error', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Operational error', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'operational_error', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalStateOperationalError-96-5', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_reboot_count-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_error-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'evse Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'LaundryWasher Operational error', + 'options': list([ + 'no_error', + 'unable_to_start_or_resume', + 'unable_to_complete_operation', + 'command_invalid_in_state', + ]), }), 'context': , - 'entity_id': 'sensor.evse_reboot_count', + 'entity_id': 'sensor.laundrywasher_operational_error', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': 'no_error', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_state_of_charge-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_state-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -23159,7 +28843,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.evse_state_of_charge', + 'entity_id': 'sensor.laundrywasher_operational_state', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23167,52 +28851,58 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'State of charge', + 'object_id_base': 'Operational state', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'State of charge', + 'original_name': 'Operational state', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_soc', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseStateOfCharge-153-48', - 'unit_of_measurement': '%', + 'translation_key': 'operational_state', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalState-96-4', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_state_of_charge-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_state-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'battery', - 'friendly_name': 'evse State of charge', - 'state_class': , - 'unit_of_measurement': '%', + 'device_class': 'enum', + 'friendly_name': 'LaundryWasher Operational state', + 'options': list([ + 'stopped', + 'running', + 'paused', + 'error', + ]), }), 'context': , - 'entity_id': 'sensor.evse_state_of_charge', + 'entity_id': 'sensor.laundrywasher_operational_state', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '75', + 'state': 'stopped', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_uptime-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_power-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.evse_uptime', + 'entity_category': None, + 'entity_id': 'sensor.laundrywasher_power', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23220,43 +28910,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Power', 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': , + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Power', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', + 'unit_of_measurement': , }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_uptime-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_power-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'evse Uptime', + 'device_class': 'power', + 'friendly_name': 'LaundryWasher Power', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.evse_uptime', + 'entity_id': 'sensor.laundrywasher_power', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T11:11:11+00:00', + 'state': '0.0', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_user_max_charge_current-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -23265,7 +28963,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_user_max_charge_current', + 'entity_id': 'sensor.laundrywasher_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23273,52 +28971,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'User max charge current', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'User max charge current', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'evse_user_max_charge_current', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-EnergyEvseUserMaximumChargeCurrent-153-9', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_user_max_charge_current-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'evse User max charge current', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'LaundryWasher Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.evse_user_max_charge_current', + 'entity_id': 'sensor.laundrywasher_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '32.0', + 'state': '10', }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_voltage-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -23326,7 +29014,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.evse_voltage', + 'entity_id': 'sensor.laundrywasher_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23334,60 +29022,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'voltage', - 'unique_id': '00000000000004D2-0000000000000017-MatterNodeDevice-1-ElectricalPowerMeasurementVoltage-144-4', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_evse_charging][sensor.evse_voltage-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'evse Voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'LaundryWasher Thread channel', }), 'context': , - 'entity_id': 'sensor.evse_voltage', + 'entity_id': 'sensor.laundrywasher_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '25', }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_boot_reason-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -23395,7 +29064,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_fan_boot_reason', + 'entity_id': 'sensor.laundrywasher_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23403,52 +29072,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_boot_reason-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'SL_Fan Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'LaundryWasher Thread network name', }), 'context': , - 'entity_id': 'sensor.sl_fan_boot_reason', + 'entity_id': 'sensor.laundrywasher_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'software_reset', + 'state': 'MyHome', }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_reboot_count-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -23457,7 +29125,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_fan_reboot_count', + 'entity_id': 'sensor.laundrywasher_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23465,36 +29133,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_reboot_count-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'SL_Fan Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'LaundryWasher Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.sl_fan_reboot_count', + 'entity_id': 'sensor.laundrywasher_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': 'router', }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_uptime-entry] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -23508,7 +29186,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_fan_uptime', + 'entity_id': 'sensor.laundrywasher_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23527,25 +29205,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_fan][sensor.sl_fan_uptime-state] +# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'SL_Fan Uptime', + 'friendly_name': 'LaundryWasher Uptime', }), 'context': , - 'entity_id': 'sensor.sl_fan_uptime', + 'entity_id': 'sensor.laundrywasher_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:53:26+00:00', + 'state': '2025-01-01T13:27:46+00:00', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_boot_reason-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -23569,7 +29247,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_boot_reason', + 'entity_id': 'sensor.light_switch_example_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23588,15 +29266,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_boot_reason-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'LaundryWasher Boot reason', + 'friendly_name': 'Light switch example Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -23608,76 +29286,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.laundrywasher_boot_reason', + 'entity_id': 'sensor.light_switch_example_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'software_reset', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_current_phase-entry] - EntityRegistryEntrySnapshot({ - 'aliases': list([ - None, - ]), - 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'pre-soak', - 'rinse', - 'spin', - ]), - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.laundrywasher_current_phase', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Current phase', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': None, - 'original_name': 'Current phase', - 'platform': 'matter', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'current_phase', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalStateCurrentPhase-96-1', - 'unit_of_measurement': None, - }) -# --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_current_phase-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'LaundryWasher Current phase', - 'options': list([ - 'pre-soak', - 'rinse', - 'spin', - ]), - }), - 'context': , - 'entity_id': 'sensor.laundrywasher_current_phase', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'pre-soak', - }) -# --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_current-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_current_switch_position-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -23693,7 +29309,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_effective_current', + 'entity_id': 'sensor.light_switch_example_current_switch_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23701,51 +29317,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective current', + 'object_id_base': 'Current switch position', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Effective current', + 'original_name': 'Current switch position', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_current', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementRMSCurrent-144-12', - 'unit_of_measurement': , + 'translation_key': 'switch_current_position', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-2-SwitchCurrentPosition-59-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_current-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_current_switch_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'current', - 'friendly_name': 'LaundryWasher Effective current', + 'friendly_name': 'Light switch example Current switch position', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.laundrywasher_effective_current', + 'entity_id': 'sensor.light_switch_example_current_switch_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '0', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_voltage-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -23754,7 +29362,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_effective_voltage', + 'entity_id': 'sensor.light_switch_example_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23762,60 +29370,50 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Effective voltage', + 'object_id_base': 'Reboot count', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 0, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Effective voltage', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'rms_voltage', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementRMSVoltage-144-11', - 'unit_of_measurement': , + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_effective_voltage-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'voltage', - 'friendly_name': 'LaundryWasher Effective voltage', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Light switch example Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.laundrywasher_effective_voltage', + 'entity_id': 'sensor.light_switch_example_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '120.0', + 'state': '1', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_energy-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.laundrywasher_energy', + 'entity_category': , + 'entity_id': 'sensor.light_switch_example_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23823,57 +29421,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Energy', + 'object_id_base': 'Thread channel', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 3, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalEnergyMeasurementCumulativeEnergyImported-145-1', - 'unit_of_measurement': , + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_energy-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'LaundryWasher Energy', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'Light switch example Thread channel', }), 'context': , - 'entity_id': 'sensor.laundrywasher_energy', + 'entity_id': 'sensor.light_switch_example_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '25', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_error-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -23881,7 +29463,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_operational_error', + 'entity_id': 'sensor.light_switch_example_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23889,42 +29471,35 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational error', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Operational error', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_error', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalStateOperationalError-96-5', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_error-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'LaundryWasher Operational error', - 'options': list([ - 'no_error', - 'unable_to_start_or_resume', - 'unable_to_complete_operation', - 'command_invalid_in_state', - ]), + 'friendly_name': 'Light switch example Thread network name', }), 'context': , - 'entity_id': 'sensor.laundrywasher_operational_error', + 'entity_id': 'sensor.light_switch_example_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'no_error', + 'state': '*****', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_state-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -23932,10 +29507,14 @@ 'area_id': None, 'capabilities': dict({ 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'config_entry_id': , @@ -23944,8 +29523,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.laundrywasher_operational_state', + 'entity_category': , + 'entity_id': 'sensor.light_switch_example_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23953,58 +29532,60 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Operational state', + 'object_id_base': 'Thread routing role', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Operational state', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'operational_state', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-1-OperationalState-96-4', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_operational_state-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'LaundryWasher Operational state', + 'friendly_name': 'Light switch example Thread routing role', 'options': list([ - 'stopped', - 'running', - 'paused', - 'error', + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', ]), }), 'context': , - 'entity_id': 'sensor.laundrywasher_operational_state', + 'entity_id': 'sensor.light_switch_example_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'stopped', + 'state': 'sleepy_end_device', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_power-entry] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.laundrywasher_power', + 'entity_category': , + 'entity_id': 'sensor.light_switch_example_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24012,51 +29593,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Uptime', 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), - 'sensor.private': dict({ - 'suggested_unit_of_measurement': , - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Uptime', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-2-ElectricalPowerMeasurementWatt-144-8', - 'unit_of_measurement': , + 'translation_key': 'uptime', + 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_power-state] +# name: test_sensors[silabs_light_switch][sensor.light_switch_example_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'power', - 'friendly_name': 'LaundryWasher Power', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'uptime', + 'friendly_name': 'Light switch example Uptime', }), 'context': , - 'entity_id': 'sensor.laundrywasher_power', + 'entity_id': 'sensor.light_switch_example_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.0', + 'state': '2025-01-01T13:56:45+00:00', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_reboot_count-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -24065,7 +29646,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_reboot_count', + 'entity_id': 'sensor.sl_rangehood_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24073,42 +29654,53 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Boot reason', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Boot reason', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'boot_reason', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_reboot_count-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'LaundryWasher Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'SL-RangeHood Boot reason', + 'options': list([ + 'unspecified', + 'power_on_reboot', + 'brown_out_reset', + 'software_watchdog_reset', + 'hardware_watchdog_reset', + 'software_update_completed', + 'software_reset', + ]), }), 'context': , - 'entity_id': 'sensor.laundrywasher_reboot_count', + 'entity_id': 'sensor.sl_rangehood_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '10', + 'state': 'power_on_reboot', }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_uptime-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -24116,7 +29708,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.laundrywasher_uptime', + 'entity_id': 'sensor.sl_rangehood_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24124,52 +29716,42 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Reboot count', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Reboot count', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000038-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'reboot_count', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_laundrywasher][sensor.laundrywasher_uptime-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'LaundryWasher Uptime', + 'friendly_name': 'SL-RangeHood Reboot count', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.laundrywasher_uptime', + 'entity_id': 'sensor.sl_rangehood_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:27:46+00:00', + 'state': '5', }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_boot_reason-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -24177,7 +29759,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.light_switch_example_boot_reason', + 'entity_id': 'sensor.sl_rangehood_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24185,53 +29767,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_boot_reason-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Light switch example Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'SL-RangeHood Thread channel', }), 'context': , - 'entity_id': 'sensor.light_switch_example_boot_reason', + 'entity_id': 'sensor.sl_rangehood_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'software_reset', + 'state': '25', }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_current_switch_position-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'state_class': , - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -24239,7 +29809,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.light_switch_example_current_switch_position', + 'entity_id': 'sensor.sl_rangehood_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24247,43 +29817,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current switch position', + 'object_id_base': 'Thread network name', 'options': dict({ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Current switch position', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'switch_current_position', - 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-2-SwitchCurrentPosition-59-1', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_current_switch_position-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Light switch example Current switch position', - 'state_class': , + 'friendly_name': 'SL-RangeHood Thread network name', }), 'context': , - 'entity_id': 'sensor.light_switch_example_current_switch_position', + 'entity_id': 'sensor.sl_rangehood_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': 'MyHome', }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_reboot_count-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -24292,7 +29870,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.light_switch_example_reboot_count', + 'entity_id': 'sensor.sl_rangehood_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24300,36 +29878,46 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_reboot_count-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Light switch example Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'SL-RangeHood Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.light_switch_example_reboot_count', + 'entity_id': 'sensor.sl_rangehood_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': 'router', }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_uptime-entry] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_uptime-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -24343,7 +29931,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.light_switch_example_uptime', + 'entity_id': 'sensor.sl_rangehood_uptime', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24362,25 +29950,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-000000000000008E-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_light_switch][sensor.light_switch_example_uptime-state] +# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_uptime-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'uptime', - 'friendly_name': 'Light switch example Uptime', + 'friendly_name': 'SL-RangeHood Uptime', }), 'context': , - 'entity_id': 'sensor.light_switch_example_uptime', + 'entity_id': 'sensor.sl_rangehood_uptime', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:56:45+00:00', + 'state': '2025-01-01T13:58:02+00:00', }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_boot_reason-entry] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_boot_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -24404,7 +29992,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_rangehood_boot_reason', + 'entity_id': 'sensor.refrigerator_boot_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24423,15 +30011,15 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_boot_reason-state] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_boot_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'enum', - 'friendly_name': 'SL-RangeHood Boot reason', + 'friendly_name': 'Refrigerator Boot reason', 'options': list([ 'unspecified', 'power_on_reboot', @@ -24443,14 +30031,14 @@ ]), }), 'context': , - 'entity_id': 'sensor.sl_rangehood_boot_reason', + 'entity_id': 'sensor.refrigerator_boot_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'power_on_reboot', + 'state': 'software_reset', }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_reboot_count-entry] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_reboot_count-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -24466,7 +30054,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_rangehood_reboot_count', + 'entity_id': 'sensor.refrigerator_reboot_count', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24485,25 +30073,25 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_reboot_count-state] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_reboot_count-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'SL-RangeHood Reboot count', + 'friendly_name': 'Refrigerator Reboot count', 'state_class': , }), 'context': , - 'entity_id': 'sensor.sl_rangehood_reboot_count', + 'entity_id': 'sensor.refrigerator_reboot_count', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '5', + 'state': '1', }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_uptime-entry] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_channel-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -24517,7 +30105,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.sl_rangehood_uptime', + 'entity_id': 'sensor.refrigerator_thread_channel', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24525,52 +30113,41 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Uptime', + 'object_id_base': 'Thread channel', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Uptime', + 'original_name': 'Thread channel', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'uptime', - 'unique_id': '00000000000004D2-0000000000000072-MatterNodeDevice-0-GeneralDiagnosticsUpTime-51-2', + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_range_hood][sensor.sl_rangehood_uptime-state] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_channel-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'uptime', - 'friendly_name': 'SL-RangeHood Uptime', + 'friendly_name': 'Refrigerator Thread channel', }), 'context': , - 'entity_id': 'sensor.sl_rangehood_uptime', + 'entity_id': 'sensor.refrigerator_thread_channel', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2025-01-01T13:58:02+00:00', + 'state': '25', }) # --- -# name: test_sensors[silabs_refrigerator][sensor.refrigerator_boot_reason-entry] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_network_name-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, - 'capabilities': dict({ - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), - }), + 'capabilities': None, 'config_entry_id': , 'config_subentry_id': , 'device_class': None, @@ -24578,7 +30155,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.refrigerator_boot_reason', + 'entity_id': 'sensor.refrigerator_thread_network_name', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24586,52 +30163,51 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Boot reason', + 'object_id_base': 'Thread network name', 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Boot reason', + 'original_name': 'Thread network name', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boot_reason', - 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-GeneralDiagnosticsBootReason-51-4', + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_refrigerator][sensor.refrigerator_boot_reason-state] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_network_name-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'Refrigerator Boot reason', - 'options': list([ - 'unspecified', - 'power_on_reboot', - 'brown_out_reset', - 'software_watchdog_reset', - 'hardware_watchdog_reset', - 'software_update_completed', - 'software_reset', - ]), + 'friendly_name': 'Refrigerator Thread network name', }), 'context': , - 'entity_id': 'sensor.refrigerator_boot_reason', + 'entity_id': 'sensor.refrigerator_thread_network_name', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'software_reset', + 'state': 'MyHome36', }) # --- -# name: test_sensors[silabs_refrigerator][sensor.refrigerator_reboot_count-entry] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_routing_role-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, ]), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -24640,7 +30216,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.refrigerator_reboot_count', + 'entity_id': 'sensor.refrigerator_thread_routing_role', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -24648,33 +30224,43 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reboot count', + 'object_id_base': 'Thread routing role', 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Reboot count', + 'original_name': 'Thread routing role', 'platform': 'matter', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'reboot_count', - 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-GeneralDiagnosticsRebootCount-51-1', + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', 'unit_of_measurement': None, }) # --- -# name: test_sensors[silabs_refrigerator][sensor.refrigerator_reboot_count-state] +# name: test_sensors[silabs_refrigerator][sensor.refrigerator_thread_routing_role-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'Refrigerator Reboot count', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'Refrigerator Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), }), 'context': , - 'entity_id': 'sensor.refrigerator_reboot_count', + 'entity_id': 'sensor.refrigerator_thread_routing_role', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1', + 'state': 'reed', }) # --- # name: test_sensors[silabs_refrigerator][sensor.refrigerator_uptime-entry] @@ -26718,6 +32304,61 @@ 'state': '217.0', }) # --- +# name: test_sensors[yandex_smart_socket][sensor.yndx_00540_wi_fi_rssi-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.yndx_00540_wi_fi_rssi', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Wi-Fi RSSI', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Wi-Fi RSSI', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wifi_rssi', + 'unique_id': '00000000000004D2-000000000000002E-MatterNodeDevice-0-WiFiDiagnosticsRssi-54-4', + 'unit_of_measurement': 'dBm', + }) +# --- +# name: test_sensors[yandex_smart_socket][sensor.yndx_00540_wi_fi_rssi-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'signal_strength', + 'friendly_name': 'YNDX-00540 Wi-Fi RSSI', + 'state_class': , + 'unit_of_measurement': 'dBm', + }), + 'context': , + 'entity_id': 'sensor.yndx_00540_wi_fi_rssi', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '-53', + }) +# --- # name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -26949,3 +32590,175 @@ 'state': '17', }) # --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_channel-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_channel', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread channel', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread channel', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_channel', + 'unique_id': '00000000000004D2-000000000000007A-MatterNodeDevice-0-ThreadDiagnosticsChannel-53-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_channel-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Zemismart MT25B Roller Motor Thread channel', + }), + 'context': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_channel', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25', + }) +# --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_network_name-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_network_name', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread network name', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Thread network name', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_network_name', + 'unique_id': '00000000000004D2-000000000000007A-MatterNodeDevice-0-ThreadDiagnosticsNetworkName-53-2', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_network_name-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Zemismart MT25B Roller Motor Thread network name', + }), + 'context': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_network_name', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'MyHome36', + }) +# --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_routing_role-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_routing_role', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Thread routing role', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Thread routing role', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thread_routing_role', + 'unique_id': '00000000000004D2-000000000000007A-MatterNodeDevice-0-ThreadDiagnosticsRoutingRole-53-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[zemismart_mt25b][sensor.zemismart_mt25b_roller_motor_thread_routing_role-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Zemismart MT25B Roller Motor Thread routing role', + 'options': list([ + 'unspecified', + 'unassigned', + 'sleepy_end_device', + 'end_device', + 'reed', + 'router', + 'leader', + 'unknown', + ]), + }), + 'context': , + 'entity_id': 'sensor.zemismart_mt25b_roller_motor_thread_routing_role', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'sleepy_end_device', + }) +# --- diff --git a/tests/components/matter/test_sensor.py b/tests/components/matter/test_sensor.py index e03e6ab153e0f..268b802d64417 100644 --- a/tests/components/matter/test_sensor.py +++ b/tests/components/matter/test_sensor.py @@ -2,6 +2,8 @@ from unittest.mock import MagicMock +from chip.clusters import Objects as clusters +from chip.clusters.ClusterObjects import ClusterAttributeDescriptor from matter_server.client.models.node import MatterNode import pytest from syrupy.assertion import SnapshotAssertion @@ -906,6 +908,134 @@ async def test_bridged_device_reachable_updates_availability( assert state.state != STATE_UNAVAILABLE +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +@pytest.mark.parametrize("node_fixture", ["device_diagnostics"]) +async def test_wifi_rssi_sensor( + hass: HomeAssistant, + entity_registry: er.EntityRegistry, + matter_client: MagicMock, + matter_node: MatterNode, +) -> None: + """Test WiFiNetworkDiagnostics RSSI sensor.""" + # RSSI = -56 + state = hass.states.get("sensor.m5stamp_lighting_app_wi_fi_rssi") + assert state + assert state.state == "-56" + + set_node_attribute( + matter_node, + 0, + clusters.WiFiNetworkDiagnostics.id, + clusters.WiFiNetworkDiagnostics.Attributes.Rssi.attribute_id, + -72, + ) + await trigger_subscription_callback(hass, matter_client) + + state = hass.states.get("sensor.m5stamp_lighting_app_wi_fi_rssi") + assert state + assert state.state == "-72" + + entry = entity_registry.async_get("sensor.m5stamp_lighting_app_wi_fi_rssi") + assert entry + assert entry.entity_category == EntityCategory.DIAGNOSTIC + + +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +@pytest.mark.parametrize( + ("entity_id", "attribute", "initial_state", "updated_value", "updated_state"), + [ + ( + "sensor.multi_state_sensor_p100_thread_channel", + clusters.ThreadNetworkDiagnostics.Attributes.Channel, + "25", + 20, + "20", + ), + ( + "sensor.multi_state_sensor_p100_thread_network_name", + clusters.ThreadNetworkDiagnostics.Attributes.NetworkName, + "MyHome1895415629", + "OtherNet", + "OtherNet", + ), + ], +) +@pytest.mark.parametrize("node_fixture", ["aqara_multi_state_p100"]) +async def test_thread_diagnostic_sensors( + hass: HomeAssistant, + entity_registry: er.EntityRegistry, + matter_client: MagicMock, + matter_node: MatterNode, + entity_id: str, + attribute: ClusterAttributeDescriptor, + initial_state: str, + updated_value: int | str, + updated_state: str, +) -> None: + """Test ThreadNetworkDiagnostics Channel and NetworkName sensors.""" + state = hass.states.get(entity_id) + assert state + assert state.state == initial_state + + set_node_attribute( + matter_node, 0, attribute.cluster_id, attribute.attribute_id, updated_value + ) + await trigger_subscription_callback(hass, matter_client) + + state = hass.states.get(entity_id) + assert state + assert state.state == updated_state + + entry = entity_registry.async_get(entity_id) + assert entry + assert entry.entity_category == EntityCategory.DIAGNOSTIC + + +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +@pytest.mark.parametrize( + ("routing_role_value", "expected_state"), + [ + (0, "unspecified"), + (1, "unassigned"), + (2, "sleepy_end_device"), + (3, "end_device"), + (4, "reed"), + (5, "router"), + (6, "leader"), + ], +) +@pytest.mark.parametrize("node_fixture", ["aqara_multi_state_p100"]) +async def test_thread_routing_role_enum_mapping( + hass: HomeAssistant, + entity_registry: er.EntityRegistry, + matter_client: MagicMock, + matter_node: MatterNode, + routing_role_value: int, + expected_state: str, +) -> None: + """Test ThreadNetworkDiagnostics RoutingRole enum maps every value to a translatable state.""" + entity_id = "sensor.multi_state_sensor_p100_thread_routing_role" + + set_node_attribute( + matter_node, + 0, + clusters.ThreadNetworkDiagnostics.id, + clusters.ThreadNetworkDiagnostics.Attributes.RoutingRole.attribute_id, + routing_role_value, + ) + await trigger_subscription_callback(hass, matter_client) + + state = hass.states.get(entity_id) + assert state + assert state.state == expected_state + + entry = entity_registry.async_get(entity_id) + assert entry + assert entry.entity_category == EntityCategory.DIAGNOSTIC + assert entry.capabilities is not None + assert expected_state in entry.capabilities["options"] + + @pytest.mark.freeze_time("2025-01-01T14:00:00+00:00") @pytest.mark.usefixtures("entity_registry_enabled_by_default") @pytest.mark.parametrize("node_fixture", ["device_diagnostics"]) From eb3fd52619c5a22f56f5f386950c65b81a5965ce Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:39:06 +0200 Subject: [PATCH 08/39] Add actions permission to delete stalebot state (#172704) --- .github/workflows/stale.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index eb7c7493e0709..750a02d42c860 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -20,6 +20,7 @@ jobs: permissions: issues: write # To label and close stale issues pull-requests: write # To label and close stale PRs + actions: write # To delete stalebot state steps: # The 60 day stale policy for PRs # Used for: @@ -58,7 +59,7 @@ jobs: # v3.2.0 uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 with: - app-id: ${{ secrets.ISSUE_TRIAGE_APP_ID }} # zizmor: ignore[secrets-outside-env] + client-id: ${{ secrets.ISSUE_TRIAGE_APP_ID }} # zizmor: ignore[secrets-outside-env] private-key: ${{ secrets.ISSUE_TRIAGE_APP_PEM }} # zizmor: ignore[secrets-outside-env] # The 90 day stale policy for issues From 04442bb73e6ad3459fbc8810f5bd714c934ff011 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:39:28 +0200 Subject: [PATCH 09/39] Use proper user-agent to fetch feeds (#172655) --- .../components/feedreader/config_flow.py | 8 ++++++-- homeassistant/components/feedreader/const.py | 4 ++++ .../components/feedreader/coordinator.py | 9 ++++++++- tests/components/feedreader/const.py | 3 ++- tests/components/feedreader/test_config_flow.py | 5 ++++- tests/components/feedreader/test_init.py | 15 +++++++++++++++ 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/feedreader/config_flow.py b/homeassistant/components/feedreader/config_flow.py index 4afa4cf8dff46..4bb19944224d7 100644 --- a/homeassistant/components/feedreader/config_flow.py +++ b/homeassistant/components/feedreader/config_flow.py @@ -23,14 +23,18 @@ TextSelectorType, ) -from .const import CONF_MAX_ENTRIES, DEFAULT_MAX_ENTRIES, DOMAIN +from .const import CONF_MAX_ENTRIES, DEFAULT_MAX_ENTRIES, DOMAIN, USER_AGENT LOGGER = logging.getLogger(__name__) async def async_fetch_feed(hass: HomeAssistant, url: str) -> feedparser.FeedParserDict: """Fetch the feed.""" - return await hass.async_add_executor_job(feedparser.parse, url) + + def _parse_feed() -> feedparser.FeedParserDict: + return feedparser.parse(url, agent=USER_AGENT) + + return await hass.async_add_executor_job(_parse_feed) class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/feedreader/const.py b/homeassistant/components/feedreader/const.py index efaa0e9d97236..8a216e0d3cf15 100644 --- a/homeassistant/components/feedreader/const.py +++ b/homeassistant/components/feedreader/const.py @@ -3,6 +3,8 @@ from datetime import timedelta from typing import Final +from homeassistant.const import APPLICATION_NAME, __version__ as ha_version + DOMAIN: Final[str] = "feedreader" CONF_MAX_ENTRIES: Final[str] = "max_entries" @@ -10,3 +12,5 @@ DEFAULT_SCAN_INTERVAL: Final[timedelta] = timedelta(hours=1) EVENT_FEEDREADER: Final[str] = "feedreader" + +USER_AGENT: Final[str] = f"{APPLICATION_NAME}/{ha_version}" diff --git a/homeassistant/components/feedreader/coordinator.py b/homeassistant/components/feedreader/coordinator.py index 7b2d4a890377a..31af12d144b12 100644 --- a/homeassistant/components/feedreader/coordinator.py +++ b/homeassistant/components/feedreader/coordinator.py @@ -18,7 +18,13 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.util import dt as dt_util -from .const import CONF_MAX_ENTRIES, DEFAULT_SCAN_INTERVAL, DOMAIN, EVENT_FEEDREADER +from .const import ( + CONF_MAX_ENTRIES, + DEFAULT_SCAN_INTERVAL, + DOMAIN, + EVENT_FEEDREADER, + USER_AGENT, +) DELAY_SAVE = 30 STORAGE_VERSION = 1 @@ -74,6 +80,7 @@ def _parse_feed() -> feedparser.FeedParserDict: self.url, etag=None if not self._feed else self._feed.get("etag"), modified=None if not self._feed else self._feed.get("modified"), + agent=USER_AGENT, ) feed = await self.hass.async_add_executor_job(_parse_feed) diff --git a/tests/components/feedreader/const.py b/tests/components/feedreader/const.py index bbd0f82bcfa0f..a394265a3331a 100644 --- a/tests/components/feedreader/const.py +++ b/tests/components/feedreader/const.py @@ -4,9 +4,10 @@ CONF_MAX_ENTRIES, DEFAULT_MAX_ENTRIES, ) -from homeassistant.const import CONF_URL +from homeassistant.const import APPLICATION_NAME, CONF_URL, __version__ as ha_version URL = "http://some.rss.local/rss_feed.xml" +USER_AGENT = f"{APPLICATION_NAME}/{ha_version}" FEED_TITLE = "RSS Sample" VALID_CONFIG_DEFAULT = {CONF_URL: URL, CONF_MAX_ENTRIES: DEFAULT_MAX_ENTRIES} VALID_CONFIG_100 = {CONF_URL: URL, CONF_MAX_ENTRIES: 100} diff --git a/tests/components/feedreader/test_config_flow.py b/tests/components/feedreader/test_config_flow.py index c9fc89179dbc4..6dfcf863395e8 100644 --- a/tests/components/feedreader/test_config_flow.py +++ b/tests/components/feedreader/test_config_flow.py @@ -16,7 +16,7 @@ from homeassistant.data_entry_flow import FlowResultType from . import create_mock_entry -from .const import FEED_TITLE, URL, VALID_CONFIG_DEFAULT +from .const import FEED_TITLE, URL, USER_AGENT, VALID_CONFIG_DEFAULT @pytest.fixture(name="feedparser") @@ -53,6 +53,9 @@ async def test_user(hass: HomeAssistant, feedparser, setup_entry) -> None: result = await hass.config_entries.flow.async_configure( result["flow_id"], user_input={CONF_URL: URL} ) + # check user-agent + assert feedparser.call_args.args[3] == USER_AGENT + # check flow result assert result["type"] is FlowResultType.CREATE_ENTRY assert result["title"] == FEED_TITLE assert result["data"][CONF_URL] == URL diff --git a/tests/components/feedreader/test_init.py b/tests/components/feedreader/test_init.py index 0a336141e69dd..f7d64eafbe88b 100644 --- a/tests/components/feedreader/test_init.py +++ b/tests/components/feedreader/test_init.py @@ -19,6 +19,7 @@ from . import async_setup_config_entry, create_mock_entry from .const import ( URL, + USER_AGENT, VALID_CONFIG_1, VALID_CONFIG_5, VALID_CONFIG_100, @@ -398,3 +399,17 @@ async def test_feed_atom_htmlentities( identifiers={(DOMAIN, entry.entry_id)} ) assert device_entry.manufacturer == "Juan Pérez" + + +async def test_feedparser_user_agent(hass: HomeAssistant, feed_one_event) -> None: + """Test that the correct user-agent is used for feedparser requests.""" + entry = create_mock_entry(VALID_CONFIG_DEFAULT) + entry.add_to_hass(hass) + with patch( + "homeassistant.components.feedreader.coordinator.feedparser.http.get" + ) as feedparser: + feedparser.return_value = feed_one_event + await hass.config_entries.async_setup(entry.entry_id) + + # check user-agent + assert feedparser.call_args.args[3] == USER_AGENT From 018e42e67002b5c8b30c1061382f76b5c941e9cb Mon Sep 17 00:00:00 2001 From: mellowism Date: Mon, 1 Jun 2026 19:40:44 +0200 Subject: [PATCH 10/39] Add custom themes to Cloud support package (#172708) Co-authored-by: Claude Opus 4.7 (1M context) --- homeassistant/components/cloud/http_api.py | 29 +++++++++++++++++++ .../cloud/snapshots/test_http_api.ambr | 21 ++++++++++++++ tests/components/cloud/test_http_api.py | 7 +++++ 3 files changed, 57 insertions(+) diff --git a/homeassistant/components/cloud/http_api.py b/homeassistant/components/cloud/http_api.py index aeae04bc9edb8..fbbfaab73d567 100644 --- a/homeassistant/components/cloud/http_api.py +++ b/homeassistant/components/cloud/http_api.py @@ -24,6 +24,7 @@ entities as alexa_entities, errors as alexa_errors, ) +from homeassistant.components.frontend import DATA_THEMES from homeassistant.components.google_assistant import helpers as google_helpers from homeassistant.components.homeassistant import exposed_entities from homeassistant.components.http import KEY_HASS, HomeAssistantView, require_admin @@ -508,6 +509,15 @@ async def _get_integration_info(self, hass: HomeAssistant) -> dict[str, Any]: "custom_integrations": custom_integrations, } + @callback + def _get_themes_info(self, hass: HomeAssistant) -> dict[str, Any]: + """Collect information about user-installed custom themes.""" + themes: dict[str, Any] = hass.data.get(DATA_THEMES, {}) + return { + "count": len(themes), + "themes": sorted(themes), + } + async def _generate_markdown( self, hass: HomeAssistant, @@ -569,6 +579,25 @@ def get_domain_table_markdown(domain_info: dict[str, Any]) -> str: ) markdown += "\n\n\n" + # Add custom themes information + try: + themes_info = self._get_themes_info(hass) + except Exception: # noqa: BLE001 + # Broad exception catch for robustness in support package generation + markdown += "## Custom Themes\n\n" + markdown += "Unable to collect themes information\n\n" + else: + markdown += "## Custom Themes\n\n" + markdown += f"Custom themes: {themes_info['count']}\n\n" + + if themes_info["themes"]: + markdown += "
Custom themes\n\n" + markdown += "Name\n" + markdown += "---\n" + for theme in themes_info["themes"]: + markdown += f"{theme}\n" + markdown += "\n
\n\n" + for domain, domain_info in domains_info.items(): domain_info_md = get_domain_table_markdown(domain_info) markdown += ( diff --git a/tests/components/cloud/snapshots/test_http_api.ambr b/tests/components/cloud/snapshots/test_http_api.ambr index 78bf98d61997b..1c872bde63076 100644 --- a/tests/components/cloud/snapshots/test_http_api.ambr +++ b/tests/components/cloud/snapshots/test_http_api.ambr @@ -61,6 +61,19 @@ + ## Custom Themes + + Custom themes: 2 + +
Custom themes + + Name + --- + midnight + solarized-dark + +
+
mock_no_info_integration No information available @@ -173,6 +186,10 @@
+ ## Custom Themes + + Custom themes: 0 +
mock_no_info_integration No information available @@ -249,6 +266,10 @@ Unable to collect integration information + ## Custom Themes + + Custom themes: 0 +
mock_no_info_integration No information available diff --git a/tests/components/cloud/test_http_api.py b/tests/components/cloud/test_http_api.py index 025024828fc50..ce450b89cc6a2 100644 --- a/tests/components/cloud/test_http_api.py +++ b/tests/components/cloud/test_http_api.py @@ -34,6 +34,7 @@ ) from homeassistant.components.cloud.const import DEFAULT_EXPOSED_DOMAINS, DOMAIN from homeassistant.components.cloud.http_api import validate_language_voice +from homeassistant.components.frontend import DATA_THEMES from homeassistant.components.google_assistant.helpers import ( # pylint: disable=home-assistant-component-root-import GoogleEntity, ) @@ -1891,6 +1892,12 @@ async def mock_empty_info(hass: HomeAssistant) -> dict[str, Any]: assert await async_setup_component(hass, "system_health", {}) + # Register custom themes so the support package surfaces them + hass.data[DATA_THEMES] = { + "midnight": {"primary-color": "#000000"}, + "solarized-dark": {"primary-color": "#002b36"}, + } + with patch("uuid.UUID.hex", new_callable=PropertyMock) as hexmock: hexmock.return_value = "12345678901234567890" assert await async_setup_component( From c901160fb38bac91c4ad2bc980a6ed0358abf553 Mon Sep 17 00:00:00 2001 From: fdebrus <33791533+fdebrus@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:44:53 +0200 Subject: [PATCH 11/39] Bump aioaquarite to 0.5.1 (#172754) Co-authored-by: Claude --- homeassistant/components/vistapool/manifest.json | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/vistapool/manifest.json b/homeassistant/components/vistapool/manifest.json index 1dc6f481784c8..4f2c74d962a2b 100644 --- a/homeassistant/components/vistapool/manifest.json +++ b/homeassistant/components/vistapool/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_push", "loggers": ["aioaquarite"], "quality_scale": "bronze", - "requirements": ["aioaquarite==0.4.0"] + "requirements": ["aioaquarite==0.5.1"] } diff --git a/requirements_all.txt b/requirements_all.txt index c5a0dbf9a64bb..41f2ef561f456 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -203,7 +203,7 @@ aioapcaccess==1.0.0 aioaquacell==1.0.0 # homeassistant.components.vistapool -aioaquarite==0.4.0 +aioaquarite==0.5.1 # homeassistant.components.aseko_pool_live aioaseko==1.0.0 From 25f18c60826f545cac5c6e4f52f54fbe916afbf3 Mon Sep 17 00:00:00 2001 From: jameson_uk <1040621+jamesonuk@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:03:02 +0100 Subject: [PATCH 12/39] media_player platform fixes for Alexa Devices (#172611) --- .../components/alexa_devices/coordinator.py | 21 ++++++++- .../components/alexa_devices/media_player.py | 24 +++++++--- .../components/alexa_devices/strings.json | 3 ++ .../alexa_devices/test_coordinator.py | 45 +++++++++++++++++++ .../alexa_devices/test_media_player.py | 25 +++++++++++ 5 files changed, 110 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/alexa_devices/coordinator.py b/homeassistant/components/alexa_devices/coordinator.py index 80a693c50135c..4a67f5758172a 100644 --- a/homeassistant/components/alexa_devices/coordinator.py +++ b/homeassistant/components/alexa_devices/coordinator.py @@ -204,7 +204,26 @@ def vocal_records(self) -> dict[str, AmazonVocalRecord]: async def sync_media_state(self) -> None: """Sync media state.""" - await self.api.sync_media_state() + try: + await self.api.sync_media_state() + except CannotAuthenticate as err: + raise ConfigEntryAuthFailed( + translation_domain=DOMAIN, + translation_key="invalid_auth", + translation_placeholders={"error": repr(err)}, + ) from err + except (CannotConnect, TimeoutError) as err: + raise ConfigEntryNotReady( + translation_domain=DOMAIN, + translation_key="cannot_connect_with_error", + translation_placeholders={"error": repr(err)}, + ) from err + except (CannotRetrieveData, ValueError) as err: + raise ConfigEntryNotReady( + translation_domain=DOMAIN, + translation_key="cannot_retrieve_data_with_error", + translation_placeholders={"error": repr(err)}, + ) from err async def media_state_event_handler( self, media_state: dict[str, AmazonMediaState] diff --git a/homeassistant/components/alexa_devices/media_player.py b/homeassistant/components/alexa_devices/media_player.py index e222ab02820cf..fe94b98b11840 100644 --- a/homeassistant/components/alexa_devices/media_player.py +++ b/homeassistant/components/alexa_devices/media_player.py @@ -156,9 +156,11 @@ def volume_level(self) -> float | None: @property def is_volume_muted(self) -> bool | None: """Return True if the volume is muted.""" - if not self.volume_state: + if not self.volume_state or self.volume_state.volume is None: return None - return self.volume_state.volume == 0 + # is_muted is True when Alexa has muted the device + # volume == 0 is where we have muted by setting volume to 0 + return self.volume_state.is_muted or self.volume_state.volume == 0 @property def media_title(self) -> str | None: @@ -259,12 +261,20 @@ async def async_mute_volume(self, mute: bool) -> None: return if mute: self._prev_volume = self.volume_state.volume - target_volume = 0 - else: - if self._prev_volume is None: - return - target_volume = self._prev_volume + await self.async_set_volume_level(0) + return + + if self.volume_state.is_muted and self._prev_volume is None: + # is muted by Alexa which we can see but not control + # when muted this way, volume is still set + # changing volume will unmute + # if HA set volume to 0 then Alexa muted we just default to 30% + self._prev_volume = self.volume_state.volume or 30 + if self._prev_volume is None: + return + target_volume = self._prev_volume await self.async_set_volume_level(target_volume / 100) + self._prev_volume = None @alexa_api_call async def _send_media_command(self, command: AmazonMediaControls) -> None: diff --git a/homeassistant/components/alexa_devices/strings.json b/homeassistant/components/alexa_devices/strings.json index 0ec611a8d62c9..fcb8ab13b9c5e 100644 --- a/homeassistant/components/alexa_devices/strings.json +++ b/homeassistant/components/alexa_devices/strings.json @@ -125,6 +125,9 @@ }, "invalid_sound_value": { "message": "Invalid sound {sound} specified" + }, + "unknown_exception": { + "message": "Unknown error occurred: {error}" } }, "selector": { diff --git a/tests/components/alexa_devices/test_coordinator.py b/tests/components/alexa_devices/test_coordinator.py index 73854f0de76db..427d38e3a4b22 100644 --- a/tests/components/alexa_devices/test_coordinator.py +++ b/tests/components/alexa_devices/test_coordinator.py @@ -126,3 +126,48 @@ async def test_sync_history_state_error( await hass.async_block_till_done() assert mock_config_entry.state is expected_state + + +@pytest.mark.parametrize( + ("side_effect", "expected_state"), + [ + pytest.param( + CannotAuthenticate, + ConfigEntryState.SETUP_ERROR, + id="cannot_authenticate", + ), + pytest.param( + CannotConnect, + ConfigEntryState.SETUP_RETRY, + id="cannot_connect", + ), + pytest.param( + TimeoutError, + ConfigEntryState.SETUP_RETRY, + id="timeout_error", + ), + pytest.param( + CannotRetrieveData, + ConfigEntryState.SETUP_RETRY, + id="cannot_retrieve_data", + ), + pytest.param( + ValueError, + ConfigEntryState.SETUP_RETRY, + id="value_error", + ), + ], +) +async def test_sync_media_state_auth_failed( + hass: HomeAssistant, + mock_amazon_devices_client: AsyncMock, + mock_config_entry: MockConfigEntry, + side_effect: type[Exception], + expected_state: ConfigEntryState, +) -> None: + """Test setup fails with ConfigEntryAuthFailed when sync_media_state raises CannotAuthenticate.""" + mock_amazon_devices_client.sync_media_state.side_effect = side_effect + + await setup_integration(hass, mock_config_entry) + + assert mock_config_entry.state is expected_state diff --git a/tests/components/alexa_devices/test_media_player.py b/tests/components/alexa_devices/test_media_player.py index 8d1399514e733..c470eeafa4730 100644 --- a/tests/components/alexa_devices/test_media_player.py +++ b/tests/components/alexa_devices/test_media_player.py @@ -700,3 +700,28 @@ async def test_unmute_volume_without_prev_volume_returns_early( ) mock_amazon_devices_client.set_device_volume.assert_not_awaited() + + +async def test_unmute_volume_when_alexa_muted_restores_current_volume( + hass: HomeAssistant, + mock_amazon_devices_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Unmute restores current volume when device was muted directly by Alexa.""" + await _setup_media_player_platform(hass, mock_config_entry) + + await _push_volume_state( + mock_amazon_devices_client, + volume_state=AmazonVolumeState(volume=30, is_muted=True), + ) + await hass.async_block_till_done() + + await hass.services.async_call( + MP_DOMAIN, + SERVICE_VOLUME_MUTE, + {ATTR_ENTITY_ID: ENTITY_ID, ATTR_MEDIA_VOLUME_MUTED: False}, + blocking=True, + ) + + mock_amazon_devices_client.set_device_volume.assert_awaited_once() + assert mock_amazon_devices_client.set_device_volume.call_args.args[1] == 30 From 7fb475aad12d223bd77ca2919820baeaaeecc942 Mon Sep 17 00:00:00 2001 From: Marcello <58506324+Marcello17@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:30:18 +0200 Subject: [PATCH 13/39] Add cover platform to Fluss (#169908) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Joostlek --- homeassistant/components/fluss/__init__.py | 2 +- homeassistant/components/fluss/const.py | 1 + homeassistant/components/fluss/coordinator.py | 32 ++- homeassistant/components/fluss/cover.py | 89 ++++++ homeassistant/components/fluss/strings.json | 5 + tests/components/fluss/__init__.py | 2 +- .../fluss/snapshots/test_cover.ambr | 107 ++++++++ tests/components/fluss/test_button.py | 15 +- tests/components/fluss/test_cover.py | 254 ++++++++++++++++++ tests/components/fluss/test_init.py | 7 +- 10 files changed, 491 insertions(+), 23 deletions(-) create mode 100644 homeassistant/components/fluss/cover.py create mode 100644 tests/components/fluss/snapshots/test_cover.ambr create mode 100644 tests/components/fluss/test_cover.py diff --git a/homeassistant/components/fluss/__init__.py b/homeassistant/components/fluss/__init__.py index 386b0232c1ffe..d2661ec029e51 100644 --- a/homeassistant/components/fluss/__init__.py +++ b/homeassistant/components/fluss/__init__.py @@ -5,7 +5,7 @@ from .coordinator import FlussConfigEntry, FlussDataUpdateCoordinator -PLATFORMS: list[Platform] = [Platform.BUTTON] +PLATFORMS: list[Platform] = [Platform.BUTTON, Platform.COVER] async def async_setup_entry( diff --git a/homeassistant/components/fluss/const.py b/homeassistant/components/fluss/const.py index d4480136341d7..33bf1842d428c 100644 --- a/homeassistant/components/fluss/const.py +++ b/homeassistant/components/fluss/const.py @@ -6,3 +6,4 @@ DOMAIN = "fluss" LOGGER = logging.getLogger(__name__) UPDATE_INTERVAL = timedelta(minutes=30) +COMMAND_REFRESH_COOLDOWN = 10 diff --git a/homeassistant/components/fluss/coordinator.py b/homeassistant/components/fluss/coordinator.py index 5c2d9e6710433..165fe244e04b3 100644 --- a/homeassistant/components/fluss/coordinator.py +++ b/homeassistant/components/fluss/coordinator.py @@ -13,10 +13,11 @@ from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryError from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.debounce import Debouncer from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.util import slugify -from .const import LOGGER, UPDATE_INTERVAL +from .const import COMMAND_REFRESH_COOLDOWN, LOGGER, UPDATE_INTERVAL type FlussConfigEntry = ConfigEntry[FlussDataUpdateCoordinator] @@ -35,18 +36,24 @@ def __init__( name=f"Fluss+ ({slugify(api_key[:8])})", config_entry=config_entry, update_interval=UPDATE_INTERVAL, + request_refresh_debouncer=Debouncer( + hass, + LOGGER, + cooldown=COMMAND_REFRESH_COOLDOWN, + immediate=False, + ), ) - async def _async_get_connectivity(self, device_id: str) -> bool: - """Return connectivity for a device; False if the status call fails.""" + async def _async_get_status(self, device_id: str) -> dict[str, Any]: + """Return per-device status.""" try: - status = await self.api.async_get_device_status(device_id) - except FlussApiClientError: - return False - return status["status"]["internetConnected"] + response = await self.api.async_get_device_status(device_id) + except FlussApiClientError as err: + raise UpdateFailed(f"Error fetching status for {device_id}: {err}") from err + return response["status"] async def _async_update_data(self) -> dict[str, dict[str, Any]]: - """Fetch Fluss+ devices and merge per-device connectivity status.""" + """Fetch Fluss+ devices and merge per-device status.""" try: devices = await self.api.async_get_devices() except FlussApiClientAuthenticationError as err: @@ -59,10 +66,11 @@ async def _async_update_data(self) -> dict[str, dict[str, Any]]: for device in devices["devices"] if device["userPermissions"]["canUseWiFi"] ] - connectivity = await asyncio.gather( - *(self._async_get_connectivity(d["deviceId"]) for d in device_list) + + statuses = await asyncio.gather( + *(self._async_get_status(d["deviceId"]) for d in device_list) ) return { - device["deviceId"]: {**device, "internetConnected": connected} - for device, connected in zip(device_list, connectivity, strict=False) + device["deviceId"]: {**device, **status} + for device, status in zip(device_list, statuses, strict=False) } diff --git a/homeassistant/components/fluss/cover.py b/homeassistant/components/fluss/cover.py new file mode 100644 index 0000000000000..541dc48ada5e1 --- /dev/null +++ b/homeassistant/components/fluss/cover.py @@ -0,0 +1,89 @@ +"""Cover platform for Fluss+ devices that report an open/closed status.""" + +from typing import Any + +from homeassistant.components.cover import ( + CoverDeviceClass, + CoverEntity, + CoverEntityFeature, +) +from homeassistant.core import HomeAssistant +from homeassistant.exceptions import HomeAssistantError +from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback + +from .const import DOMAIN +from .coordinator import FlussApiClientError, FlussConfigEntry +from .entity import FlussEntity + +PARALLEL_UPDATES = 0 + +STATUS_OPEN = "Open" +STATUS_CLOSED = "Closed" + + +async def async_setup_entry( + hass: HomeAssistant, + entry: FlussConfigEntry, + async_add_entities: AddConfigEntryEntitiesCallback, +) -> None: + """Set up Fluss covers for devices that report an open/closed status.""" + coordinator = entry.runtime_data + added_device_ids: set[str] = set() + + def _async_add_new_entities() -> None: + new_entities = [ + FlussCover(coordinator, device_id, device) + for device_id, device in coordinator.data.items() + if "openCloseStatus" in device and device_id not in added_device_ids + ] + if not new_entities: + return + + added_device_ids.update(entity.device_id for entity in new_entities) + async_add_entities(new_entities) + + _async_add_new_entities() + entry.async_on_unload(coordinator.async_add_listener(_async_add_new_entities)) + + +class FlussCover(FlussEntity, CoverEntity): + """Representation of a Fluss+ cover.""" + + _attr_device_class = CoverDeviceClass.GARAGE + _attr_name = None + _attr_supported_features = CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE + + @property + def available(self) -> bool: + """Return True only when the device is online.""" + return super().available and self.device["internetConnected"] + + @property + def is_closed(self) -> bool | None: + """Return whether the cover is closed.""" + status = self.device.get("openCloseStatus") + if status == STATUS_CLOSED: + return True + if status == STATUS_OPEN: + return False + return None + + async def async_open_cover(self, **kwargs: Any) -> None: + """Open the cover.""" + try: + await self.coordinator.api.async_open_device(self.device_id) + except FlussApiClientError as err: + raise HomeAssistantError( + translation_domain=DOMAIN, translation_key="command_failed" + ) from err + await self.coordinator.async_request_refresh() + + async def async_close_cover(self, **kwargs: Any) -> None: + """Close the cover.""" + try: + await self.coordinator.api.async_close_device(self.device_id) + except FlussApiClientError as err: + raise HomeAssistantError( + translation_domain=DOMAIN, translation_key="command_failed" + ) from err + await self.coordinator.async_request_refresh() diff --git a/homeassistant/components/fluss/strings.json b/homeassistant/components/fluss/strings.json index cf63c7ff91ac6..adc19193b68ba 100644 --- a/homeassistant/components/fluss/strings.json +++ b/homeassistant/components/fluss/strings.json @@ -19,5 +19,10 @@ "description": "Your Fluss API key, available in the profile page of the Fluss+ app" } } + }, + "exceptions": { + "command_failed": { + "message": "Failed to send command to Fluss+ device" + } } } diff --git a/tests/components/fluss/__init__.py b/tests/components/fluss/__init__.py index 8feb955051ed8..ee96286841ca2 100644 --- a/tests/components/fluss/__init__.py +++ b/tests/components/fluss/__init__.py @@ -93,5 +93,5 @@ async def test_platforms_forwarded( await hass.config_entries.async_setup(mock_config_entry.entry_id) assert mock_config_entry.state is ConfigEntryState.LOADED hass.config_entries.async_forward_entry_setups.assert_called_with( - mock_config_entry, [Platform.BUTTON] + mock_config_entry, [Platform.BUTTON, Platform.COVER] ) diff --git a/tests/components/fluss/snapshots/test_cover.ambr b/tests/components/fluss/snapshots/test_cover.ambr new file mode 100644 index 0000000000000..5f2375e4b2afd --- /dev/null +++ b/tests/components/fluss/snapshots/test_cover.ambr @@ -0,0 +1,107 @@ +# serializer version: 1 +# name: test_covers[cover.device_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'cover', + 'entity_category': None, + 'entity_id': 'cover.device_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': None, + 'platform': 'fluss', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': None, + 'unique_id': '2a303030sdj1', + 'unit_of_measurement': None, + }) +# --- +# name: test_covers[cover.device_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'garage', + 'friendly_name': 'Device 1', + 'is_closed': True, + 'supported_features': , + }), + 'context': , + 'entity_id': 'cover.device_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- +# name: test_covers[cover.device_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'cover', + 'entity_category': None, + 'entity_id': 'cover.device_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': None, + 'platform': 'fluss', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': None, + 'unique_id': 'ape93k9302j2', + 'unit_of_measurement': None, + }) +# --- +# name: test_covers[cover.device_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'garage', + 'friendly_name': 'Device 2', + 'is_closed': False, + 'supported_features': , + }), + 'context': , + 'entity_id': 'cover.device_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'open', + }) +# --- diff --git a/tests/components/fluss/test_button.py b/tests/components/fluss/test_button.py index f0d8ef811f01a..eb2ea4f2ab66f 100644 --- a/tests/components/fluss/test_button.py +++ b/tests/components/fluss/test_button.py @@ -3,10 +3,12 @@ from unittest.mock import AsyncMock from fluss_api import FlussApiClient, FlussApiClientError +from freezegun.api import FrozenDateTimeFactory import pytest from syrupy.assertion import SnapshotAssertion from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS +from homeassistant.components.fluss.const import UPDATE_INTERVAL from homeassistant.const import ATTR_ENTITY_ID, STATE_UNAVAILABLE from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError @@ -14,7 +16,7 @@ from . import setup_integration -from tests.common import MockConfigEntry, snapshot_platform +from tests.common import MockConfigEntry, async_fire_time_changed, snapshot_platform async def test_buttons( @@ -80,13 +82,18 @@ async def test_button_unavailable_on_status_error( hass: HomeAssistant, mock_api_client: AsyncMock, mock_config_entry: MockConfigEntry, + freezer: FrozenDateTimeFactory, ) -> None: - """Buttons become unavailable when the status call errors.""" + """Buttons become unavailable when a status refresh errors.""" + await setup_integration(hass, mock_config_entry) + assert hass.states.get("button.device_1").state != STATE_UNAVAILABLE + mock_api_client.async_get_device_status.side_effect = FlussApiClientError( "device offline" ) - - await setup_integration(hass, mock_config_entry) + freezer.tick(UPDATE_INTERVAL) + async_fire_time_changed(hass) + await hass.async_block_till_done(wait_background_tasks=True) assert hass.states.get("button.device_1").state == STATE_UNAVAILABLE assert hass.states.get("button.device_2").state == STATE_UNAVAILABLE diff --git a/tests/components/fluss/test_cover.py b/tests/components/fluss/test_cover.py new file mode 100644 index 0000000000000..d0604136af8c3 --- /dev/null +++ b/tests/components/fluss/test_cover.py @@ -0,0 +1,254 @@ +"""Tests for the Fluss+ cover platform.""" + +from datetime import timedelta +from typing import Any +from unittest.mock import AsyncMock, patch + +from fluss_api import FlussApiClientError +from freezegun.api import FrozenDateTimeFactory +import pytest +from syrupy.assertion import SnapshotAssertion + +from homeassistant.components.cover import ( + DOMAIN as COVER_DOMAIN, + SERVICE_CLOSE_COVER, + SERVICE_OPEN_COVER, +) +from homeassistant.components.fluss.const import DOMAIN, UPDATE_INTERVAL +from homeassistant.const import ( + ATTR_ENTITY_ID, + STATE_CLOSED, + STATE_OPEN, + STATE_UNAVAILABLE, + Platform, +) +from homeassistant.core import HomeAssistant +from homeassistant.exceptions import HomeAssistantError +from homeassistant.helpers import entity_registry as er +from homeassistant.util import dt as dt_util + +from . import setup_integration + +from tests.common import MockConfigEntry, async_fire_time_changed, snapshot_platform + +ENTITY_ID_1 = "cover.device_1" +DEVICE_ID_1 = "2a303030sdj1" +DEVICE_ID_2 = "ape93k9302j2" + + +async def test_covers( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + entity_registry: er.EntityRegistry, + snapshot: SnapshotAssertion, +) -> None: + """Test cover entity registration.""" + + async def _status(device_id: str) -> dict[str, Any]: + """Return distinct openCloseStatus per device for snapshot diversity.""" + return { + "status": { + "internetConnected": True, + "openCloseStatus": "Closed" if device_id == DEVICE_ID_1 else "Open", + } + } + + mock_api_client.async_get_device_status.side_effect = _status + with patch("homeassistant.components.fluss.PLATFORMS", [Platform.COVER]): + await setup_integration(hass, mock_config_entry) + await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) + + +@pytest.mark.parametrize( + ("status_value", "expected_state"), + [("Closed", STATE_CLOSED), ("Open", STATE_OPEN)], +) +async def test_cover_state( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + status_value: str, + expected_state: str, +) -> None: + """The API returns either "Open" or "Closed" — verify both map correctly.""" + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": status_value} + } + await setup_integration(hass, mock_config_entry) + + state = hass.states.get(ENTITY_ID_1) + assert state is not None + assert state.state == expected_state + + +async def test_cover_unavailable_when_offline( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Covers become unavailable when the device reports no internet.""" + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": False, "openCloseStatus": "Closed"} + } + await setup_integration(hass, mock_config_entry) + + assert hass.states.get(ENTITY_ID_1).state == STATE_UNAVAILABLE + + +async def test_cover_unavailable_on_transient_status_error( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + entity_registry: er.EntityRegistry, + freezer: FrozenDateTimeFactory, +) -> None: + """A failed per-device status fetch raises UpdateFailed and marks the cover unavailable.""" + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": "Closed"} + } + await setup_integration(hass, mock_config_entry) + assert hass.states.get(ENTITY_ID_1).state == STATE_CLOSED + + mock_api_client.async_get_device_status.side_effect = FlussApiClientError("boom") + freezer.tick(UPDATE_INTERVAL) + async_fire_time_changed(hass) + await hass.async_block_till_done(wait_background_tasks=True) + + assert hass.states.get(ENTITY_ID_1).state == STATE_UNAVAILABLE + assert entity_registry.async_get(ENTITY_ID_1) is not None + + +@pytest.mark.parametrize( + ("service", "method"), + [ + (SERVICE_OPEN_COVER, "async_open_device"), + (SERVICE_CLOSE_COVER, "async_close_device"), + ], +) +async def test_cover_commands( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + service: str, + method: str, +) -> None: + """Open and close hit the matching API method.""" + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": "Closed"} + } + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + COVER_DOMAIN, + service, + {ATTR_ENTITY_ID: ENTITY_ID_1}, + blocking=True, + ) + await hass.async_block_till_done() + + getattr(mock_api_client, method).assert_called_once_with(DEVICE_ID_1) + + +@pytest.mark.parametrize( + ("service", "method", "post_status", "expected_state"), + [ + (SERVICE_OPEN_COVER, "async_open_device", "Open", STATE_OPEN), + (SERVICE_CLOSE_COVER, "async_close_device", "Closed", STATE_CLOSED), + ], +) +async def test_cover_press_triggers_debounced_refresh( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + service: str, + method: str, + post_status: str, + expected_state: str, +) -> None: + """A press requests a coordinator refresh, debounced by the cooldown.""" + initial_status = "Open" if post_status == "Closed" else "Closed" + initial_state = STATE_OPEN if initial_status == "Open" else STATE_CLOSED + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": initial_status} + } + await setup_integration(hass, mock_config_entry) + assert hass.states.get(ENTITY_ID_1).state == initial_state + + pre_press_call_count = mock_api_client.async_get_device_status.call_count + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": post_status} + } + + await hass.services.async_call( + COVER_DOMAIN, + service, + {ATTR_ENTITY_ID: ENTITY_ID_1}, + blocking=True, + ) + + # immediate=False on the debouncer means no refresh until the cooldown. + assert mock_api_client.async_get_device_status.call_count == pre_press_call_count + assert hass.states.get(ENTITY_ID_1).state == initial_state + + async_fire_time_changed(hass, dt_util.utcnow() + timedelta(seconds=11)) + await hass.async_block_till_done() + + mock_api_client.async_get_device_status.assert_any_call(DEVICE_ID_1) + assert hass.states.get(ENTITY_ID_1).state == expected_state + + +@pytest.mark.parametrize( + ("service", "method"), + [ + (SERVICE_OPEN_COVER, "async_open_device"), + (SERVICE_CLOSE_COVER, "async_close_device"), + ], +) +async def test_cover_command_error( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + service: str, + method: str, +) -> None: + """Library errors are translated to HomeAssistantError with a translation key.""" + mock_api_client.async_get_device_status.return_value = { + "status": {"internetConnected": True, "openCloseStatus": "Closed"} + } + await setup_integration(hass, mock_config_entry) + + getattr(mock_api_client, method).side_effect = FlussApiClientError("boom") + + with pytest.raises(HomeAssistantError) as excinfo: + await hass.services.async_call( + COVER_DOMAIN, + service, + {ATTR_ENTITY_ID: ENTITY_ID_1}, + blocking=True, + ) + assert excinfo.value.translation_domain == DOMAIN + assert excinfo.value.translation_key == "command_failed" + + +async def test_mixed_device_dispatch( + hass: HomeAssistant, + mock_api_client: AsyncMock, + mock_config_entry: MockConfigEntry, + entity_registry: er.EntityRegistry, +) -> None: + """A device with openCloseStatus exposes both a cover and a button; a device without exposes only a button.""" + + async def _status(device_id: str) -> dict[str, Any]: + """Return openCloseStatus for device 1; omit it for device 2.""" + if device_id == DEVICE_ID_1: + return {"status": {"internetConnected": True, "openCloseStatus": "Closed"}} + return {"status": {"internetConnected": True}} + + mock_api_client.async_get_device_status.side_effect = _status + await setup_integration(hass, mock_config_entry) + + assert entity_registry.async_get("cover.device_1") is not None + assert entity_registry.async_get("button.device_1") is not None + assert entity_registry.async_get("button.device_2") is not None + assert entity_registry.async_get("cover.device_2") is None diff --git a/tests/components/fluss/test_init.py b/tests/components/fluss/test_init.py index 8b6be593090a3..c0c66646bc896 100644 --- a/tests/components/fluss/test_init.py +++ b/tests/components/fluss/test_init.py @@ -10,7 +10,6 @@ import pytest from homeassistant.config_entries import ConfigEntryState -from homeassistant.const import STATE_UNAVAILABLE from homeassistant.core import HomeAssistant from . import setup_integration @@ -57,7 +56,7 @@ async def test_async_setup_entry_authentication_error( assert mock_config_entry.state is state -async def test_status_authentication_error_marks_device_offline( +async def test_status_error_during_setup_retries( hass: HomeAssistant, mock_config_entry: MockConfigEntry, mock_api_client: AsyncMock, @@ -68,6 +67,4 @@ async def test_status_authentication_error_marks_device_offline( ) await setup_integration(hass, mock_config_entry) - assert mock_config_entry.state is ConfigEntryState.LOADED - assert hass.states.get("button.device_1").state == STATE_UNAVAILABLE - assert hass.states.get("button.device_2").state == STATE_UNAVAILABLE + assert mock_config_entry.state is ConfigEntryState.SETUP_RETRY From d7219aa0256e4b00e97c568cd42c7757be4918a5 Mon Sep 17 00:00:00 2001 From: "A. Gideonse" Date: Mon, 1 Jun 2026 20:39:30 +0200 Subject: [PATCH 14/39] Fix binary sensor defaults for Indevolt (#172714) --- homeassistant/components/indevolt/binary_sensor.py | 8 ++------ tests/components/indevolt/fixtures/gen_2.json | 12 ++++++------ .../indevolt/snapshots/test_diagnostics.ambr | 12 ++++++------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/homeassistant/components/indevolt/binary_sensor.py b/homeassistant/components/indevolt/binary_sensor.py index 1be4bf6364a50..2e372d35a0322 100644 --- a/homeassistant/components/indevolt/binary_sensor.py +++ b/homeassistant/components/indevolt/binary_sensor.py @@ -25,8 +25,8 @@ class IndevoltBinarySensorEntityDescription(BinarySensorEntityDescription): """Custom entity description class for Indevolt binary sensors.""" - on_value: int = 1 - off_value: int = 0 + on_value: int = 1000 + off_value: int = 1001 generation: tuple[int, ...] = (1, 2) @@ -35,8 +35,6 @@ class IndevoltBinarySensorEntityDescription(BinarySensorEntityDescription): IndevoltBinarySensorEntityDescription( key=IndevoltGrid.METER_CONNECTED, translation_key="meter_connected", - on_value=1000, - off_value=1001, device_class=BinarySensorDeviceClass.CONNECTIVITY, entity_category=EntityCategory.DIAGNOSTIC, entity_registry_enabled_default=False, @@ -46,8 +44,6 @@ class IndevoltBinarySensorEntityDescription(BinarySensorEntityDescription): key=IndevoltSystem.HEATING_STATE, generation=(1,), translation_key="electric_heating_state", - on_value=1000, - off_value=1001, entity_category=EntityCategory.DIAGNOSTIC, entity_registry_enabled_default=False, ), diff --git a/tests/components/indevolt/fixtures/gen_2.json b/tests/components/indevolt/fixtures/gen_2.json index e33ca3ca40911..323307c038d32 100644 --- a/tests/components/indevolt/fixtures/gen_2.json +++ b/tests/components/indevolt/fixtures/gen_2.json @@ -24,12 +24,12 @@ "6006": 380.58, "6007": 338.07, "7120": 1001, - "9080": 1, - "9096": 1, - "9112": 0, - "9128": 1, - "9144": 0, - "9279": 1, + "9080": 1000, + "9096": 1000, + "9112": 1001, + "9128": 1000, + "9144": 1001, + "9279": 1000, "11016": 0, "2600": 1200, "2612": 50.0, diff --git a/tests/components/indevolt/snapshots/test_diagnostics.ambr b/tests/components/indevolt/snapshots/test_diagnostics.ambr index 8797eeeedeaa8..e9204025047fe 100644 --- a/tests/components/indevolt/snapshots/test_diagnostics.ambr +++ b/tests/components/indevolt/snapshots/test_diagnostics.ambr @@ -136,15 +136,15 @@ '9058': 51.1, '9068': 25.0, '9070': '**REDACTED**', - '9080': 1, + '9080': 1000, '9085': 31.5, - '9096': 1, + '9096': 1000, '9101': 32.8, - '9112': 0, + '9112': 1001, '9117': 31.9, - '9128': 1, + '9128': 1000, '9133': 33.0, - '9144': 0, + '9144': 1001, '9149': 94, '9152': 125, '9153': 51.4, @@ -156,7 +156,7 @@ '9216': 24.9, '9218': '**REDACTED**', '9270': 31.2, - '9279': 1, + '9279': 1000, }), 'device': dict({ 'firmware_version': '1.2.3', From be2aaf926b4e08015ec64ff83d20663b6ca5f4bc Mon Sep 17 00:00:00 2001 From: Yardian Support Date: Tue, 2 Jun 2026 02:40:05 +0800 Subject: [PATCH 15/39] Support Yardian YC models (#172347) Co-authored-by: Joostlek --- homeassistant/components/yardian/__init__.py | 7 +- .../components/yardian/config_flow.py | 4 +- tests/components/yardian/conftest.py | 13 +- tests/components/yardian/test_config_flow.py | 197 ++++-------------- 4 files changed, 59 insertions(+), 162 deletions(-) diff --git a/homeassistant/components/yardian/__init__.py b/homeassistant/components/yardian/__init__.py index 24df2a41ff73e..96daa42561bb0 100644 --- a/homeassistant/components/yardian/__init__.py +++ b/homeassistant/components/yardian/__init__.py @@ -21,7 +21,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: YardianConfigEntry) -> b host = entry.data[CONF_HOST] access_token = entry.data[CONF_ACCESS_TOKEN] - controller = AsyncYardianClient(async_get_clientsession(hass), host, access_token) + # Change this line to use .create() + # This ensures the coordinator's controller knows if it is YP or YC + controller = await AsyncYardianClient.create( + async_get_clientsession(hass), host, token=access_token + ) + coordinator = YardianUpdateCoordinator(hass, entry, controller) await coordinator.async_config_entry_first_refresh() diff --git a/homeassistant/components/yardian/config_flow.py b/homeassistant/components/yardian/config_flow.py index 632ebc52e8ea6..b7863918346ae 100644 --- a/homeassistant/components/yardian/config_flow.py +++ b/homeassistant/components/yardian/config_flow.py @@ -34,10 +34,10 @@ class YardianConfigFlow(ConfigFlow, domain=DOMAIN): async def async_fetch_device_info(self, host: str, access_token: str) -> DeviceInfo: """Fetch device info from Yardian.""" - yarcli = AsyncYardianClient( + yarcli = await AsyncYardianClient.create( async_get_clientsession(self.hass), host, - access_token, + token=access_token, ) return await yarcli.fetch_device_info() diff --git a/tests/components/yardian/conftest.py b/tests/components/yardian/conftest.py index 045ae9aca90f9..ca80dc796cec0 100644 --- a/tests/components/yardian/conftest.py +++ b/tests/components/yardian/conftest.py @@ -32,7 +32,7 @@ def mock_config_entry() -> MockConfigEntry: CONF_ACCESS_TOKEN: "abc", CONF_NAME: "Yardian", "yid": "yid123", - "model": "PRO1902", + "model": "PRO1902C1", "serialNumber": "SN1", }, title="Yardian Smart Sprinkler", @@ -48,12 +48,17 @@ def mock_yardian_client() -> Generator[AsyncMock]: ) as client_cls, patch( "homeassistant.components.yardian.config_flow.AsyncYardianClient", - autospec=True, - ) as flow_client_cls, + new=client_cls, + ), ): client = client_cls.return_value - flow_client_cls.return_value = client + client_cls.create.return_value = client + + client.fetch_device_info.return_value = { + "name": "fake_name", + "yid": "fake_yid", + } client.fetch_device_state.return_value = YardianDeviceState( zones=[["Zone 1", 1], ["Zone 2", 0]], active_zones={0}, diff --git a/tests/components/yardian/test_config_flow.py b/tests/components/yardian/test_config_flow.py index 1630286733f02..580a1d914295b 100644 --- a/tests/components/yardian/test_config_flow.py +++ b/tests/components/yardian/test_config_flow.py @@ -1,189 +1,76 @@ """Test the Yardian config flow.""" -from unittest.mock import AsyncMock, patch +from unittest.mock import AsyncMock import pytest from pyyardian import NetworkException, NotAuthorizedException -from homeassistant import config_entries from homeassistant.components.yardian.const import DOMAIN, PRODUCT_NAME +from homeassistant.config_entries import SOURCE_USER from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType -pytestmark = pytest.mark.usefixtures("mock_setup_entry") +pytestmark = pytest.mark.usefixtures("mock_setup_entry", "mock_yardian_client") -async def test_form(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None: +async def test_form(hass: HomeAssistant) -> None: """Test we get the form.""" result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} + DOMAIN, context={"source": SOURCE_USER} ) assert result["type"] is FlowResultType.FORM - assert result["errors"] == {} - - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - return_value={"name": "fake_name", "yid": "fake_yid"}, - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - await hass.async_block_till_done() - - assert result2["type"] is FlowResultType.CREATE_ENTRY - assert result2["title"] == PRODUCT_NAME - assert result2["data"] == { - "host": "fake_host", - "access_token": "fake_token", - "name": "fake_name", - "yid": "fake_yid", - } - assert len(mock_setup_entry.mock_calls) == 1 - -async def test_form_invalid_auth( - hass: HomeAssistant, mock_setup_entry: AsyncMock -) -> None: - """Test we handle invalid auth.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {"host": "fake_host", "access_token": "fake_token"}, ) + await hass.async_block_till_done() - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - side_effect=NotAuthorizedException, - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - - assert result2["type"] is FlowResultType.FORM - assert result2["errors"] == {"base": "invalid_auth"} - - # Should be recoverable after hits error - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - return_value={"name": "fake_name", "yid": "fake_yid"}, - ): - result3 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - await hass.async_block_till_done() - - assert result3["type"] is FlowResultType.CREATE_ENTRY - assert result3["title"] == PRODUCT_NAME - assert result3["data"] == { + assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["title"] == PRODUCT_NAME + assert result["data"] == { "host": "fake_host", "access_token": "fake_token", "name": "fake_name", "yid": "fake_yid", } - assert len(mock_setup_entry.mock_calls) == 1 -async def test_form_cannot_connect( - hass: HomeAssistant, mock_setup_entry: AsyncMock +@pytest.mark.parametrize( + ("exception", "error"), + [ + (NotAuthorizedException, "invalid_auth"), + (NetworkException, "cannot_connect"), + (Exception, "unknown"), + ], +) +async def test_form_errors( + hass: HomeAssistant, + mock_yardian_client: AsyncMock, + exception: Exception, + error: str, ) -> None: - """Test we handle cannot connect error.""" + """Test we handle errors and recover.""" + mock_yardian_client.fetch_device_info.side_effect = exception + result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} + DOMAIN, context={"source": SOURCE_USER} ) - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - side_effect=NetworkException, - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - - assert result2["type"] is FlowResultType.FORM - assert result2["errors"] == {"base": "cannot_connect"} - - # Should be recoverable after hits error - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - return_value={"name": "fake_name", "yid": "fake_yid"}, - ): - result3 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - await hass.async_block_till_done() - - assert result3["type"] is FlowResultType.CREATE_ENTRY - assert result3["title"] == PRODUCT_NAME - assert result3["data"] == { - "host": "fake_host", - "access_token": "fake_token", - "name": "fake_name", - "yid": "fake_yid", - } - assert len(mock_setup_entry.mock_calls) == 1 + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {"host": "fake_host", "access_token": "fake_token"}, + ) + assert result["type"] is FlowResultType.FORM + assert result["errors"] == {"base": error} -async def test_form_uncategorized_error( - hass: HomeAssistant, mock_setup_entry: AsyncMock -) -> None: - """Test we handle uncategorized error.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_USER} + mock_yardian_client.fetch_device_info.side_effect = None + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {"host": "fake_host", "access_token": "fake_token"}, ) + await hass.async_block_till_done() - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - side_effect=Exception, - ): - result2 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - - assert result2["type"] is FlowResultType.FORM - assert result2["errors"] == {"base": "unknown"} - - # Should be recoverable after hits error - with patch( - "homeassistant.components.yardian.config_flow.AsyncYardianClient.fetch_device_info", - return_value={"name": "fake_name", "yid": "fake_yid"}, - ): - result3 = await hass.config_entries.flow.async_configure( - result["flow_id"], - { - "host": "fake_host", - "access_token": "fake_token", - }, - ) - await hass.async_block_till_done() - - assert result3["type"] is FlowResultType.CREATE_ENTRY - assert result3["title"] == PRODUCT_NAME - assert result3["data"] == { - "host": "fake_host", - "access_token": "fake_token", - "name": "fake_name", - "yid": "fake_yid", - } - assert len(mock_setup_entry.mock_calls) == 1 + assert result["type"] is FlowResultType.CREATE_ENTRY From cad177cdffa97ba84b6f048a0a368c7c16d81cdb Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:46:42 +0200 Subject: [PATCH 16/39] Rename constant in reload helper test (#172711) --- tests/helpers/test_reload.py | 62 ++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/tests/helpers/test_reload.py b/tests/helpers/test_reload.py index e9dcdc32d41d5..df7c48d776447 100644 --- a/tests/helpers/test_reload.py +++ b/tests/helpers/test_reload.py @@ -30,7 +30,7 @@ _LOGGER = logging.getLogger(__name__) DOMAIN = "test_domain" -PLATFORM = "test_platform" +PLATFORM_DOMAIN = "test_platform" async def test_reload_platform(hass: HomeAssistant) -> None: @@ -43,34 +43,36 @@ async def setup_platform(*args): setup_called.append(args) mock_integration(hass, MockModule(DOMAIN, setup=component_setup)) - mock_integration(hass, MockModule(PLATFORM, dependencies=[DOMAIN])) + mock_integration(hass, MockModule(PLATFORM_DOMAIN, dependencies=[DOMAIN])) platform = MockPlatform(async_setup_platform=setup_platform) - mock_platform(hass, f"{PLATFORM}.{DOMAIN}", platform) + mock_platform(hass, f"{PLATFORM_DOMAIN}.{DOMAIN}", platform) component = EntityComponent(_LOGGER, DOMAIN, hass) - await component.async_setup({DOMAIN: {"platform": PLATFORM, "sensors": None}}) + await component.async_setup( + {DOMAIN: {"platform": PLATFORM_DOMAIN, "sensors": None}} + ) await hass.async_block_till_done() assert component_setup.called - assert f"{PLATFORM}.{DOMAIN}" in hass.config.components + assert f"{PLATFORM_DOMAIN}.{DOMAIN}" in hass.config.components assert len(setup_called) == 1 - platform = async_get_platform_without_config_entry(hass, PLATFORM, DOMAIN) - assert platform.platform_name == PLATFORM + platform = async_get_platform_without_config_entry(hass, PLATFORM_DOMAIN, DOMAIN) + assert platform.platform_name == PLATFORM_DOMAIN assert platform.domain == DOMAIN yaml_path = get_fixture_path("helpers/reload_configuration.yaml") with patch.object(config, "YAML_CONFIG_FILE", yaml_path): - await async_reload_integration_platforms(hass, PLATFORM, [DOMAIN]) + await async_reload_integration_platforms(hass, PLATFORM_DOMAIN, [DOMAIN]) assert len(setup_called) == 2 - existing_platforms = async_get_platforms(hass, PLATFORM) + existing_platforms = async_get_platforms(hass, PLATFORM_DOMAIN) for existing_platform in existing_platforms: existing_platform.config_entry = "abc" - assert not async_get_platform_without_config_entry(hass, PLATFORM, DOMAIN) + assert not async_get_platform_without_config_entry(hass, PLATFORM_DOMAIN, DOMAIN) async def test_setup_reload_service(hass: HomeAssistant) -> None: @@ -83,26 +85,28 @@ async def setup_platform(*args): setup_called.append(args) mock_integration(hass, MockModule(DOMAIN, setup=component_setup)) - mock_integration(hass, MockModule(PLATFORM, dependencies=[DOMAIN])) + mock_integration(hass, MockModule(PLATFORM_DOMAIN, dependencies=[DOMAIN])) platform = MockPlatform(async_setup_platform=setup_platform) - mock_platform(hass, f"{PLATFORM}.{DOMAIN}", platform) + mock_platform(hass, f"{PLATFORM_DOMAIN}.{DOMAIN}", platform) component = EntityComponent(_LOGGER, DOMAIN, hass) - await component.async_setup({DOMAIN: {"platform": PLATFORM, "sensors": None}}) + await component.async_setup( + {DOMAIN: {"platform": PLATFORM_DOMAIN, "sensors": None}} + ) await hass.async_block_till_done() assert component_setup.called - assert f"{PLATFORM}.{DOMAIN}" in hass.config.components + assert f"{PLATFORM_DOMAIN}.{DOMAIN}" in hass.config.components assert len(setup_called) == 1 - await async_setup_reload_service(hass, PLATFORM, [DOMAIN]) + await async_setup_reload_service(hass, PLATFORM_DOMAIN, [DOMAIN]) yaml_path = get_fixture_path("helpers/reload_configuration.yaml") with patch.object(config, "YAML_CONFIG_FILE", yaml_path): await hass.services.async_call( - PLATFORM, + PLATFORM_DOMAIN, SERVICE_RELOAD, {}, blocking=True, @@ -124,21 +128,23 @@ async def setup_platform(*args): setup_called.append(args) mock_integration(hass, MockModule(DOMAIN, setup=component_setup)) - mock_integration(hass, MockModule(PLATFORM, dependencies=[DOMAIN])) + mock_integration(hass, MockModule(PLATFORM_DOMAIN, dependencies=[DOMAIN])) platform = MockPlatform(async_setup_platform=setup_platform) - mock_platform(hass, f"{PLATFORM}.{DOMAIN}", platform) + mock_platform(hass, f"{PLATFORM_DOMAIN}.{DOMAIN}", platform) component = EntityComponent(_LOGGER, DOMAIN, hass) - await component.async_setup({DOMAIN: {"platform": PLATFORM, "sensors": None}}) + await component.async_setup( + {DOMAIN: {"platform": PLATFORM_DOMAIN, "sensors": None}} + ) await hass.async_block_till_done() assert component_setup.called - assert f"{PLATFORM}.{DOMAIN}" in hass.config.components + assert f"{PLATFORM_DOMAIN}.{DOMAIN}" in hass.config.components assert len(setup_called) == 1 - await async_setup_reload_service(hass, PLATFORM, [DOMAIN]) + await async_setup_reload_service(hass, PLATFORM_DOMAIN, [DOMAIN]) yaml_path = get_fixture_path("helpers/reload_configuration.yaml") with ( @@ -150,7 +156,7 @@ async def setup_platform(*args): ), ): await hass.services.async_call( - PLATFORM, + PLATFORM_DOMAIN, SERVICE_RELOAD, {}, blocking=True, @@ -179,26 +185,26 @@ async def async_reset_platform(*args): integration = await async_get_integration(hass, DOMAIN) integration.get_component().async_reset_platform = async_reset_platform - mock_integration(hass, MockModule(PLATFORM, dependencies=[DOMAIN])) + mock_integration(hass, MockModule(PLATFORM_DOMAIN, dependencies=[DOMAIN])) platform = MockPlatform(async_setup_platform=setup_platform) - mock_platform(hass, f"{PLATFORM}.{DOMAIN}", platform) + mock_platform(hass, f"{PLATFORM_DOMAIN}.{DOMAIN}", platform) component = EntityComponent(_LOGGER, DOMAIN, hass) - await component.async_setup({DOMAIN: {"platform": PLATFORM, "name": "xyz"}}) + await component.async_setup({DOMAIN: {"platform": PLATFORM_DOMAIN, "name": "xyz"}}) await hass.async_block_till_done() assert component_setup.called - assert f"{PLATFORM}.{DOMAIN}" in hass.config.components + assert f"{PLATFORM_DOMAIN}.{DOMAIN}" in hass.config.components assert len(setup_called) == 1 - await async_setup_reload_service(hass, PLATFORM, [DOMAIN]) + await async_setup_reload_service(hass, PLATFORM_DOMAIN, [DOMAIN]) yaml_path = get_fixture_path("helpers/reload_configuration.yaml") with patch.object(config, "YAML_CONFIG_FILE", yaml_path): await hass.services.async_call( - PLATFORM, + PLATFORM_DOMAIN, SERVICE_RELOAD, {}, blocking=True, From 1865c160413880721bc36c66422a7bcbca935f74 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 14:11:09 -0500 Subject: [PATCH 17/39] Explain why a LED BLE device could not be found (#172764) --- homeassistant/components/led_ble/__init__.py | 14 ++++++- homeassistant/components/led_ble/strings.json | 5 +++ tests/components/led_ble/test_init.py | 41 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 tests/components/led_ble/test_init.py diff --git a/homeassistant/components/led_ble/__init__.py b/homeassistant/components/led_ble/__init__.py index 14a41952b44da..a6f8bf56efd46 100644 --- a/homeassistant/components/led_ble/__init__.py +++ b/homeassistant/components/led_ble/__init__.py @@ -5,12 +5,13 @@ from led_ble import LEDBLE from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.components.bluetooth.match import ADDRESS, BluetoothCallbackMatcher from homeassistant.const import CONF_ADDRESS, EVENT_HOMEASSISTANT_STOP, Platform from homeassistant.core import Event, HomeAssistant, callback from homeassistant.exceptions import ConfigEntryNotReady -from .const import DEVICE_TIMEOUT +from .const import DEVICE_TIMEOUT, DOMAIN from .coordinator import LEDBLEConfigEntry, LEDBLECoordinator, LEDBLEData PLATFORMS: list[Platform] = [Platform.LIGHT] @@ -22,7 +23,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: LEDBLEConfigEntry) -> bo ble_device = bluetooth.async_ble_device_from_address(hass, address.upper(), True) if not ble_device: raise ConfigEntryNotReady( - f"Could not find LED BLE device with address {address}" + translation_domain=DOMAIN, + translation_key="device_not_found", + translation_placeholders={ + "address": address, + "reason": bluetooth.async_address_reachability_diagnostics( + hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) led_ble = LEDBLE(ble_device) diff --git a/homeassistant/components/led_ble/strings.json b/homeassistant/components/led_ble/strings.json index 7d777781ab11d..0cc44653ce2f9 100644 --- a/homeassistant/components/led_ble/strings.json +++ b/homeassistant/components/led_ble/strings.json @@ -18,5 +18,10 @@ } } } + }, + "exceptions": { + "device_not_found": { + "message": "Could not find LED BLE device with address {address}: {reason}" + } } } diff --git a/tests/components/led_ble/test_init.py b/tests/components/led_ble/test_init.py new file mode 100644 index 0000000000000..f5b1bdf3d5d76 --- /dev/null +++ b/tests/components/led_ble/test_init.py @@ -0,0 +1,41 @@ +"""Test the LED BLE integration init.""" + +from unittest.mock import patch + +import pytest + +from homeassistant.components.led_ble.const import DOMAIN +from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_ADDRESS +from homeassistant.core import HomeAssistant + +from . import LED_BLE_DISCOVERY_INFO + +from tests.common import MockConfigEntry + + +async def test_setup_retries_when_device_not_found( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when the device is missing.""" + entry = MockConfigEntry( + domain=DOMAIN, + unique_id=LED_BLE_DISCOVERY_INFO.address, + data={CONF_ADDRESS: LED_BLE_DISCOVERY_INFO.address}, + ) + entry.add_to_hass(hass) + + with patch( + "homeassistant.components.led_ble.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + "Could not find LED BLE device with address " + f"{LED_BLE_DISCOVERY_INFO.address}: mock reachability reason" in caplog.text + ) From 063fa8df7ebe4bccafc88a099c9d7e777c0b35b4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 14:12:49 -0500 Subject: [PATCH 18/39] Explain why an INKBIRD device could not be found (#172762) --- homeassistant/components/inkbird/coordinator.py | 11 ++++++++++- homeassistant/components/inkbird/strings.json | 2 +- tests/components/inkbird/test_sensor.py | 17 ++++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/inkbird/coordinator.py b/homeassistant/components/inkbird/coordinator.py index f9d6face867e4..5640af75a7e5f 100644 --- a/homeassistant/components/inkbird/coordinator.py +++ b/homeassistant/components/inkbird/coordinator.py @@ -7,9 +7,11 @@ from inkbird_ble import INKBIRDBluetoothDeviceData, SensorUpdate from homeassistant.components.bluetooth import ( + BluetoothReachabilityIntent, BluetoothScanningMode, BluetoothServiceInfo, BluetoothServiceInfoBleak, + async_address_reachability_diagnostics, async_ble_device_from_address, async_last_service_info, ) @@ -84,7 +86,14 @@ async def async_init(self) -> None: raise ConfigEntryNotReady( translation_domain=DOMAIN, translation_key="no_advertisement", - translation_placeholders={"address": self.address}, + translation_placeholders={ + "address": self.address, + "reason": async_address_reachability_diagnostics( + self.hass, + self.address.upper(), + BluetoothReachabilityIntent.ACTIVE_ADVERTISEMENT, + ), + }, ) await self._data.async_start(service_info, service_info.device) self._entry.async_on_unload(self._data.async_stop) diff --git a/homeassistant/components/inkbird/strings.json b/homeassistant/components/inkbird/strings.json index 46cc7ae374c7e..e2f1afb0be875 100644 --- a/homeassistant/components/inkbird/strings.json +++ b/homeassistant/components/inkbird/strings.json @@ -20,7 +20,7 @@ }, "exceptions": { "no_advertisement": { - "message": "The device with address {address} is not advertising; Make sure it is in range and powered on." + "message": "The device with address {address} is not advertising: {reason}" } } } diff --git a/tests/components/inkbird/test_sensor.py b/tests/components/inkbird/test_sensor.py index 9509dccabffef..13b125abf9eb2 100644 --- a/tests/components/inkbird/test_sensor.py +++ b/tests/components/inkbird/test_sensor.py @@ -14,6 +14,7 @@ Units, ) from inkbird_ble.parser import Model +import pytest from sensor_state_data import SensorDeviceClass from homeassistant.components.bluetooth import async_last_service_info @@ -210,7 +211,9 @@ async def test_fallback_poll_queries_latest_service_info(hass: HomeAssistant) -> await hass.async_block_till_done() -async def test_notify_sensor_no_advertisement(hass: HomeAssistant) -> None: +async def test_notify_sensor_no_advertisement( + hass: HomeAssistant, caplog: pytest.LogCaptureFixture +) -> None: """Test setting up a notify sensor that has no advertisement.""" entry = MockConfigEntry( domain=DOMAIN, @@ -219,10 +222,18 @@ async def test_notify_sensor_no_advertisement(hass: HomeAssistant) -> None: ) entry.add_to_hass(hass) - assert not await hass.config_entries.async_setup(entry.entry_id) - await hass.async_block_till_done() + with patch( + "homeassistant.components.inkbird.coordinator." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ): + assert not await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + "62:00:A1:3C:AE:7B is not advertising: mock reachability reason" in caplog.text + ) async def test_notify_sensor(hass: HomeAssistant) -> None: From a65503f203d46feaa766574c71ca108537033d10 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 14:13:12 -0500 Subject: [PATCH 19/39] Explain why an Airthings BLE device could not be found (#172758) --- .../components/airthings_ble/coordinator.py | 12 ++++++- .../components/airthings_ble/strings.json | 5 +++ tests/components/airthings_ble/test_init.py | 32 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/airthings_ble/coordinator.py b/homeassistant/components/airthings_ble/coordinator.py index dcecf26c7da3c..409db9418098b 100644 --- a/homeassistant/components/airthings_ble/coordinator.py +++ b/homeassistant/components/airthings_ble/coordinator.py @@ -8,6 +8,7 @@ from bleak_retry_connector import close_stale_connections_by_address from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady @@ -63,7 +64,16 @@ async def _async_setup(self) -> None: if not ble_device: raise ConfigEntryNotReady( - f"Could not find Airthings device with address {address}" + translation_domain=DOMAIN, + translation_key="device_not_found", + translation_placeholders={ + "address": address, + "reason": bluetooth.async_address_reachability_diagnostics( + self.hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) self.ble_device = ble_device diff --git a/homeassistant/components/airthings_ble/strings.json b/homeassistant/components/airthings_ble/strings.json index 6e1143fb97905..2e876f0c1e691 100644 --- a/homeassistant/components/airthings_ble/strings.json +++ b/homeassistant/components/airthings_ble/strings.json @@ -54,5 +54,10 @@ "name": "Radon longterm level" } } + }, + "exceptions": { + "device_not_found": { + "message": "Could not find Airthings device with address {address}: {reason}" + } } } diff --git a/tests/components/airthings_ble/test_init.py b/tests/components/airthings_ble/test_init.py index 50351f2290dc3..7cf03940190d9 100644 --- a/tests/components/airthings_ble/test_init.py +++ b/tests/components/airthings_ble/test_init.py @@ -1,6 +1,7 @@ """Test the Airthings BLE integration init.""" from copy import deepcopy +from unittest.mock import patch from airthings_ble import AirthingsDeviceType from freezegun.api import FrozenDateTimeFactory @@ -12,6 +13,7 @@ DEVICE_SPECIFIC_SCAN_INTERVAL, DOMAIN, ) +from homeassistant.config_entries import ConfigEntryState from homeassistant.core import HomeAssistant from . import ( @@ -66,6 +68,36 @@ async def test_migration_existing_entries( assert entry.data[DEVICE_MODEL] == device_info.model.value +async def test_setup_retries_when_device_not_found( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when the device is missing.""" + entry = MockConfigEntry( + domain=DOMAIN, + unique_id=WAVE_SERVICE_INFO.address, + data={DEVICE_MODEL: WAVE_DEVICE_INFO.model.value}, + ) + entry.add_to_hass(hass) + + with ( + patch_async_ble_device_from_address(None), + patch( + "homeassistant.components.airthings_ble.coordinator.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ), + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + "Could not find Airthings device with address " + f"{WAVE_SERVICE_INFO.address}: mock reachability reason" in caplog.text + ) + + async def test_no_migration_when_device_model_exists( hass: HomeAssistant, ) -> None: From 0f01148207bda9f5d7ca49382aab9a8e6300b312 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 14:14:52 -0500 Subject: [PATCH 20/39] Explain why a Yale Access Bluetooth device could not be found (#172761) --- .../components/yalexs_ble/__init__.py | 16 ++++- .../components/yalexs_ble/strings.json | 5 ++ tests/components/yalexs_ble/test_init.py | 61 +++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 tests/components/yalexs_ble/test_init.py diff --git a/homeassistant/components/yalexs_ble/__init__.py b/homeassistant/components/yalexs_ble/__init__.py index 26231a8d58eca..539db81dc054f 100644 --- a/homeassistant/components/yalexs_ble/__init__.py +++ b/homeassistant/components/yalexs_ble/__init__.py @@ -12,6 +12,7 @@ ) from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, EVENT_HOMEASSISTANT_STOP, Platform from homeassistant.core import CALLBACK_TYPE, CoreState, Event, HomeAssistant, callback @@ -24,6 +25,7 @@ CONF_LOCAL_NAME, CONF_SLOT, DEVICE_TIMEOUT, + DOMAIN, ) from .models import YaleXSBLEData from .util import async_find_existing_service_info, bluetooth_callback_matcher @@ -83,7 +85,19 @@ def _async_shutdown(event: Event | None = None) -> None: # If we are starting and the advertisement is not found, do not delay # the setup. We will wait for the advertisement to be found and then # discovery will trigger setup retry. - raise ConfigEntryNotReady("{local_name} ({address}) not advertising yet") + raise ConfigEntryNotReady( + translation_domain=DOMAIN, + translation_key="device_not_advertising", + translation_placeholders={ + "local_name": local_name, + "address": address, + "reason": bluetooth.async_address_reachability_diagnostics( + hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, + ) entry.async_on_unload( bluetooth.async_register_callback( diff --git a/homeassistant/components/yalexs_ble/strings.json b/homeassistant/components/yalexs_ble/strings.json index c4e4210a0b64e..5951301075996 100644 --- a/homeassistant/components/yalexs_ble/strings.json +++ b/homeassistant/components/yalexs_ble/strings.json @@ -53,6 +53,11 @@ } } }, + "exceptions": { + "device_not_advertising": { + "message": "{local_name} ({address}) is not advertising yet: {reason}" + } + }, "options": { "step": { "device_options": { diff --git a/tests/components/yalexs_ble/test_init.py b/tests/components/yalexs_ble/test_init.py new file mode 100644 index 0000000000000..1ad6f260c2bfc --- /dev/null +++ b/tests/components/yalexs_ble/test_init.py @@ -0,0 +1,61 @@ +"""Test the Yale Access Bluetooth init.""" + +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from homeassistant.components.yalexs_ble.const import ( + CONF_KEY, + CONF_LOCAL_NAME, + CONF_SLOT, + DOMAIN, +) +from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_ADDRESS +from homeassistant.core import CoreState, HomeAssistant + +from . import YALE_ACCESS_LOCK_DISCOVERY_INFO + +from tests.common import MockConfigEntry + + +async def test_setup_retries_when_not_advertising_at_startup( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when not advertising at startup.""" + entry = MockConfigEntry( + domain=DOMAIN, + data={ + CONF_LOCAL_NAME: YALE_ACCESS_LOCK_DISCOVERY_INFO.name, + CONF_ADDRESS: YALE_ACCESS_LOCK_DISCOVERY_INFO.address, + CONF_KEY: "2fd51b8621c6a139eaffbedcb846b60f", + CONF_SLOT: 66, + }, + unique_id=YALE_ACCESS_LOCK_DISCOVERY_INFO.address, + ) + entry.add_to_hass(hass) + + hass.set_state(CoreState.starting) + + push_lock = MagicMock() + push_lock.start = AsyncMock(return_value=MagicMock()) + + with ( + patch("homeassistant.components.yalexs_ble.close_stale_connections_by_address"), + patch("homeassistant.components.yalexs_ble.PushLock", return_value=push_lock), + patch( + "homeassistant.components.yalexs_ble.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ), + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + f"{YALE_ACCESS_LOCK_DISCOVERY_INFO.name} " + f"({YALE_ACCESS_LOCK_DISCOVERY_INFO.address}) is not advertising yet: " + "mock reachability reason" in caplog.text + ) From 155cb38090c6538e66574955fef15a3d48f9e94d Mon Sep 17 00:00:00 2001 From: "Thijs W." Date: Mon, 1 Jun 2026 21:21:26 +0200 Subject: [PATCH 21/39] Fix get_play_status function call in frontier silicon (#172705) --- homeassistant/components/frontier_silicon/media_player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/frontier_silicon/media_player.py b/homeassistant/components/frontier_silicon/media_player.py index bb33aa3938837..55a4880995b8b 100644 --- a/homeassistant/components/frontier_silicon/media_player.py +++ b/homeassistant/components/frontier_silicon/media_player.py @@ -320,7 +320,7 @@ async def async_turn_off(self) -> None: @fs_command_exception_wrap async def async_media_play(self) -> None: """Send play command.""" - if (await self.fs_device.get_play_state()) == PlayState.STOPPED: + if (await self.fs_device.get_play_status()) == PlayState.STOPPED: # The 'play' command only seems to work when the current stream is paused. # We need to send a 'stop' command instead to resume a stopped stream. await self.fs_device.stop() From 7e36d265ed4d7a1f17d69c4442bbd5b70b168571 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 1 Jun 2026 21:23:41 +0200 Subject: [PATCH 22/39] Filter stale replayed BLE advertisements in Matter BLE proxy (#172773) Co-authored-by: Claude Opus 4.8 (1M context) --- homeassistant/components/matter/ble_proxy.py | 8 ++++ tests/components/matter/test_ble_proxy.py | 41 +++++++++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/matter/ble_proxy.py b/homeassistant/components/matter/ble_proxy.py index 9e6a93d7080ca..ed68476e69312 100644 --- a/homeassistant/components/matter/ble_proxy.py +++ b/homeassistant/components/matter/ble_proxy.py @@ -23,6 +23,7 @@ ) from homeassistant.components.bluetooth import ( + MONOTONIC_TIME, BluetoothScanningMode, async_ble_device_from_address, async_register_callback, @@ -51,11 +52,18 @@ async def start( # pylint: disable=arguments-renamed if self._cancel is not None: return + # Drop HA's synchronous replay of stale history on register; otherwise a + # rotating peripheral's old addresses each become a parallel connect candidate. + # `MONOTONIC_TIME` is the clock that stamps `service_info.time`. + scan_start = MONOTONIC_TIME() + @callback def _on_advertisement( service_info: BluetoothServiceInfoBleak, _change: object, ) -> None: + if service_info.time < scan_start: + return try: callback_fn(_to_advertisement_data(service_info)) except Exception: diff --git a/tests/components/matter/test_ble_proxy.py b/tests/components/matter/test_ble_proxy.py index e6c7c2b3059b3..47072dbdb5d8e 100644 --- a/tests/components/matter/test_ble_proxy.py +++ b/tests/components/matter/test_ble_proxy.py @@ -22,7 +22,7 @@ from homeassistant.core import HomeAssistant -def _make_service_info() -> BluetoothServiceInfoBleak: +def _make_service_info(time: float | None = None) -> BluetoothServiceInfoBleak: """Return a real BluetoothServiceInfoBleak with realistic field values.""" address = "AA:BB:CC:DD:EE:FF" name = "TestDevice" @@ -37,7 +37,7 @@ def _make_service_info() -> BluetoothServiceInfoBleak: device=BLEDevice(name=name, address=address, details={}), advertisement=None, connectable=True, - time=monotonic_time_coarse(), + time=monotonic_time_coarse() if time is None else time, tx_power=0, raw=None, ) @@ -152,6 +152,43 @@ def fake_register(hass_, cb, _matcher, _mode): assert forwarded[0].address == "AA:BB:CC:DD:EE:FF" +@pytest.mark.parametrize( + ("advert_time", "expected_count"), + [ + pytest.param(999.0, 0, id="stale-before-scan-start-dropped"), + pytest.param(1000.0, 1, id="equal-scan-start-forwarded"), + pytest.param(1001.0, 1, id="fresh-after-scan-start-forwarded"), + ], +) +async def test_scan_source_drops_replayed_history( + hass: HomeAssistant, advert_time: float, expected_count: int +) -> None: + """Adverts older than the registration instant (HA history replay) are dropped.""" + forwarded: list[AdvertisementData] = [] + captured: dict[str, object] = {} + + def fake_register(hass_, cb, _matcher, _mode): + captured["cb"] = cb + return MagicMock() + + source = HaBluetoothScanSource(hass) + with ( + patch( + "homeassistant.components.matter.ble_proxy.async_register_callback", + side_effect=fake_register, + ), + patch( + "homeassistant.components.matter.ble_proxy.MONOTONIC_TIME", + return_value=1000.0, + ), + ): + await source.start(forwarded.append) + + captured["cb"](_make_service_info(time=advert_time), object()) + + assert len(forwarded) == expected_count + + async def test_scan_source_callback_swallows_exceptions( hass: HomeAssistant, caplog: pytest.LogCaptureFixture ) -> None: From b069bc2f0384d1e4046fd50b5e33758fdacf3059 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 14:41:55 -0500 Subject: [PATCH 23/39] Bump habluetooth to 6.8.1 (#172768) --- homeassistant/components/bluetooth/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/bluetooth/manifest.json b/homeassistant/components/bluetooth/manifest.json index 9cada8b157048..aa7dc564f1450 100644 --- a/homeassistant/components/bluetooth/manifest.json +++ b/homeassistant/components/bluetooth/manifest.json @@ -21,6 +21,6 @@ "bluetooth-auto-recovery==1.6.4", "bluetooth-data-tools==1.29.18", "dbus-fast==5.0.16", - "habluetooth==6.8.0" + "habluetooth==6.8.1" ] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 4446e69d4c2db..f39a1f900b877 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -35,7 +35,7 @@ file-read-backwards==2.0.0 fnv-hash-fast==2.0.3 go2rtc-client==0.4.0 ha-ffmpeg==3.2.2 -habluetooth==6.8.0 +habluetooth==6.8.1 hass-nabucasa==2.2.0 hassil==3.5.0 home-assistant-bluetooth==2.0.0 diff --git a/requirements_all.txt b/requirements_all.txt index 41f2ef561f456..081d870cefe33 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1213,7 +1213,7 @@ ha-xthings-cloud==1.0.5 habiticalib==0.4.7 # homeassistant.components.bluetooth -habluetooth==6.8.0 +habluetooth==6.8.1 # homeassistant.components.hanna hanna-cloud==0.0.7 From 01d390293bbef1564bdbd67ffab529a9715a139b Mon Sep 17 00:00:00 2001 From: bkobus-bbx Date: Mon, 1 Jun 2026 21:44:21 +0200 Subject: [PATCH 24/39] Refactor blebox integration to use DataUpdateCoordinator (#172533) --- homeassistant/components/blebox/__init__.py | 11 +- .../components/blebox/binary_sensor.py | 17 +- homeassistant/components/blebox/button.py | 18 +- homeassistant/components/blebox/climate.py | 13 +- .../components/blebox/coordinator.py | 48 ++++++ homeassistant/components/blebox/cover.py | 24 ++- homeassistant/components/blebox/entity.py | 20 +-- homeassistant/components/blebox/light.py | 20 ++- homeassistant/components/blebox/sensor.py | 15 +- homeassistant/components/blebox/strings.json | 5 + homeassistant/components/blebox/switch.py | 13 +- homeassistant/components/blebox/update.py | 20 ++- homeassistant/components/blebox/util.py | 29 ++++ tests/components/blebox/conftest.py | 21 ++- tests/components/blebox/test_climate.py | 67 ++++---- tests/components/blebox/test_config_flow.py | 36 ++-- tests/components/blebox/test_cover.py | 158 ++++++------------ tests/components/blebox/test_init.py | 50 +++--- tests/components/blebox/test_light.py | 114 +++++-------- tests/components/blebox/test_sensor.py | 34 ++-- tests/components/blebox/test_switch.py | 105 ++++-------- tests/components/blebox/test_update.py | 35 ++-- 22 files changed, 449 insertions(+), 424 deletions(-) create mode 100644 homeassistant/components/blebox/coordinator.py create mode 100644 homeassistant/components/blebox/util.py diff --git a/homeassistant/components/blebox/__init__.py b/homeassistant/components/blebox/__init__.py index f67d3cd819d74..c4039fe5b8eae 100644 --- a/homeassistant/components/blebox/__init__.py +++ b/homeassistant/components/blebox/__init__.py @@ -6,7 +6,6 @@ from blebox_uniapi.error import Error from blebox_uniapi.session import ApiHost -from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, @@ -18,10 +17,9 @@ from homeassistant.exceptions import ConfigEntryNotReady from .const import DEFAULT_SETUP_TIMEOUT +from .coordinator import BleBoxConfigEntry, BleBoxCoordinator from .helpers import get_maybe_authenticated_session -type BleBoxConfigEntry = ConfigEntry[Box] - _LOGGER = logging.getLogger(__name__) PLATFORMS = [ @@ -35,8 +33,6 @@ Platform.UPDATE, ] -PARALLEL_UPDATES = 0 - async def async_setup_entry(hass: HomeAssistant, entry: BleBoxConfigEntry) -> bool: """Set up BleBox devices from a config entry.""" @@ -58,7 +54,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: BleBoxConfigEntry) -> bo _LOGGER.error("Identify failed at %s:%d (%s)", api_host.host, api_host.port, ex) raise ConfigEntryNotReady from ex - entry.runtime_data = product + coordinator = BleBoxCoordinator(hass, entry, product) + await coordinator.async_config_entry_first_refresh() + + entry.runtime_data = coordinator await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) diff --git a/homeassistant/components/blebox/binary_sensor.py b/homeassistant/components/blebox/binary_sensor.py index b9032e6e70582..3fd1df93638f2 100644 --- a/homeassistant/components/blebox/binary_sensor.py +++ b/homeassistant/components/blebox/binary_sensor.py @@ -11,8 +11,11 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import BleBoxConfigEntry +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity +PARALLEL_UPDATES = 0 + BINARY_SENSOR_TYPES = ( BinarySensorEntityDescription( key="moisture", @@ -27,23 +30,27 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxBinarySensorEntity(feature, description) - for feature in config_entry.runtime_data.features.get("binary_sensors", []) + BleBoxBinarySensorEntity(coordinator, feature, description) + for feature in coordinator.box.features.get("binary_sensors", []) for description in BINARY_SENSOR_TYPES if description.key == feature.device_class ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxBinarySensorEntity(BleBoxEntity[BinarySensorFeature], BinarySensorEntity): """Representation of a BleBox binary sensor feature.""" def __init__( - self, feature: BinarySensorFeature, description: BinarySensorEntityDescription + self, + coordinator: BleBoxCoordinator, + feature: BinarySensorFeature, + description: BinarySensorEntityDescription, ) -> None: """Initialize a BleBox binary sensor feature.""" - super().__init__(feature) + super().__init__(coordinator, feature) self.entity_description = description @property diff --git a/homeassistant/components/blebox/button.py b/homeassistant/components/blebox/button.py index 5fae765ec3a79..944d0fdf23e54 100644 --- a/homeassistant/components/blebox/button.py +++ b/homeassistant/components/blebox/button.py @@ -7,7 +7,11 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import BleBoxConfigEntry +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity +from .util import blebox_command + +PARALLEL_UPDATES = 1 async def async_setup_entry( @@ -16,19 +20,22 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox button entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxButtonEntity(feature) - for feature in config_entry.runtime_data.features.get("buttons", []) + BleBoxButtonEntity(coordinator, feature) + for feature in coordinator.box.features.get("buttons", []) ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxButtonEntity(BleBoxEntity[blebox_uniapi.button.Button], ButtonEntity): """Representation of BleBox buttons.""" - def __init__(self, feature: blebox_uniapi.button.Button) -> None: + def __init__( + self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.button.Button + ) -> None: """Initialize a BleBox button feature.""" - super().__init__(feature) + super().__init__(coordinator, feature) self._attr_icon = self.get_icon() def get_icon(self) -> str | None: @@ -45,6 +52,7 @@ def get_icon(self) -> str | None: return "mdi:arrow-down-circle" return None + @blebox_command async def async_press(self) -> None: """Handle the button press.""" await self._feature.set() diff --git a/homeassistant/components/blebox/climate.py b/homeassistant/components/blebox/climate.py index 2d1f6c5ae9e4b..6d0b5f45fb226 100644 --- a/homeassistant/components/blebox/climate.py +++ b/homeassistant/components/blebox/climate.py @@ -1,6 +1,5 @@ """BleBox climate entity.""" -from datetime import timedelta from typing import Any import blebox_uniapi.climate @@ -17,8 +16,9 @@ from . import BleBoxConfigEntry from .entity import BleBoxEntity +from .util import blebox_command -SCAN_INTERVAL = timedelta(seconds=5) +PARALLEL_UPDATES = 1 BLEBOX_TO_HVACMODE = { 0: HVACMode.OFF, @@ -40,11 +40,12 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox climate entity.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxClimateEntity(feature) - for feature in config_entry.runtime_data.features.get("climates", []) + BleBoxClimateEntity(coordinator, feature) + for feature in coordinator.box.features.get("climates", []) ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxClimateEntity(BleBoxEntity[blebox_uniapi.climate.Climate], ClimateEntity): @@ -108,6 +109,7 @@ def target_temperature(self) -> float | None: """Return the desired thermostat temperature.""" return self._feature.desired + @blebox_command async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set the climate entity mode.""" if hvac_mode in [HVACMode.HEAT, HVACMode.COOL]: @@ -116,6 +118,7 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: await self._feature.async_off() + @blebox_command async def async_set_temperature(self, **kwargs: Any) -> None: """Set the thermostat temperature.""" value = kwargs[ATTR_TEMPERATURE] diff --git a/homeassistant/components/blebox/coordinator.py b/homeassistant/components/blebox/coordinator.py new file mode 100644 index 0000000000000..aa151cb5cbe54 --- /dev/null +++ b/homeassistant/components/blebox/coordinator.py @@ -0,0 +1,48 @@ +"""DataUpdateCoordinator for BleBox devices.""" + +from datetime import timedelta +import logging + +from blebox_uniapi.box import Box +from blebox_uniapi.error import Error + +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant +from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed + +from .const import DOMAIN + +_LOGGER = logging.getLogger(__name__) + + +type BleBoxConfigEntry = ConfigEntry[BleBoxCoordinator] + + +class BleBoxCoordinator(DataUpdateCoordinator[None]): + """Coordinator for a single BleBox device.""" + + config_entry: BleBoxConfigEntry + + def __init__( + self, hass: HomeAssistant, config_entry: BleBoxConfigEntry, box: Box + ) -> None: + """Initialize the coordinator.""" + super().__init__( + hass, + _LOGGER, + config_entry=config_entry, + name=DOMAIN, + update_interval=timedelta(seconds=5), + ) + self.box = box + + async def _async_update_data(self) -> None: + """Fetch data from the BleBox device.""" + try: + await self.box.async_update_data() + except Error as err: + raise UpdateFailed( + translation_domain=DOMAIN, + translation_key="update_failed", + translation_placeholders={"error": str(err)}, + ) from err diff --git a/homeassistant/components/blebox/cover.py b/homeassistant/components/blebox/cover.py index d5c0fff38e6d4..453030e097893 100644 --- a/homeassistant/components/blebox/cover.py +++ b/homeassistant/components/blebox/cover.py @@ -17,7 +17,11 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import BleBoxConfigEntry +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity +from .util import blebox_command + +PARALLEL_UPDATES = 1 BLEBOX_TO_COVER_DEVICE_CLASSES = { "gate": CoverDeviceClass.GATE, @@ -59,19 +63,22 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxCoverEntity(feature) - for feature in config_entry.runtime_data.features.get("covers", []) + BleBoxCoverEntity(coordinator, feature) + for feature in coordinator.box.features.get("covers", []) ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxCoverEntity(BleBoxEntity[blebox_uniapi.cover.Cover], CoverEntity): """Representation of a BleBox cover feature.""" - def __init__(self, feature: blebox_uniapi.cover.Cover) -> None: + def __init__( + self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.cover.Cover + ) -> None: """Initialize a BleBox cover feature.""" - super().__init__(feature) + super().__init__(coordinator, feature) self._attr_supported_features = ( CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE ) @@ -135,33 +142,40 @@ def is_closed(self) -> bool | None: """Return whether cover is closed.""" return self._is_state(CoverState.CLOSED) + @blebox_command async def async_open_cover(self, **kwargs: Any) -> None: """Fully open the cover position.""" await self._feature.async_open() + @blebox_command async def async_close_cover(self, **kwargs: Any) -> None: """Fully close the cover position.""" await self._feature.async_close() + @blebox_command async def async_open_cover_tilt(self, **kwargs: Any) -> None: """Fully open the cover tilt.""" position = 50 if self._feature.is_tilt_180 else 0 await self._feature.async_set_tilt_position(position) + @blebox_command async def async_close_cover_tilt(self, **kwargs: Any) -> None: """Fully close the cover tilt.""" # note: values are reversed await self._feature.async_set_tilt_position(100) + @blebox_command async def async_set_cover_position(self, **kwargs: Any) -> None: """Set the cover position.""" position = kwargs[ATTR_POSITION] await self._feature.async_set_position(100 - position) + @blebox_command async def async_stop_cover(self, **kwargs: Any) -> None: """Stop the cover.""" await self._feature.async_stop() + @blebox_command async def async_set_cover_tilt_position(self, **kwargs: Any) -> None: """Set the tilt position.""" position = kwargs[ATTR_TILT_POSITION] diff --git a/homeassistant/components/blebox/entity.py b/homeassistant/components/blebox/entity.py index 14e87349a623e..f1880cfbc56fd 100644 --- a/homeassistant/components/blebox/entity.py +++ b/homeassistant/components/blebox/entity.py @@ -1,23 +1,20 @@ """Base entity for the BleBox devices integration.""" -import logging - -from blebox_uniapi.error import Error from blebox_uniapi.feature import Feature from homeassistant.helpers.device_registry import DeviceInfo -from homeassistant.helpers.entity import Entity +from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN - -_LOGGER = logging.getLogger(__name__) +from .coordinator import BleBoxCoordinator -class BleBoxEntity[_FeatureT: Feature](Entity): +class BleBoxEntity[_FeatureT: Feature](CoordinatorEntity[BleBoxCoordinator]): """Implements a common class for entities representing a BleBox feature.""" - def __init__(self, feature: _FeatureT) -> None: + def __init__(self, coordinator: BleBoxCoordinator, feature: _FeatureT) -> None: """Initialize a BleBox entity.""" + super().__init__(coordinator) self._feature = feature self._attr_name = feature.full_name self._attr_unique_id = feature.unique_id @@ -30,10 +27,3 @@ def __init__(self, feature: _FeatureT) -> None: sw_version=product.firmware_version, configuration_url=f"http://{product.address}", ) - - async def async_update(self) -> None: - """Update the entity state.""" - try: - await self._feature.async_update() - except Error as ex: - _LOGGER.error("Updating '%s' failed: %s", self.name, ex) diff --git a/homeassistant/components/blebox/light.py b/homeassistant/components/blebox/light.py index 25e58161b5eaa..6bdb072f8793a 100644 --- a/homeassistant/components/blebox/light.py +++ b/homeassistant/components/blebox/light.py @@ -1,6 +1,5 @@ """BleBox light entities implementation.""" -from datetime import timedelta import logging import math from typing import Any @@ -24,11 +23,13 @@ from . import BleBoxConfigEntry from .const import LIGHT_MAX_KELVINS, LIGHT_MIN_KELVINS +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity +from .util import blebox_command _LOGGER = logging.getLogger(__name__) -SCAN_INTERVAL = timedelta(seconds=5) +PARALLEL_UPDATES = 1 async def async_setup_entry( @@ -37,11 +38,12 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxLightEntity(feature) - for feature in config_entry.runtime_data.features.get("lights", []) + BleBoxLightEntity(coordinator, feature) + for feature in coordinator.box.features.get("lights", []) ] - async_add_entities(entities, True) + async_add_entities(entities) COLOR_MODE_MAP = { @@ -61,9 +63,11 @@ class BleBoxLightEntity(BleBoxEntity[blebox_uniapi.light.Light], LightEntity): _attr_min_color_temp_kelvin = LIGHT_MIN_KELVINS _attr_max_color_temp_kelvin = LIGHT_MAX_KELVINS - def __init__(self, feature: blebox_uniapi.light.Light) -> None: + def __init__( + self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.light.Light + ) -> None: """Initialize a BleBox light.""" - super().__init__(feature) + super().__init__(coordinator, feature) if feature.effect_list: self._attr_supported_features = LightEntityFeature.EFFECT @@ -165,6 +169,7 @@ def rgbww_color(self) -> tuple[int, int, int, int, int] | None: return None return tuple(blebox_uniapi.light.Light.rgb_hex_to_rgb_list(rgbww_hex)) + @blebox_command async def async_turn_on(self, **kwargs: Any) -> None: """Turn the light on.""" @@ -224,6 +229,7 @@ async def async_turn_on(self, **kwargs: Any) -> None: " effect list." ) from exc + @blebox_command async def async_turn_off(self, **kwargs: Any) -> None: """Turn the light off.""" await self._feature.async_off() diff --git a/homeassistant/components/blebox/sensor.py b/homeassistant/components/blebox/sensor.py index 8570c4b29e188..9ea7af8a4d862 100644 --- a/homeassistant/components/blebox/sensor.py +++ b/homeassistant/components/blebox/sensor.py @@ -1,6 +1,6 @@ """BleBox sensor entities.""" -from datetime import datetime, timedelta +from datetime import datetime import blebox_uniapi.sensor @@ -28,9 +28,10 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import BleBoxConfigEntry +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity -SCAN_INTERVAL = timedelta(seconds=5) +PARALLEL_UPDATES = 0 SENSOR_TYPES = ( @@ -124,13 +125,14 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxSensorEntity(feature, description) - for feature in config_entry.runtime_data.features.get("sensors", []) + BleBoxSensorEntity(coordinator, feature, description) + for feature in coordinator.box.features.get("sensors", []) for description in SENSOR_TYPES if description.key == feature.device_class ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxSensorEntity(BleBoxEntity[blebox_uniapi.sensor.BaseSensor], SensorEntity): @@ -138,11 +140,12 @@ class BleBoxSensorEntity(BleBoxEntity[blebox_uniapi.sensor.BaseSensor], SensorEn def __init__( self, + coordinator: BleBoxCoordinator, feature: blebox_uniapi.sensor.BaseSensor, description: SensorEntityDescription, ) -> None: """Initialize a BleBox sensor feature.""" - super().__init__(feature) + super().__init__(coordinator, feature) self.entity_description = description @property diff --git a/homeassistant/components/blebox/strings.json b/homeassistant/components/blebox/strings.json index a9193cd590ce5..a67e3c051b231 100644 --- a/homeassistant/components/blebox/strings.json +++ b/homeassistant/components/blebox/strings.json @@ -22,5 +22,10 @@ "title": "Set up your BleBox device" } } + }, + "exceptions": { + "update_failed": { + "message": "An error occurred while communicating with the BleBox device: {error}" + } } } diff --git a/homeassistant/components/blebox/switch.py b/homeassistant/components/blebox/switch.py index c0f9d9a5e4b3a..5af500c4c70f9 100644 --- a/homeassistant/components/blebox/switch.py +++ b/homeassistant/components/blebox/switch.py @@ -1,6 +1,5 @@ """BleBox switch implementation.""" -from datetime import timedelta from typing import Any import blebox_uniapi.switch @@ -11,8 +10,9 @@ from . import BleBoxConfigEntry from .entity import BleBoxEntity +from .util import blebox_command -SCAN_INTERVAL = timedelta(seconds=5) +PARALLEL_UPDATES = 1 async def async_setup_entry( @@ -21,11 +21,12 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox switch entity.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxSwitchEntity(feature) - for feature in config_entry.runtime_data.features.get("switches", []) + BleBoxSwitchEntity(coordinator, feature) + for feature in coordinator.box.features.get("switches", []) ] - async_add_entities(entities, True) + async_add_entities(entities) class BleBoxSwitchEntity(BleBoxEntity[blebox_uniapi.switch.Switch], SwitchEntity): @@ -38,10 +39,12 @@ def is_on(self) -> bool | None: """Return whether switch is on.""" return self._feature.is_on + @blebox_command async def async_turn_on(self, **kwargs: Any) -> None: """Turn on the switch.""" await self._feature.async_turn_on() + @blebox_command async def async_turn_off(self, **kwargs: Any) -> None: """Turn off the switch.""" await self._feature.async_turn_off() diff --git a/homeassistant/components/blebox/update.py b/homeassistant/components/blebox/update.py index 68ca5773b1993..ed974b1757674 100644 --- a/homeassistant/components/blebox/update.py +++ b/homeassistant/components/blebox/update.py @@ -18,8 +18,10 @@ from homeassistant.helpers.event import async_call_later from . import BleBoxConfigEntry +from .coordinator import BleBoxCoordinator from .entity import BleBoxEntity +PARALLEL_UPDATES = 0 SCAN_INTERVAL = timedelta(hours=1) @@ -33,11 +35,12 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up a BleBox update entry.""" + coordinator = config_entry.runtime_data entities = [ - BleBoxUpdateEntity(feature) - for feature in config_entry.runtime_data.features.get("updates", []) + BleBoxUpdateEntity(coordinator, feature) + for feature in coordinator.box.features.get("updates", []) ] - async_add_entities(entities, True) + async_add_entities(entities, update_before_add=True) class BleBoxUpdateEntity(BleBoxEntity[blebox_uniapi.update.Update], UpdateEntity): @@ -48,9 +51,16 @@ class BleBoxUpdateEntity(BleBoxEntity[blebox_uniapi.update.Update], UpdateEntity UpdateEntityFeature.INSTALL | UpdateEntityFeature.PROGRESS ) - def __init__(self, feature: blebox_uniapi.update.Update) -> None: + @property + def should_poll(self) -> bool: + """Return True because firmware versions cannot be fetched via coordinator.""" + return True + + def __init__( + self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.update.Update + ) -> None: """Initialize the update entity.""" - super().__init__(feature) + super().__init__(coordinator, feature) self._in_progress_old_version: str | None = None self._poll_cancel: CALLBACK_TYPE | None = None self._poll_attempts: int = 0 diff --git a/homeassistant/components/blebox/util.py b/homeassistant/components/blebox/util.py new file mode 100644 index 0000000000000..bc80611fdc4c0 --- /dev/null +++ b/homeassistant/components/blebox/util.py @@ -0,0 +1,29 @@ +"""Utilities for BleBox.""" + +from collections.abc import Awaitable, Callable, Coroutine +from typing import Any, Concatenate + +from blebox_uniapi.error import Error + +from homeassistant.exceptions import HomeAssistantError + +from .entity import BleBoxEntity + + +def blebox_command[_BleBoxEntityT: BleBoxEntity, **_P, _R]( + func: Callable[Concatenate[_BleBoxEntityT, _P], Awaitable[_R]], +) -> Callable[Concatenate[_BleBoxEntityT, _P], Coroutine[Any, Any, _R]]: + """Decorate BleBox calls that send commands to the device. + + Catches BleBox errors and refreshes the coordinator after the command. + """ + + async def handler(self: _BleBoxEntityT, *args: _P.args, **kwargs: _P.kwargs) -> _R: + try: + return await func(self, *args, **kwargs) + except Error as err: + raise HomeAssistantError(str(err)) from err + finally: + await self.coordinator.async_refresh() + + return handler diff --git a/tests/components/blebox/conftest.py b/tests/components/blebox/conftest.py index fb35bae43a10a..4abb7b474c313 100644 --- a/tests/components/blebox/conftest.py +++ b/tests/components/blebox/conftest.py @@ -48,7 +48,6 @@ def mock_only_feature(spec, set_spec: bool = True, **kwargs): def mock_feature(category, spec, set_spec: bool = True, **kwargs): """Mock a feature along with whole product setup.""" feature_mock = mock_only_feature(spec, set_spec, **kwargs) - feature_mock.async_update = AsyncMock() product = setup_product_mock(category, [feature_mock]) type(feature_mock.product).name = PropertyMock(return_value="Some name") @@ -66,6 +65,12 @@ def mock_config(ip_address="172.100.123.4"): return MockConfigEntry(domain=DOMAIN, data={CONF_HOST: ip_address, CONF_PORT: 80}) +@pytest.fixture(name="config_entry") +def config_entry_fixture() -> MockConfigEntry: + """Return a MockConfigEntry for blebox.""" + return mock_config() + + @pytest.fixture(name="config") def config_fixture(): """Create hass config fixture.""" @@ -78,6 +83,20 @@ def feature_fixture(request: pytest.FixtureRequest) -> Any: return request.getfixturevalue(request.param) +async def async_setup_config_entry( + hass: HomeAssistant, + config_entry: MockConfigEntry, + *, + assert_success: bool = False, +) -> None: + """Add and set up the given config entry.""" + config_entry.add_to_hass(hass) + result = await hass.config_entries.async_setup(config_entry.entry_id) + if assert_success: + assert result + await hass.async_block_till_done() + + async def async_setup_entities( hass: HomeAssistant, entity_ids: list[str] ) -> list[er.RegistryEntry]: diff --git a/tests/components/blebox/test_climate.py b/tests/components/blebox/test_climate.py index 5b56c2b903639..fbaf6fbd05faf 100644 --- a/tests/components/blebox/test_climate.py +++ b/tests/components/blebox/test_climate.py @@ -19,6 +19,7 @@ HVACAction, HVACMode, ) +from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_ENTITY_ID, @@ -29,7 +30,9 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr -from .conftest import async_setup_entity, mock_feature +from .conftest import async_setup_config_entry, async_setup_entity, mock_feature + +from tests.common import MockConfigEntry @pytest.fixture(name="saunabox") @@ -120,12 +123,9 @@ async def test_update(saunabox, hass: HomeAssistant, config) -> None: feature_mock, entity_id = saunabox - def initial_update(): - feature_mock.is_on = False - feature_mock.desired = 64.3 - feature_mock.current = 40.9 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False + feature_mock.desired = 64.3 + feature_mock.current = 40.9 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -140,12 +140,8 @@ async def test_on_when_below_desired(saunabox, hass: HomeAssistant) -> None: feature_mock, entity_id = saunabox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def turn_on(): feature_mock.is_on = True @@ -175,12 +171,8 @@ async def test_on_when_above_desired(saunabox, hass: HomeAssistant) -> None: feature_mock, entity_id = saunabox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def turn_on(): feature_mock.is_on = True @@ -211,13 +203,9 @@ async def test_off(saunabox, hass: HomeAssistant) -> None: feature_mock, entity_id = saunabox - def initial_update(): - feature_mock.is_on = True - feature_mock.is_heating = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True + feature_mock.is_heating = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def turn_off(): feature_mock.is_on = False @@ -246,13 +234,9 @@ async def test_set_thermo(saunabox, hass: HomeAssistant) -> None: feature_mock, entity_id = saunabox - def update(): - feature_mock.is_on = False - feature_mock.is_heating = False - - feature_mock.async_update = AsyncMock(side_effect=update) + feature_mock.is_on = False + feature_mock.is_heating = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def set_temp(temp): feature_mock.is_on = True @@ -276,17 +260,24 @@ def set_temp(temp): async def test_update_failure( - saunabox, hass: HomeAssistant, caplog: pytest.LogCaptureFixture + saunabox, + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test that update failures are logged.""" + """Test that update failures cause config entry setup retry.""" caplog.set_level(logging.ERROR) - feature_mock, entity_id = saunabox - feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) - await async_setup_entity(hass, entity_id) + feature_mock, _entity_id = saunabox + feature_mock.product.async_update_data = AsyncMock( + side_effect=blebox_uniapi.error.ClientError + ) + + await async_setup_config_entry(hass, config_entry) - assert f"Updating '{feature_mock.full_name}' failed: " in caplog.text + feature_mock.product.async_update_data.assert_called() + assert config_entry.state is ConfigEntryState.SETUP_RETRY async def test_reding_hvac_actions( @@ -299,12 +290,12 @@ async def test_reding_hvac_actions( feature_mock, entity_id = saunabox await async_setup_entity(hass, entity_id) - def set_heating(): + def set_temperature(temp): feature_mock.is_on = True feature_mock.hvac_action = 1 feature_mock.mode = 1 - feature_mock.async_update = AsyncMock(side_effect=set_heating) + feature_mock.async_set_temperature = AsyncMock(side_effect=set_temperature) await hass.services.async_call( "climate", @@ -330,7 +321,7 @@ def set_off(): feature_mock.is_on = False feature_mock.hvac_action = 0 - feature_mock.async_update = AsyncMock(side_effect=set_off) + feature_mock.async_off = AsyncMock(side_effect=set_off) await hass.services.async_call( "climate", diff --git a/tests/components/blebox/test_config_flow.py b/tests/components/blebox/test_config_flow.py index 4b0c1b23e79db..12069b4d44aea 100644 --- a/tests/components/blebox/test_config_flow.py +++ b/tests/components/blebox/test_config_flow.py @@ -15,7 +15,13 @@ from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo from homeassistant.setup import async_setup_component -from .conftest import mock_config, mock_feature, mock_only_feature, setup_product_mock +from .conftest import ( + async_setup_config_entry, + mock_config, + mock_feature, + mock_only_feature, + setup_product_mock, +) from tests.common import MockConfigEntry @@ -193,33 +199,29 @@ async def test_already_configured(hass: HomeAssistant, valid_feature_mock) -> No assert result["reason"] == "address_already_configured" -async def test_async_setup_entry(hass: HomeAssistant, valid_feature_mock) -> None: +async def test_async_setup_entry( + hass: HomeAssistant, valid_feature_mock, config_entry: MockConfigEntry +) -> None: """Test async_setup_entry (for coverage).""" - config = mock_config() - config.add_to_hass(hass) - - assert await hass.config_entries.async_setup(config.entry_id) - await hass.async_block_till_done() + await async_setup_config_entry(hass, config_entry, assert_success=True) - assert hass.config_entries.async_entries() == [config] - assert config.state is ConfigEntryState.LOADED + assert hass.config_entries.async_entries() == [config_entry] + assert config_entry.state is ConfigEntryState.LOADED -async def test_async_remove_entry(hass: HomeAssistant, valid_feature_mock) -> None: +async def test_async_remove_entry( + hass: HomeAssistant, valid_feature_mock, config_entry: MockConfigEntry +) -> None: """Test async_setup_entry (for coverage).""" - config = mock_config() - config.add_to_hass(hass) - - assert await hass.config_entries.async_setup(config.entry_id) - await hass.async_block_till_done() + await async_setup_config_entry(hass, config_entry, assert_success=True) - assert await hass.config_entries.async_remove(config.entry_id) + assert await hass.config_entries.async_remove(config_entry.entry_id) await hass.async_block_till_done() assert hass.config_entries.async_entries() == [] - assert config.state is ConfigEntryState.NOT_LOADED + assert config_entry.state is ConfigEntryState.NOT_LOADED async def test_flow_with_zeroconf(hass: HomeAssistant) -> None: diff --git a/tests/components/blebox/test_cover.py b/tests/components/blebox/test_cover.py index 6e5482e12ae7f..76cc1394cdc90 100644 --- a/tests/components/blebox/test_cover.py +++ b/tests/components/blebox/test_cover.py @@ -16,6 +16,7 @@ CoverEntityFeature, CoverState, ) +from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_SUPPORTED_FEATURES, @@ -31,7 +32,9 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr -from .conftest import async_setup_entity, mock_feature +from .conftest import async_setup_config_entry, async_setup_entity, mock_feature + +from tests.common import MockConfigEntry ALL_COVER_FIXTURES = ["gatecontroller", "shutterbox", "gatebox"] FIXTURES_SUPPORTING_STOP = ["gatecontroller", "shutterbox"] @@ -255,19 +258,14 @@ async def test_open(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 3 # manually stopped + feature_mock.state = 3 # manually stopped + await async_setup_entity(hass, entity_id) + assert hass.states.get(entity_id).state == CoverState.CLOSED def open_gate(): feature_mock.state = 1 # opening - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_open = AsyncMock(side_effect=open_gate) - - await async_setup_entity(hass, entity_id) - assert hass.states.get(entity_id).state == CoverState.CLOSED - - feature_mock.async_update = AsyncMock() await hass.services.async_call( "cover", SERVICE_OPEN_COVER, @@ -283,49 +281,34 @@ async def test_close(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 4 # open + feature_mock.state = 4 # open + await async_setup_entity(hass, entity_id) + assert hass.states.get(entity_id).state == CoverState.OPEN def close(): feature_mock.state = 0 # closing - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_close = AsyncMock(side_effect=close) - - await async_setup_entity(hass, entity_id) - assert hass.states.get(entity_id).state == CoverState.OPEN - - feature_mock.async_update = AsyncMock() await hass.services.async_call( "cover", SERVICE_CLOSE_COVER, {"entity_id": entity_id}, blocking=True ) assert hass.states.get(entity_id).state == CoverState.CLOSING -def opening_to_stop_feature_mock(feature_mock): - """Return an mocked feature which can be updated and stopped.""" - - def initial_update(): - feature_mock.state = 1 # opening - - def stop(): - feature_mock.state = 2 # manually stopped - - feature_mock.async_update = AsyncMock(side_effect=initial_update) - feature_mock.async_stop = AsyncMock(side_effect=stop) - - @pytest.mark.parametrize("feature", FIXTURES_SUPPORTING_STOP, indirect=["feature"]) async def test_stop(feature, hass: HomeAssistant) -> None: """Test cover stopping.""" feature_mock, entity_id = feature - opening_to_stop_feature_mock(feature_mock) + feature_mock.state = 1 # opening await async_setup_entity(hass, entity_id) assert hass.states.get(entity_id).state == CoverState.OPENING - feature_mock.async_update = AsyncMock() + def stop(): + feature_mock.state = 2 # manually stopped + + feature_mock.async_stop = AsyncMock(side_effect=stop) await hass.services.async_call( "cover", SERVICE_STOP_COVER, {"entity_id": entity_id}, blocking=True ) @@ -340,12 +323,8 @@ async def test_update_inverted(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.current = 29 # device: 29% closed = 71% open - feature_mock.state = 2 # manually stopped - - feature_mock.async_update = AsyncMock(side_effect=initial_update) - + feature_mock.current = 29 # device: 29% closed = 71% open + feature_mock.state = 2 # manually stopped await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -358,12 +337,8 @@ async def test_update_not_inverted(gatebox, hass: HomeAssistant) -> None: feature_mock, entity_id = gatebox - def initial_update(): - feature_mock.current = 100 # fully open - feature_mock.state = 4 # open - - feature_mock.async_update = AsyncMock(side_effect=initial_update) - + feature_mock.current = 100 # fully open + feature_mock.state = 4 # open await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -379,21 +354,16 @@ async def test_set_position(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 3 # closed + feature_mock.state = 3 # closed + await async_setup_entity(hass, entity_id) + assert hass.states.get(entity_id).state == CoverState.CLOSED def set_position(position): assert position == 99 # inverted feature_mock.state = 1 # opening # feature_mock.current = position - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_set_position = AsyncMock(side_effect=set_position) - - await async_setup_entity(hass, entity_id) - assert hass.states.get(entity_id).state == CoverState.CLOSED - - feature_mock.async_update = AsyncMock() await hass.services.async_call( "cover", SERVICE_SET_COVER_POSITION, @@ -408,12 +378,8 @@ async def test_unknown_position(shutterbox, hass: HomeAssistant) -> None: feature_mock, entity_id = shutterbox - def initial_update(): - feature_mock.state = 4 # opening - feature_mock.current = -1 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) - + feature_mock.state = 4 # opening + feature_mock.current = -1 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -425,9 +391,9 @@ async def test_with_stop(gatebox, hass: HomeAssistant) -> None: """Test stop capability is available.""" feature_mock, entity_id = gatebox - opening_to_stop_feature_mock(feature_mock) - feature_mock.has_stop = True + feature_mock.state = 1 # opening + feature_mock.has_stop = True await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -439,9 +405,9 @@ async def test_with_no_stop(gatebox, hass: HomeAssistant) -> None: """Test stop capability is not available.""" feature_mock, entity_id = gatebox - opening_to_stop_feature_mock(feature_mock) - feature_mock.has_stop = False + feature_mock.state = 1 # opening + feature_mock.has_stop = False await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -488,17 +454,24 @@ async def test_tilt_with_position_supported_features( @pytest.mark.parametrize("feature", ALL_COVER_FIXTURES, indirect=["feature"]) async def test_update_failure( - feature, hass: HomeAssistant, caplog: pytest.LogCaptureFixture + feature, + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test that update failures are logged.""" + """Test that update failures cause config entry setup retry.""" caplog.set_level(logging.ERROR) - feature_mock, entity_id = feature - feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) - await async_setup_entity(hass, entity_id) + feature_mock, _entity_id = feature + feature_mock.product.async_update_data = AsyncMock( + side_effect=blebox_uniapi.error.ClientError + ) - assert f"Updating '{feature_mock.full_name}' failed: " in caplog.text + await async_setup_config_entry(hass, config_entry) + + feature_mock.product.async_update_data.assert_called() + assert config_entry.state is ConfigEntryState.SETUP_RETRY @pytest.mark.parametrize("feature", ALL_COVER_FIXTURES, indirect=["feature"]) @@ -507,10 +480,7 @@ async def test_opening_state(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 1 # opening - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.state = 1 # opening await async_setup_entity(hass, entity_id) assert hass.states.get(entity_id).state == CoverState.OPENING @@ -521,10 +491,7 @@ async def test_closing_state(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 0 # closing - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.state = 0 # closing await async_setup_entity(hass, entity_id) assert hass.states.get(entity_id).state == CoverState.CLOSING @@ -535,10 +502,7 @@ async def test_closed_state(feature, hass: HomeAssistant) -> None: feature_mock, entity_id = feature - def initial_update(): - feature_mock.state = 3 # closed - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.state = 3 # closed await async_setup_entity(hass, entity_id) assert hass.states.get(entity_id).state == CoverState.CLOSED @@ -548,11 +512,7 @@ async def test_tilt_position(shutterbox, hass: HomeAssistant) -> None: feature_mock, entity_id = shutterbox - def tilt_update(): - feature_mock.tilt_current = 90 - - feature_mock.async_update = AsyncMock(side_effect=tilt_update) - + feature_mock.tilt_current = 90 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -564,20 +524,15 @@ async def test_set_tilt_position(shutterbox, hass: HomeAssistant) -> None: feature_mock, entity_id = shutterbox - def initial_update(): - feature_mock.state = 3 + feature_mock.state = 3 + await async_setup_entity(hass, entity_id) + assert hass.states.get(entity_id).state == CoverState.CLOSED def set_tilt(tilt_position): assert tilt_position == 20 feature_mock.state = 1 - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_set_tilt_position = AsyncMock(side_effect=set_tilt) - - await async_setup_entity(hass, entity_id) - assert hass.states.get(entity_id).state == CoverState.CLOSED - - feature_mock.async_update = AsyncMock() await hass.services.async_call( "cover", SERVICE_SET_COVER_TILT_POSITION, @@ -604,20 +559,15 @@ async def test_open_tilt( """Test opening tilt for 90-degree and 180-degree tilt shutters.""" feature_mock, entity_id = shutterbox feature_mock.is_tilt_180 = is_tilt_180 - - def initial_update(): - feature_mock.tilt_current = 100 + feature_mock.tilt_current = 100 + await async_setup_entity(hass, entity_id) def set_tilt_position(tilt_position): assert tilt_position == expected_tilt_position feature_mock.tilt_current = tilt_position - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_set_tilt_position = AsyncMock(side_effect=set_tilt_position) - await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() - await hass.services.async_call( "cover", SERVICE_OPEN_COVER_TILT, @@ -634,19 +584,15 @@ async def test_close_tilt(shutterbox, hass: HomeAssistant) -> None: """Test closing tilt.""" feature_mock, entity_id = shutterbox - def initial_update(): - feature_mock.tilt_current = 0 + feature_mock.tilt_current = 0 + await async_setup_entity(hass, entity_id) def set_tilt_position(tilt_position): assert tilt_position == 100 feature_mock.tilt_current = tilt_position - feature_mock.async_update = AsyncMock(side_effect=initial_update) feature_mock.async_set_tilt_position = AsyncMock(side_effect=set_tilt_position) - await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() - await hass.services.async_call( "cover", SERVICE_CLOSE_COVER_TILT, diff --git a/tests/components/blebox/test_init.py b/tests/components/blebox/test_init.py index 0cb5139336c52..c448d099dbec1 100644 --- a/tests/components/blebox/test_init.py +++ b/tests/components/blebox/test_init.py @@ -8,58 +8,58 @@ from homeassistant.config_entries import ConfigEntryState from homeassistant.core import HomeAssistant -from .conftest import mock_config, patch_product_identify, setup_product_mock +from .conftest import ( + async_setup_config_entry, + patch_product_identify, + setup_product_mock, +) + +from tests.common import MockConfigEntry async def test_setup_failure( - hass: HomeAssistant, caplog: pytest.LogCaptureFixture + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: """Test that setup failure is handled and logged.""" patch_product_identify(None, side_effect=blebox_uniapi.error.ClientError) - entry = mock_config() - entry.add_to_hass(hass) - caplog.set_level(logging.ERROR) - await hass.config_entries.async_setup(entry.entry_id) - await hass.async_block_till_done() + await async_setup_config_entry(hass, config_entry) assert "Identify failed at 172.100.123.4:80 ()" in caplog.text - assert entry.state is ConfigEntryState.SETUP_RETRY + assert config_entry.state is ConfigEntryState.SETUP_RETRY async def test_setup_failure_on_connection( - hass: HomeAssistant, caplog: pytest.LogCaptureFixture + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: """Test that setup failure is handled and logged.""" patch_product_identify(None, side_effect=blebox_uniapi.error.ConnectionError) - entry = mock_config() - entry.add_to_hass(hass) - caplog.set_level(logging.ERROR) - await hass.config_entries.async_setup(entry.entry_id) - await hass.async_block_till_done() + await async_setup_config_entry(hass, config_entry) assert "Identify failed at 172.100.123.4:80 ()" in caplog.text - assert entry.state is ConfigEntryState.SETUP_RETRY + assert config_entry.state is ConfigEntryState.SETUP_RETRY -async def test_unload_config_entry(hass: HomeAssistant) -> None: +async def test_unload_config_entry( + hass: HomeAssistant, config_entry: MockConfigEntry +) -> None: """Test that unloading works properly.""" setup_product_mock("switches", []) - entry = mock_config() - entry.add_to_hass(hass) - - await hass.config_entries.async_setup(entry.entry_id) - await hass.async_block_till_done() - assert hasattr(entry, "runtime_data") + await async_setup_config_entry(hass, config_entry) + assert hasattr(config_entry, "runtime_data") - await hass.config_entries.async_unload(entry.entry_id) + await hass.config_entries.async_unload(config_entry.entry_id) await hass.async_block_till_done() - assert not hasattr(entry, "runtime_data") + assert not hasattr(config_entry, "runtime_data") - assert entry.state is ConfigEntryState.NOT_LOADED + assert config_entry.state is ConfigEntryState.NOT_LOADED diff --git a/tests/components/blebox/test_light.py b/tests/components/blebox/test_light.py index e921b3b5d2c6e..521cfaa7db1a0 100644 --- a/tests/components/blebox/test_light.py +++ b/tests/components/blebox/test_light.py @@ -15,6 +15,7 @@ ATTR_SUPPORTED_COLOR_MODES, ColorMode, ) +from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( SERVICE_TURN_OFF, SERVICE_TURN_ON, @@ -25,7 +26,9 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr -from .conftest import async_setup_entity, mock_feature +from .conftest import async_setup_config_entry, async_setup_entity, mock_feature + +from tests.common import MockConfigEntry ALL_LIGHT_FIXTURES = ["dimmer", "wlightbox_s", "wlightbox"] @@ -85,10 +88,7 @@ async def test_dimmer_update(dimmer, hass: HomeAssistant) -> None: feature_mock, entity_id = dimmer - def initial_update(): - feature_mock.brightness = 53 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.brightness = 53 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -101,14 +101,10 @@ async def test_dimmer_on(dimmer, hass: HomeAssistant) -> None: feature_mock, entity_id = dimmer - def initial_update(): - feature_mock.is_on = False - feature_mock.brightness = 0 # off - feature_mock.sensible_on_value = 254 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False + feature_mock.brightness = 0 # off + feature_mock.sensible_on_value = 254 await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF @@ -136,14 +132,10 @@ async def test_dimmer_on_with_brightness(dimmer, hass: HomeAssistant) -> None: feature_mock, entity_id = dimmer - def initial_update(): - feature_mock.is_on = False - feature_mock.brightness = 0 # off - feature_mock.sensible_on_value = 254 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False + feature_mock.brightness = 0 # off + feature_mock.sensible_on_value = 254 await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF @@ -177,12 +169,8 @@ async def test_dimmer_off(dimmer, hass: HomeAssistant) -> None: feature_mock, entity_id = dimmer - def initial_update(): - feature_mock.is_on = True - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_ON @@ -259,12 +247,8 @@ async def test_wlightbox_s_update(wlightbox_s, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox_s - def initial_update(): - feature_mock.brightness = 0xAB - feature_mock.is_on = True - - feature_mock.async_update = AsyncMock(side_effect=initial_update) - + feature_mock.brightness = 0xAB + feature_mock.is_on = True await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -277,13 +261,9 @@ async def test_wlightbox_s_on(wlightbox_s, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox_s - def initial_update(): - feature_mock.is_on = False - feature_mock.sensible_on_value = 254 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False + feature_mock.sensible_on_value = 254 await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF @@ -431,12 +411,9 @@ async def test_wlightbox_update(wlightbox, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = True - feature_mock.rgbw_hex = "fa00203A" - feature_mock.white_value = 0x3A - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True + feature_mock.rgbw_hex = "fa00203A" + feature_mock.white_value = 0x3A await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -449,12 +426,8 @@ async def test_wlightbox_on_rgbw(wlightbox, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF @@ -499,12 +472,8 @@ async def test_wlightbox_on_to_last_color(wlightbox, hass: HomeAssistant) -> Non feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF @@ -537,14 +506,10 @@ async def test_wlightbox_turn_on_with_zero_brightness_turns_off( feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = True - feature_mock.rgbw_hex = "c1d2f3c7" - feature_mock.white_value = 0xC7 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True + feature_mock.rgbw_hex = "c1d2f3c7" + feature_mock.white_value = 0xC7 await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_ON @@ -577,12 +542,8 @@ async def test_wlightbox_off(wlightbox, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = True - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_ON @@ -608,17 +569,24 @@ def turn_off(): @pytest.mark.parametrize("feature", ALL_LIGHT_FIXTURES, indirect=["feature"]) async def test_update_failure( - feature, hass: HomeAssistant, caplog: pytest.LogCaptureFixture + feature, + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test that update failures are logged.""" + """Test that update failures cause config entry setup retry.""" caplog.set_level(logging.ERROR) - feature_mock, entity_id = feature - feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) - await async_setup_entity(hass, entity_id) + feature_mock, _entity_id = feature + feature_mock.product.async_update_data = AsyncMock( + side_effect=blebox_uniapi.error.ClientError + ) + + await async_setup_config_entry(hass, config_entry) - assert f"Updating '{feature_mock.full_name}' failed: " in caplog.text + feature_mock.product.async_update_data.assert_called() + assert config_entry.state is ConfigEntryState.SETUP_RETRY @pytest.mark.parametrize("feature", ALL_LIGHT_FIXTURES, indirect=["feature"]) @@ -652,12 +620,8 @@ async def test_wlightbox_on_effect(wlightbox, hass: HomeAssistant) -> None: feature_mock, entity_id = wlightbox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() state = hass.states.get(entity_id) assert state.state == STATE_OFF diff --git a/tests/components/blebox/test_sensor.py b/tests/components/blebox/test_sensor.py index 295321b557a5a..ddac2db094ea1 100644 --- a/tests/components/blebox/test_sensor.py +++ b/tests/components/blebox/test_sensor.py @@ -7,6 +7,7 @@ import pytest from homeassistant.components.sensor import SensorDeviceClass +from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_UNIT_OF_MEASUREMENT, @@ -17,7 +18,9 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr -from .conftest import async_setup_entity, mock_feature +from .conftest import async_setup_config_entry, async_setup_entity, mock_feature + +from tests.common import MockConfigEntry @pytest.fixture(name="airsensor") @@ -87,10 +90,7 @@ async def test_update(tempsensor, hass: HomeAssistant) -> None: feature_mock, entity_id = tempsensor - def initial_update(): - feature_mock.native_value = 25.18 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.native_value = 25.18 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -99,17 +99,24 @@ def initial_update(): async def test_update_failure( - tempsensor, hass: HomeAssistant, caplog: pytest.LogCaptureFixture + tempsensor, + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test that update failures are logged.""" + """Test that update failures cause config entry setup retry.""" caplog.set_level(logging.ERROR) - feature_mock, entity_id = tempsensor - feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) - await async_setup_entity(hass, entity_id) + feature_mock, _entity_id = tempsensor + feature_mock.product.async_update_data = AsyncMock( + side_effect=blebox_uniapi.error.ClientError + ) + + await async_setup_config_entry(hass, config_entry) - assert f"Updating '{feature_mock.full_name}' failed: " in caplog.text + feature_mock.product.async_update_data.assert_called() + assert config_entry.state is ConfigEntryState.SETUP_RETRY async def test_airsensor_init( @@ -141,10 +148,7 @@ async def test_airsensor_update(airsensor, hass: HomeAssistant) -> None: feature_mock, entity_id = airsensor - def initial_update(): - feature_mock.native_value = 49 - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.native_value = 49 await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) diff --git a/tests/components/blebox/test_switch.py b/tests/components/blebox/test_switch.py index 82c4db0d6cf25..4f0e27bb4f1fc 100644 --- a/tests/components/blebox/test_switch.py +++ b/tests/components/blebox/test_switch.py @@ -7,6 +7,7 @@ import pytest from homeassistant.components.switch import SwitchDeviceClass +from homeassistant.config_entries import ConfigEntryState from homeassistant.const import ( ATTR_DEVICE_CLASS, SERVICE_TURN_OFF, @@ -19,6 +20,7 @@ from homeassistant.helpers import device_registry as dr from .conftest import ( + async_setup_config_entry, async_setup_entities, async_setup_entity, mock_feature, @@ -26,6 +28,8 @@ setup_product_mock, ) +from tests.common import MockConfigEntry + @pytest.fixture(name="switchbox") def switchbox_fixture(): @@ -38,7 +42,6 @@ def switchbox_fixture(): device_class="relay", is_on=False, ) - feature.async_update = AsyncMock() product = feature.product type(product).name = PropertyMock(return_value="My switch box") type(product).model = PropertyMock(return_value="switchBox") @@ -50,9 +53,8 @@ async def test_switchbox_init( ) -> None: """Test switch default state.""" - feature_mock, entity_id = switchbox + _feature_mock, entity_id = switchbox - feature_mock.async_update = AsyncMock() entry = await async_setup_entity(hass, entity_id) assert entry.unique_id == "BleBox-switchBox-1afe34e750b8-0.relay" @@ -77,10 +79,7 @@ async def test_switchbox_update_when_off(switchbox, hass: HomeAssistant) -> None feature_mock, entity_id = switchbox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -92,10 +91,7 @@ async def test_switchbox_update_when_on(switchbox, hass: HomeAssistant) -> None: feature_mock, entity_id = switchbox - def initial_update(): - feature_mock.is_on = True - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True await async_setup_entity(hass, entity_id) state = hass.states.get(entity_id) @@ -107,12 +103,8 @@ async def test_switchbox_on(switchbox, hass: HomeAssistant) -> None: feature_mock, entity_id = switchbox - def initial_update(): - feature_mock.is_on = False - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = False await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def turn_on(): feature_mock.is_on = True @@ -135,12 +127,8 @@ async def test_switchbox_off(switchbox, hass: HomeAssistant) -> None: feature_mock, entity_id = switchbox - def initial_update(): - feature_mock.is_on = True - - feature_mock.async_update = AsyncMock(side_effect=initial_update) + feature_mock.is_on = True await async_setup_entity(hass, entity_id) - feature_mock.async_update = AsyncMock() def turn_off(): feature_mock.is_on = False @@ -199,10 +187,8 @@ async def test_switchbox_d_init( ) -> None: """Test switch default state.""" - feature_mocks, entity_ids = switchbox_d + _feature_mocks, entity_ids = switchbox_d - feature_mocks[0].async_update = AsyncMock() - feature_mocks[1].async_update = AsyncMock() entries = await async_setup_entities(hass, entity_ids) entry = entries[0] @@ -243,12 +229,8 @@ async def test_switchbox_d_update_when_off(switchbox_d, hass: HomeAssistant) -> feature_mocks, entity_ids = switchbox_d - def initial_update0(): - feature_mocks[0].is_on = False - feature_mocks[1].is_on = False - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update0) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = False + feature_mocks[1].is_on = False await async_setup_entities(hass, entity_ids) assert hass.states.get(entity_ids[0]).state == STATE_OFF @@ -262,12 +244,8 @@ async def test_switchbox_d_update_when_second_off( feature_mocks, entity_ids = switchbox_d - def initial_update0(): - feature_mocks[0].is_on = True - feature_mocks[1].is_on = False - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update0) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = True + feature_mocks[1].is_on = False await async_setup_entities(hass, entity_ids) assert hass.states.get(entity_ids[0]).state == STATE_ON @@ -279,14 +257,9 @@ async def test_switchbox_d_turn_first_on(switchbox_d, hass: HomeAssistant) -> No feature_mocks, entity_ids = switchbox_d - def initial_update0(): - feature_mocks[0].is_on = False - feature_mocks[1].is_on = False - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update0) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = False + feature_mocks[1].is_on = False await async_setup_entities(hass, entity_ids) - feature_mocks[0].async_update = AsyncMock() def turn_on0(): feature_mocks[0].is_on = True @@ -308,14 +281,9 @@ async def test_switchbox_d_second_on(switchbox_d, hass: HomeAssistant) -> None: feature_mocks, entity_ids = switchbox_d - def initial_update0(): - feature_mocks[0].is_on = False - feature_mocks[1].is_on = False - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update0) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = False + feature_mocks[1].is_on = False await async_setup_entities(hass, entity_ids) - feature_mocks[0].async_update = AsyncMock() def turn_on1(): feature_mocks[1].is_on = True @@ -337,14 +305,9 @@ async def test_switchbox_d_first_off(switchbox_d, hass: HomeAssistant) -> None: feature_mocks, entity_ids = switchbox_d - def initial_update_any(): - feature_mocks[0].is_on = True - feature_mocks[1].is_on = True - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update_any) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = True + feature_mocks[1].is_on = True await async_setup_entities(hass, entity_ids) - feature_mocks[0].async_update = AsyncMock() def turn_off0(): feature_mocks[0].is_on = False @@ -366,14 +329,9 @@ async def test_switchbox_d_second_off(switchbox_d, hass: HomeAssistant) -> None: feature_mocks, entity_ids = switchbox_d - def initial_update_any(): - feature_mocks[0].is_on = True - feature_mocks[1].is_on = True - - feature_mocks[0].async_update = AsyncMock(side_effect=initial_update_any) - feature_mocks[1].async_update = AsyncMock() + feature_mocks[0].is_on = True + feature_mocks[1].is_on = True await async_setup_entities(hass, entity_ids) - feature_mocks[0].async_update = AsyncMock() def turn_off1(): feature_mocks[1].is_on = False @@ -394,21 +352,26 @@ def turn_off1(): @pytest.mark.parametrize("feature", ALL_SWITCH_FIXTURES, indirect=["feature"]) async def test_update_failure( - feature, hass: HomeAssistant, caplog: pytest.LogCaptureFixture + feature, + hass: HomeAssistant, + config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test that update failures are logged.""" + """Test that update failures cause config entry setup retry.""" caplog.set_level(logging.ERROR) feature_mock, entity_id = feature if isinstance(feature_mock, list): - feature_mock[0].async_update = AsyncMock() - feature_mock[1].async_update = AsyncMock() feature_mock = feature_mock[0] entity_id = entity_id[0] - feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) - await async_setup_entity(hass, entity_id) + feature_mock.product.async_update_data = AsyncMock( + side_effect=blebox_uniapi.error.ClientError + ) + + await async_setup_config_entry(hass, config_entry) - assert f"Updating '{feature_mock.full_name}' failed: " in caplog.text + feature_mock.product.async_update_data.assert_called() + assert config_entry.state is ConfigEntryState.SETUP_RETRY diff --git a/tests/components/blebox/test_update.py b/tests/components/blebox/test_update.py index 4f05e5d37f143..dc11de2e4a9d2 100644 --- a/tests/components/blebox/test_update.py +++ b/tests/components/blebox/test_update.py @@ -136,6 +136,25 @@ async def test_update_error( assert "HomeAssistantError" in caplog.text +@pytest.mark.freeze_time("2026-05-21 00:00:00") +async def test_scan_interval_triggers_update( + firmwareupdate: tuple[blebox_uniapi.update.Update, str], + hass: HomeAssistant, + freezer: FrozenDateTimeFactory, +) -> None: + """Test that the SCAN_INTERVAL-based poll fires async_update after one hour.""" + feature_mock, entity_id = firmwareupdate + + await async_setup_entity(hass, entity_id) + + feature_mock.async_update = AsyncMock() + freezer.tick(timedelta(hours=1)) + async_fire_time_changed(hass) + await hass.async_block_till_done() + + feature_mock.async_update.assert_awaited_once() + + @pytest.mark.freeze_time("2026-05-21 00:00:00") async def test_install( firmwareupdate: tuple[blebox_uniapi.update.Update, str], @@ -168,19 +187,15 @@ def initial_update() -> None: assert state.attributes[ATTR_INSTALLED_VERSION] == "0.1" +@pytest.mark.freeze_time("2026-05-21 00:00:00") async def test_install_error( firmwareupdate: tuple[blebox_uniapi.update.Update, str], hass: HomeAssistant, freezer: FrozenDateTimeFactory, ) -> None: - """Test that an install failure clears in_progress and raises HomeAssistantError.""" + """Test that an install failure clears in_progress, raises HomeAssistantError, and schedules no poll.""" feature_mock, entity_id = firmwareupdate - def initial_update() -> None: - feature_mock.installed_version = "0.1" - feature_mock.latest_version = "0.2" - - feature_mock.async_update = AsyncMock(side_effect=initial_update) await async_setup_entity(hass, entity_id) feature_mock.async_install = AsyncMock( @@ -198,11 +213,12 @@ def initial_update() -> None: state = hass.states.get(entity_id) assert state.attributes[ATTR_IN_PROGRESS] is False + feature_mock.async_update = AsyncMock() freezer.tick(timedelta(seconds=11)) async_fire_time_changed(hass) await hass.async_block_till_done() - feature_mock.async_update.assert_called_once() + feature_mock.async_update.assert_not_called() @pytest.mark.freeze_time("2026-05-21 00:00:00") @@ -259,11 +275,6 @@ async def test_poll_connection_error( """Test that ConnectionError during poll reschedules the next poll without updating sw_version.""" feature_mock, entity_id = firmwareupdate - def initial_update() -> None: - feature_mock.installed_version = "0.1" - feature_mock.latest_version = "0.2" - - feature_mock.async_update = AsyncMock(side_effect=initial_update) entry = await async_setup_entity(hass, entity_id) await hass.services.async_call( From 6a836bd1d98c83f99164c9f8048b8d14835786e8 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Mon, 1 Jun 2026 21:53:45 +0200 Subject: [PATCH 25/39] Add tests for Overkiz select platform (#171899) --- .../setup/local_somfy_tahoma_v2_europe.json | 256 ++++++++++++++ .../overkiz/snapshots/test_select.ambr | 314 ++++++++++++++++++ tests/components/overkiz/test_select.py | 172 ++++++++++ 3 files changed, 742 insertions(+) create mode 100644 tests/components/overkiz/snapshots/test_select.ambr create mode 100644 tests/components/overkiz/test_select.py diff --git a/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json b/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json index 334000d416be7..2328c243d6c71 100644 --- a/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json +++ b/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json @@ -2610,6 +2610,262 @@ "subsystemId": 0, "synced": true, "type": 1 + }, + { + "states": [ + { + "value": [], + "type": 11, + "name": "core:CommandLockLevelsState" + }, + { + "value": "good", + "type": 3, + "name": "core:DiscreteRSSILevelState" + }, + { + "value": 100, + "type": 1, + "name": "core:RSSILevelState" + }, + { + "value": "off", + "type": 3, + "name": "core:OnOffState" + }, + { + "value": "normal", + "type": 3, + "name": "core:BatteryState" + }, + { + "value": "available", + "type": 3, + "name": "core:StatusState" + }, + { + "value": "Siren", + "type": 3, + "name": "core:NameState" + }, + { + "value": "standard", + "type": 3, + "name": "io:MemorizedSimpleVolumeState" + } + ], + "enabled": true, + "type": 1, + "synced": true, + "attributes": [ + { + "value": "5131231A02", + "type": 3, + "name": "core:FirmwareRevision" + }, + { + "value": "Somfy", + "type": 3, + "name": "core:Manufacturer" + } + ], + "deviceURL": "io://1234-5678-3293/2733989", + "definition": { + "uiClass": "Siren", + "states": [ + { + "name": "core:NameState" + }, + { + "name": "core:DiscreteRSSILevelState" + }, + { + "name": "core:RSSILevelState" + }, + { + "name": "core:CommandLockLevelsState" + }, + { + "name": "core:AdditionalStatusState" + }, + { + "name": "core:BatteryState" + }, + { + "name": "io:MemorizedSimpleVolumeState" + }, + { + "name": "core:OnOffState" + }, + { + "name": "core:StatusState" + }, + { + "name": "core:ManufacturerSettingsState" + }, + { + "name": "core:ManufacturerDiagnosticsState" + } + ], + "widgetName": "IOSiren", + "commands": [ + { + "nparams": 1, + "commandName": "setConfigState", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "unpairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "commandName": "unpairAllOneWayControllers", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "advancedRefresh", + "paramsSig": "p1,*p2" + }, + { + "nparams": 1, + "commandName": "setMemorizedSimpleVolume", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "pairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "commandName": "getName", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "delayedStopIdentify", + "paramsSig": "p1" + }, + { + "nparams": 4, + "commandName": "ringWithSingleSimpleSequence", + "paramsSig": "p1,p2,p3,p4" + }, + { + "commandName": "unpairAllOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "nparams": 8, + "commandName": "ringWithDoubleSimpleSequence", + "paramsSig": "p1,p2,p3,p4,p5,p6,p7,p8" + }, + { + "nparams": 1, + "commandName": "executeManufacturerProcedure", + "paramsSig": "p1,*p2" + }, + { + "nparams": 1, + "commandName": "writeManufacturerData", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "readManufacturerData", + "paramsSig": "p1" + }, + { + "commandName": "off", + "nparams": 0 + }, + { + "commandName": "sendIOKey", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "wink", + "paramsSig": "p1" + }, + { + "commandName": "stopIdentify", + "nparams": 0 + }, + { + "commandName": "startIdentify", + "nparams": 0 + }, + { + "nparams": 12, + "commandName": "ringWithThreeSimpleSequence", + "paramsSig": "p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12" + }, + { + "commandName": "identify", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "setName", + "paramsSig": "p1" + }, + { + "commandName": "ring", + "nparams": 0 + }, + { + "commandName": "stop", + "nparams": 0 + }, + { + "nparams": 2, + "commandName": "runManufacturerSettingsCommand", + "paramsSig": "p1,p2" + }, + { + "commandName": "keepOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "commandName": "resetLockLevels", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "removeLockLevel", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "addLockLevel", + "paramsSig": "p1,*p2" + } + ], + "type": "ACTUATOR", + "attributes": [ + { + "name": "core:FirmwareRevision" + }, + { + "name": "core:SupportedManufacturerProcedures" + }, + { + "name": "core:SupportedManufacturerSettingsCommands" + }, + { + "name": "core:SupportedReadableManufacturerData" + }, + { + "name": "core:Manufacturer" + } + ] + }, + "available": true, + "label": "Siren", + "subsystemId": 0, + "controllableName": "io:SomfyIndoorSimpleSirenIOComponent" } ] } diff --git a/tests/components/overkiz/snapshots/test_select.ambr b/tests/components/overkiz/snapshots/test_select.ambr new file mode 100644 index 0000000000000..b88b5b8edaf9f --- /dev/null +++ b/tests/components/overkiz/snapshots/test_select.ambr @@ -0,0 +1,314 @@ +# serializer version: 1 +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_garden_gate_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + , + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.living_room_garden_gate_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Position', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'open_closed_pedestrian', + 'unique_id': 'io://1234-1234-6233/877679-core:OpenClosedPedestrianState', + 'unit_of_measurement': None, + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_garden_gate_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Garden Gate Position', + 'options': list([ + , + , + , + ]), + }), + 'context': , + 'entity_id': 'select.living_room_garden_gate_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_partial_garage_door_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + , + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.living_room_partial_garage_door_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Position', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'open_closed_partial', + 'unique_id': 'io://1234-1234-6233/7433515-core:OpenClosedPartialState', + 'unit_of_measurement': None, + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_partial_garage_door_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Partial Garage Door Position', + 'options': list([ + , + , + , + ]), + }), + 'context': , + 'entity_id': 'select.living_room_partial_garage_door_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_sliding_gate_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + , + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.living_room_sliding_gate_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Position', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Position', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'open_closed_pedestrian', + 'unique_id': 'io://1234-1234-6233/16730051-core:OpenClosedPedestrianState', + 'unit_of_measurement': None, + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.living_room_sliding_gate_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Sliding Gate Position', + 'options': list([ + , + , + , + ]), + }), + 'context': , + 'entity_id': 'select.living_room_sliding_gate_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.willow_house_protexiom_active_zones-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + '', + 'A', + 'B', + 'C', + 'A,B', + 'B,C', + 'A,C', + 'A,B,C', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.willow_house_protexiom_active_zones', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Active zones', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Active zones', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'active_zones', + 'unique_id': 'io://1234-1234-6233/2155276-core:ActiveZonesState', + 'unit_of_measurement': None, + }) +# --- +# name: test_select_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][select.willow_house_protexiom_active_zones-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Protexiom Active zones', + 'options': list([ + '', + 'A', + 'B', + 'C', + 'A,B', + 'B,C', + 'A,C', + 'A,B,C', + ]), + }), + 'context': , + 'entity_id': 'select.willow_house_protexiom_active_zones', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '', + }) +# --- +# name: test_select_entities_snapshot[local_somfy_tahoma_v2_europe.json][select.siren_memorized_simple_volume-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.siren_memorized_simple_volume', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Memorized simple volume', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Memorized simple volume', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'memorized_simple_volume', + 'unique_id': 'io://1234-5678-3293/2733989-io:MemorizedSimpleVolumeState', + 'unit_of_measurement': None, + }) +# --- +# name: test_select_entities_snapshot[local_somfy_tahoma_v2_europe.json][select.siren_memorized_simple_volume-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Siren Memorized simple volume', + 'options': list([ + , + , + ]), + }), + 'context': , + 'entity_id': 'select.siren_memorized_simple_volume', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'standard', + }) +# --- diff --git a/tests/components/overkiz/test_select.py b/tests/components/overkiz/test_select.py new file mode 100644 index 0000000000000..6ca39685ee88c --- /dev/null +++ b/tests/components/overkiz/test_select.py @@ -0,0 +1,172 @@ +"""Tests for the Overkiz select platform.""" + +from collections.abc import Generator +from pathlib import Path +from unittest.mock import patch + +from freezegun.api import FrozenDateTimeFactory +from pyoverkiz.enums import EventName +import pytest +from syrupy.assertion import SnapshotAssertion + +from homeassistant.components.select import ( + ATTR_OPTION, + DOMAIN as SELECT_DOMAIN, + SERVICE_SELECT_OPTION, +) +from homeassistant.const import ATTR_ENTITY_ID, STATE_UNAVAILABLE, Platform +from homeassistant.core import HomeAssistant +from homeassistant.helpers import entity_registry as er + +from .conftest import FixtureDevice, MockOverkizClient, SetupOverkizIntegration +from .helpers import assert_command_call, async_deliver_events, build_event + +from tests.common import snapshot_platform + +OPEN_CLOSED_PEDESTRIAN = FixtureDevice( + "setup/cloud_somfy_tahoma_v2_europe.json", + "io://1234-1234-6233/877679", + "select.living_room_garden_gate_position", +) +OPEN_CLOSED_PARTIAL = FixtureDevice( + "setup/cloud_somfy_tahoma_v2_europe.json", + "io://1234-1234-6233/7433515", + "select.living_room_partial_garage_door_position", +) +MEMORIZED_SIMPLE_VOLUME = FixtureDevice( + "setup/local_somfy_tahoma_v2_europe.json", + "io://1234-5678-3293/2733989", + "select.siren_memorized_simple_volume", +) +ACTIVE_ZONES = FixtureDevice( + "setup/cloud_somfy_tahoma_v2_europe.json", + "io://1234-1234-6233/2155276", + "select.willow_house_protexiom_active_zones", +) + +# One representative setup per fixture file; both expose select entities. +SNAPSHOT_FIXTURES = [ + "setup/cloud_somfy_tahoma_v2_europe.json", + "setup/local_somfy_tahoma_v2_europe.json", +] + + +@pytest.fixture(autouse=True) +def fixture_platforms() -> Generator[None]: + """Limit platforms to select only.""" + with patch("homeassistant.components.overkiz.PLATFORMS", [Platform.SELECT]): + yield + + +@pytest.mark.parametrize( + "fixture", + SNAPSHOT_FIXTURES, + ids=[Path(fixture).name for fixture in SNAPSHOT_FIXTURES], +) +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +async def test_select_entities_snapshot( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + entity_registry: er.EntityRegistry, + snapshot: SnapshotAssertion, + fixture: str, +) -> None: + """Test representative real setups via snapshot.""" + config_entry = await setup_overkiz_integration(fixture=fixture) + + await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id) + + +@pytest.mark.parametrize( + ("device", "option", "command_name", "parameters"), + [ + pytest.param( + OPEN_CLOSED_PEDESTRIAN, + "pedestrian", + "setPedestrianPosition", + None, + id="pedestrian", + ), + pytest.param( + OPEN_CLOSED_PARTIAL, + "partial", + "partialPosition", + None, + id="partial", + ), + pytest.param( + MEMORIZED_SIMPLE_VOLUME, + "highest", + "setMemorizedSimpleVolume", + ["highest"], + id="memorized_simple_volume", + ), + pytest.param( + ACTIVE_ZONES, + "A,B", + "alarmZoneOn", + ["A,B"], + id="active_zones", + ), + pytest.param( + ACTIVE_ZONES, + "", + "alarmOff", + None, + id="active_zones_off", + ), + ], +) +async def test_select_option( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, + device: FixtureDevice, + option: str, + command_name: str, + parameters: list[str] | None, +) -> None: + """Test selecting an option sends the expected command.""" + await setup_overkiz_integration(fixture=device.fixture) + + await hass.services.async_call( + SELECT_DOMAIN, + SERVICE_SELECT_OPTION, + {ATTR_ENTITY_ID: device.entity_id, ATTR_OPTION: option}, + blocking=True, + ) + + assert_command_call( + mock_client, + device_url=device.device_url, + command_name=command_name, + parameters=parameters, + ) + + +async def test_select_unavailability( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, + freezer: FrozenDateTimeFactory, +) -> None: + """Test select becomes unavailable when device goes offline.""" + await setup_overkiz_integration(fixture=OPEN_CLOSED_PEDESTRIAN.fixture) + + state = hass.states.get(OPEN_CLOSED_PEDESTRIAN.entity_id) + assert state + assert state.state != STATE_UNAVAILABLE + + await async_deliver_events( + hass, + freezer, + mock_client, + [ + build_event( + EventName.DEVICE_UNAVAILABLE.value, + device_url=OPEN_CLOSED_PEDESTRIAN.device_url, + ) + ], + ) + + assert hass.states.get(OPEN_CLOSED_PEDESTRIAN.entity_id).state == STATE_UNAVAILABLE From a19f3045e75d5db44c0002f91c9ffb51f74035ad Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Mon, 1 Jun 2026 21:57:42 +0200 Subject: [PATCH 26/39] Remove `battery_level` property from Tractive device tracker (#172756) --- .../components/tractive/device_tracker.py | 28 ++----------------- .../snapshots/test_device_tracker.ambr | 1 - .../tractive/test_device_tracker.py | 21 -------------- 3 files changed, 2 insertions(+), 48 deletions(-) diff --git a/homeassistant/components/tractive/device_tracker.py b/homeassistant/components/tractive/device_tracker.py index 75a9644012127..e5aff1046f5b9 100644 --- a/homeassistant/components/tractive/device_tracker.py +++ b/homeassistant/components/tractive/device_tracker.py @@ -8,11 +8,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import Trackables, TractiveClient, TractiveConfigEntry -from .const import ( - SERVER_UNAVAILABLE, - TRACKER_HARDWARE_STATUS_UPDATED, - TRACKER_POSITION_UPDATED, -) +from .const import SERVER_UNAVAILABLE, TRACKER_POSITION_UPDATED from .entity import TractiveEntity @@ -42,10 +38,9 @@ def __init__(self, client: TractiveClient, item: Trackables) -> None: client, item.trackable, item.tracker_details, - f"{TRACKER_HARDWARE_STATUS_UPDATED}-{item.tracker_details['_id']}", + f"{TRACKER_POSITION_UPDATED}-{item.tracker_details['_id']}", ) - self._battery_level: int | None = item.hw_info.get("battery_level") self._attr_latitude = item.pos_report["latlong"][0] self._attr_longitude = item.pos_report["latlong"][1] self._attr_location_accuracy: float = item.pos_report["pos_uncertainty"] @@ -59,17 +54,6 @@ def source_type(self) -> SourceType: return SourceType.BLUETOOTH return SourceType.GPS - @property - def battery_level(self) -> int | None: - """Return the battery level of the device.""" - return self._battery_level - - @callback - def _handle_hardware_status_update(self, event: dict[str, Any]) -> None: - self._battery_level = event["battery_level"] - self._attr_available = True - self.async_write_ha_state() - @callback def _handle_position_update(self, event: dict[str, Any]) -> None: self._attr_latitude = event["latitude"] @@ -85,14 +69,6 @@ async def async_added_to_hass(self) -> None: if not self._client.subscribed: self._client.subscribe() - self.async_on_remove( - async_dispatcher_connect( - self.hass, - self._dispatcher_signal, - self._handle_hardware_status_update, - ) - ) - self.async_on_remove( async_dispatcher_connect( self.hass, diff --git a/tests/components/tractive/snapshots/test_device_tracker.ambr b/tests/components/tractive/snapshots/test_device_tracker.ambr index f563dc640aa5e..102df40cbed7e 100644 --- a/tests/components/tractive/snapshots/test_device_tracker.ambr +++ b/tests/components/tractive/snapshots/test_device_tracker.ambr @@ -39,7 +39,6 @@ # name: test_device_tracker[device_tracker.tracker_device_id_123-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'battery_level': 88, 'friendly_name': 'Tracker device_id_123', 'gps_accuracy': 99, 'in_zones': list([ diff --git a/tests/components/tractive/test_device_tracker.py b/tests/components/tractive/test_device_tracker.py index a813d1bcf91fb..b396db4252f8e 100644 --- a/tests/components/tractive/test_device_tracker.py +++ b/tests/components/tractive/test_device_tracker.py @@ -94,27 +94,6 @@ async def test_source_type_gps( ) -async def test_device_tracker_with_empty_hw_info( - hass: HomeAssistant, - mock_tractive_client: AsyncMock, - mock_config_entry: MockConfigEntry, -) -> None: - """Test that the device tracker sets up correctly when hw_info is empty.""" - mock_tractive_client.tracker.return_value.hw_info = AsyncMock(return_value={}) - - with patch( - "homeassistant.components.tractive.PLATFORMS", [Platform.DEVICE_TRACKER] - ): - await init_integration(hass, mock_config_entry) - - mock_tractive_client.send_position_event(mock_config_entry) - await hass.async_block_till_done() - - state = hass.states.get("device_tracker.tracker_device_id_123") - assert state is not None - assert state.attributes.get("battery_level") is None - - async def test_device_tracker_device_assignment( hass: HomeAssistant, entity_registry: er.EntityRegistry, From ec995a34729a280554ce0be4fdecf2de84c61b7e Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 1 Jun 2026 22:10:43 +0200 Subject: [PATCH 27/39] Fix ProxmoxVE missing unused token data (#172782) --- homeassistant/components/proxmoxve/common.py | 4 ++-- tests/components/proxmoxve/test_config_flow.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/proxmoxve/common.py b/homeassistant/components/proxmoxve/common.py index 32131808af7c9..73dee442372af 100644 --- a/homeassistant/components/proxmoxve/common.py +++ b/homeassistant/components/proxmoxve/common.py @@ -3,7 +3,7 @@ from collections.abc import Mapping from typing import Any -from homeassistant.const import CONF_USERNAME +from homeassistant.const import CONF_TOKEN, CONF_USERNAME from .const import AUTH_OTHER, CONF_AUTH_METHOD, CONF_REALM, CONF_TOKEN_ID @@ -21,7 +21,7 @@ def sanitize_config_entry(input_data: Mapping[str, Any]) -> dict[str, Any]: data[CONF_REALM] = realm data[CONF_USERNAME] = f"{username}@{realm}" - if CONF_TOKEN_ID in data and "!" in data[CONF_TOKEN_ID]: + if data.get(CONF_TOKEN) and data.get(CONF_TOKEN_ID) and "!" in data[CONF_TOKEN_ID]: data[CONF_TOKEN_ID] = data[CONF_TOKEN_ID].split("!")[1] return data diff --git a/tests/components/proxmoxve/test_config_flow.py b/tests/components/proxmoxve/test_config_flow.py index 49ede27873e0d..c6814ca957176 100644 --- a/tests/components/proxmoxve/test_config_flow.py +++ b/tests/components/proxmoxve/test_config_flow.py @@ -523,6 +523,11 @@ def sanitize_config_entry(data: dict[str, Any]) -> dict[str, Any]: MOCK_USER_AUTH_STEP_OTHER_TOKEN, MOCK_TEST_TOKEN_OTHER_CONFIG, ), + ( + MOCK_USER_STEP_TOKEN, + MOCK_USER_AUTH_STEP_TOKEN_FULL_ID, + MOCK_TEST_TOKEN_CONFIG, + ), ], ) @pytest.mark.usefixtures("mock_setup_entry") From 477756da5b87d9d877afc2008c22748dd35e4408 Mon Sep 17 00:00:00 2001 From: Ermanno Baschiera Date: Mon, 1 Jun 2026 22:20:22 +0200 Subject: [PATCH 28/39] Add Helty Flow integration (#172736) --- CODEOWNERS | 2 + homeassistant/components/helty/__init__.py | 26 +++ homeassistant/components/helty/config_flow.py | 40 +++++ homeassistant/components/helty/const.py | 13 ++ homeassistant/components/helty/coordinator.py | 45 +++++ homeassistant/components/helty/entity.py | 25 +++ homeassistant/components/helty/fan.py | 120 +++++++++++++ homeassistant/components/helty/manifest.json | 12 ++ .../components/helty/quality_scale.yaml | 96 ++++++++++ homeassistant/components/helty/strings.json | 22 +++ homeassistant/generated/config_flows.py | 1 + homeassistant/generated/integrations.json | 6 + requirements_all.txt | 3 + tests/components/helty/__init__.py | 12 ++ tests/components/helty/conftest.py | 72 ++++++++ .../components/helty/snapshots/test_fan.ambr | 66 +++++++ tests/components/helty/test_config_flow.py | 111 ++++++++++++ tests/components/helty/test_fan.py | 168 ++++++++++++++++++ tests/components/helty/test_init.py | 43 +++++ 19 files changed, 883 insertions(+) create mode 100644 homeassistant/components/helty/__init__.py create mode 100644 homeassistant/components/helty/config_flow.py create mode 100644 homeassistant/components/helty/const.py create mode 100644 homeassistant/components/helty/coordinator.py create mode 100644 homeassistant/components/helty/entity.py create mode 100644 homeassistant/components/helty/fan.py create mode 100644 homeassistant/components/helty/manifest.json create mode 100644 homeassistant/components/helty/quality_scale.yaml create mode 100644 homeassistant/components/helty/strings.json create mode 100644 tests/components/helty/__init__.py create mode 100644 tests/components/helty/conftest.py create mode 100644 tests/components/helty/snapshots/test_fan.ambr create mode 100644 tests/components/helty/test_config_flow.py create mode 100644 tests/components/helty/test_fan.py create mode 100644 tests/components/helty/test_init.py diff --git a/CODEOWNERS b/CODEOWNERS index 87a4c2155aac1..0802144fb666e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -718,6 +718,8 @@ CLAUDE.md @home-assistant/core /homeassistant/components/heatmiser/ @andylockran /homeassistant/components/hegel/ @boazca /tests/components/hegel/ @boazca +/homeassistant/components/helty/ @ebaschiera +/tests/components/helty/ @ebaschiera /homeassistant/components/heos/ @andrewsayre /tests/components/heos/ @andrewsayre /homeassistant/components/here_travel_time/ @eifinger diff --git a/homeassistant/components/helty/__init__.py b/homeassistant/components/helty/__init__.py new file mode 100644 index 0000000000000..d6800a8076a2c --- /dev/null +++ b/homeassistant/components/helty/__init__.py @@ -0,0 +1,26 @@ +"""The Helty Flow integration.""" + +from pyhelty import HeltyClient + +from homeassistant.const import CONF_HOST, Platform +from homeassistant.core import HomeAssistant + +from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator + +PLATFORMS: list[Platform] = [Platform.FAN] + + +async def async_setup_entry(hass: HomeAssistant, entry: HeltyConfigEntry) -> bool: + """Set up Helty Flow from a config entry.""" + client = HeltyClient(entry.data[CONF_HOST]) + coordinator = HeltyDataUpdateCoordinator(hass, entry, client) + await coordinator.async_config_entry_first_refresh() + + entry.runtime_data = coordinator + await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) + return True + + +async def async_unload_entry(hass: HomeAssistant, entry: HeltyConfigEntry) -> bool: + """Unload a config entry.""" + return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) diff --git a/homeassistant/components/helty/config_flow.py b/homeassistant/components/helty/config_flow.py new file mode 100644 index 0000000000000..144618786e2e9 --- /dev/null +++ b/homeassistant/components/helty/config_flow.py @@ -0,0 +1,40 @@ +"""Config flow for the Helty Flow integration.""" + +from typing import Any + +from pyhelty import HeltyClient, HeltyConnectionError, HeltyError +import voluptuous as vol + +from homeassistant.config_entries import ConfigFlow, ConfigFlowResult +from homeassistant.const import CONF_HOST + +from .const import DOMAIN + +STEP_USER_DATA_SCHEMA = vol.Schema({vol.Required(CONF_HOST): str}) + + +class HeltyConfigFlow(ConfigFlow, domain=DOMAIN): + """Handle a config flow for Helty Flow.""" + + async def async_step_user( + self, user_input: dict[str, Any] | None = None + ) -> ConfigFlowResult: + """Handle the initial setup step.""" + errors: dict[str, str] = {} + if user_input is not None: + self._async_abort_entries_match({CONF_HOST: user_input[CONF_HOST]}) + client = HeltyClient(user_input[CONF_HOST]) + try: + name = await client.async_get_name() + except HeltyConnectionError: + errors["base"] = "cannot_connect" + except HeltyError: + errors["base"] = "unknown" + else: + return self.async_create_entry( + title=name or user_input[CONF_HOST], data=user_input + ) + + return self.async_show_form( + step_id="user", data_schema=STEP_USER_DATA_SCHEMA, errors=errors + ) diff --git a/homeassistant/components/helty/const.py b/homeassistant/components/helty/const.py new file mode 100644 index 0000000000000..d6f554295a79c --- /dev/null +++ b/homeassistant/components/helty/const.py @@ -0,0 +1,13 @@ +"""Constants for the Helty Flow integration.""" + +from datetime import timedelta + +DOMAIN = "helty" + +#: How often the coordinator polls the unit. +SCAN_INTERVAL = timedelta(seconds=60) + +# Fan preset mode identifiers (also used as translation keys). +PRESET_BOOST = "boost" +PRESET_NIGHT = "night" +PRESET_FREE_COOLING = "free_cooling" diff --git a/homeassistant/components/helty/coordinator.py b/homeassistant/components/helty/coordinator.py new file mode 100644 index 0000000000000..1305cfff2db9b --- /dev/null +++ b/homeassistant/components/helty/coordinator.py @@ -0,0 +1,45 @@ +"""DataUpdateCoordinator for the Helty Flow integration.""" + +import logging + +from pyhelty import HeltyClient, HeltyConnectionError, HeltyData, HeltyError + +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant +from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed + +from .const import DOMAIN, SCAN_INTERVAL + +_LOGGER = logging.getLogger(__name__) + +type HeltyConfigEntry = ConfigEntry[HeltyDataUpdateCoordinator] + + +class HeltyDataUpdateCoordinator(DataUpdateCoordinator[HeltyData]): + """Coordinate a single poll of the Helty unit for all entities.""" + + config_entry: HeltyConfigEntry + + def __init__( + self, + hass: HomeAssistant, + config_entry: HeltyConfigEntry, + client: HeltyClient, + ) -> None: + """Initialize the coordinator.""" + super().__init__( + hass, + _LOGGER, + config_entry=config_entry, + name=DOMAIN, + update_interval=SCAN_INTERVAL, + ) + self.client = client + + async def _async_update_data(self) -> HeltyData: + try: + return await self.client.async_get_data() + except HeltyConnectionError as err: + raise UpdateFailed(f"Error communicating with Helty unit: {err}") from err + except HeltyError as err: + raise UpdateFailed(f"Unexpected response from Helty unit: {err}") from err diff --git a/homeassistant/components/helty/entity.py b/homeassistant/components/helty/entity.py new file mode 100644 index 0000000000000..92dc4078ab05e --- /dev/null +++ b/homeassistant/components/helty/entity.py @@ -0,0 +1,25 @@ +"""Base entity for the Helty Flow integration.""" + +from homeassistant.helpers.device_registry import DeviceInfo +from homeassistant.helpers.update_coordinator import CoordinatorEntity + +from .const import DOMAIN +from .coordinator import HeltyDataUpdateCoordinator + + +class HeltyEntity(CoordinatorEntity[HeltyDataUpdateCoordinator]): + """Common base for Helty entities sharing one device and coordinator.""" + + _attr_has_entity_name = True + + def __init__(self, coordinator: HeltyDataUpdateCoordinator) -> None: + """Initialize the entity and its shared device info.""" + super().__init__(coordinator) + # The unit exposes no serial/MAC, so the config entry id identifies it. + self._device_id = coordinator.config_entry.entry_id + self._attr_device_info = DeviceInfo( + identifiers={(DOMAIN, self._device_id)}, + name=coordinator.data.name, + manufacturer="Helty", + model="Flow", + ) diff --git a/homeassistant/components/helty/fan.py b/homeassistant/components/helty/fan.py new file mode 100644 index 0000000000000..1c22bddf9954c --- /dev/null +++ b/homeassistant/components/helty/fan.py @@ -0,0 +1,120 @@ +"""Fan platform for the Helty Flow integration.""" + +from typing import Any + +from pyhelty import FanMode + +from homeassistant.components.fan import FanEntity, FanEntityFeature +from homeassistant.core import HomeAssistant +from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback +from homeassistant.util.percentage import ( + ordered_list_item_to_percentage, + percentage_to_ordered_list_item, +) + +from .const import PRESET_BOOST, PRESET_FREE_COOLING, PRESET_NIGHT +from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator +from .entity import HeltyEntity + +PARALLEL_UPDATES = 1 + +# Ordered list of discrete fan speeds, lowest to highest. +ORDERED_SPEEDS: list[FanMode] = [ + FanMode.LOW, + FanMode.MEDIUM, + FanMode.HIGH, + FanMode.MAX, +] + +PRESET_TO_MODE: dict[str, FanMode] = { + PRESET_BOOST: FanMode.BOOST, + PRESET_NIGHT: FanMode.NIGHT, + PRESET_FREE_COOLING: FanMode.FREE_COOLING, +} +MODE_TO_PRESET: dict[FanMode, str] = { + mode: preset for preset, mode in PRESET_TO_MODE.items() +} + + +async def async_setup_entry( + hass: HomeAssistant, + entry: HeltyConfigEntry, + async_add_entities: AddConfigEntryEntitiesCallback, +) -> None: + """Set up the Helty fan.""" + async_add_entities([HeltyFan(entry.runtime_data)]) + + +class HeltyFan(HeltyEntity, FanEntity): + """The ventilation unit's fan, the device's primary feature.""" + + _attr_name = None + _attr_speed_count = len(ORDERED_SPEEDS) + _attr_supported_features = ( + FanEntityFeature.SET_SPEED + | FanEntityFeature.PRESET_MODE + | FanEntityFeature.TURN_ON + | FanEntityFeature.TURN_OFF + ) + + def __init__(self, coordinator: HeltyDataUpdateCoordinator) -> None: + """Initialize the fan.""" + super().__init__(coordinator) + self._attr_unique_id = self._device_id + self._attr_preset_modes = list(PRESET_TO_MODE) + + @property + def _mode(self) -> FanMode: + return self.coordinator.data.fan_mode + + @property + def is_on(self) -> bool: + """Return whether the fan is running.""" + return self._mode is not FanMode.OFF + + @property + def percentage(self) -> int | None: + """Return the current speed as a percentage, or None when on a preset.""" + if self._mode in ORDERED_SPEEDS: + return ordered_list_item_to_percentage(ORDERED_SPEEDS, self._mode) + return None + + @property + def preset_mode(self) -> str | None: + """Return the active preset, or None when running on a discrete speed.""" + return MODE_TO_PRESET.get(self._mode) + + async def async_set_percentage(self, percentage: int) -> None: + """Set a discrete fan speed from a percentage.""" + if percentage == 0: + await self._async_set_mode(FanMode.OFF) + return + await self._async_set_mode( + percentage_to_ordered_list_item(ORDERED_SPEEDS, percentage) + ) + + async def async_set_preset_mode(self, preset_mode: str) -> None: + """Set a preset mode.""" + await self._async_set_mode(PRESET_TO_MODE[preset_mode]) + + async def async_turn_on( + self, + percentage: int | None = None, + preset_mode: str | None = None, + **kwargs: Any, + ) -> None: + """Turn the fan on.""" + if preset_mode is not None: + await self.async_set_preset_mode(preset_mode) + elif percentage is not None: + await self.async_set_percentage(percentage) + else: + await self._async_set_mode(FanMode.LOW) + + async def async_turn_off(self, **kwargs: Any) -> None: + """Turn the fan off.""" + await self._async_set_mode(FanMode.OFF) + + async def _async_set_mode(self, mode: FanMode) -> None: + await self.coordinator.client.async_set_fan_mode(mode) + await self.coordinator.async_request_refresh() diff --git a/homeassistant/components/helty/manifest.json b/homeassistant/components/helty/manifest.json new file mode 100644 index 0000000000000..4bf4a3c455662 --- /dev/null +++ b/homeassistant/components/helty/manifest.json @@ -0,0 +1,12 @@ +{ + "domain": "helty", + "name": "Helty Flow", + "codeowners": ["@ebaschiera"], + "config_flow": true, + "documentation": "https://www.home-assistant.io/integrations/helty", + "integration_type": "device", + "iot_class": "local_polling", + "loggers": ["pyhelty"], + "quality_scale": "bronze", + "requirements": ["pyhelty==0.2.0"] +} diff --git a/homeassistant/components/helty/quality_scale.yaml b/homeassistant/components/helty/quality_scale.yaml new file mode 100644 index 0000000000000..087783f342aab --- /dev/null +++ b/homeassistant/components/helty/quality_scale.yaml @@ -0,0 +1,96 @@ +rules: + # Bronze + action-setup: + status: exempt + comment: This integration does not provide additional actions. + appropriate-polling: done + brands: done + common-modules: done + config-flow-test-coverage: done + config-flow: done + dependency-transparency: done + docs-actions: + status: exempt + comment: This integration does not provide additional actions. + docs-high-level-description: done + docs-installation-instructions: done + docs-removal-instructions: done + entity-event-setup: + status: exempt + comment: This integration does not subscribe to external events. + entity-unique-id: done + has-entity-name: done + runtime-data: done + test-before-configure: done + test-before-setup: done + unique-config-entry: done + + # Silver + action-exceptions: + status: exempt + comment: This integration does not provide additional actions. + config-entry-unloading: done + docs-configuration-parameters: + status: exempt + comment: This integration has no options to configure. + docs-installation-parameters: done + entity-unavailable: done + integration-owner: done + log-when-unavailable: done + parallel-updates: done + reauthentication-flow: + status: exempt + comment: This integration does not require authentication. + test-coverage: done + + # Gold + devices: done + diagnostics: todo + discovery-update-info: + status: exempt + comment: The device does not support discovery. + discovery: + status: exempt + comment: | + The device exposes no discovery protocol (no mDNS/SSDP) and no stable + identifier such as a serial number or MAC over its interface. + docs-data-update: done + docs-examples: todo + docs-known-limitations: done + docs-supported-devices: done + docs-supported-functions: done + docs-troubleshooting: todo + docs-use-cases: todo + dynamic-devices: + status: exempt + comment: A config entry represents a single fixed device. + entity-category: done + entity-device-class: done + entity-disabled-by-default: + status: exempt + comment: The only entity is the primary fan, which is enabled by default. + entity-translations: + status: exempt + comment: | + The only entity is the primary fan, which uses the device name and has + no name of its own to translate. + exception-translations: todo + icon-translations: + status: exempt + comment: The fan entity uses the default fan icon. + reconfiguration-flow: todo + repair-issues: + status: exempt + comment: This integration has no repairable issues to surface. + stale-devices: + status: exempt + comment: A config entry represents a single fixed device. + + # Platinum + async-dependency: done + inject-websession: + status: exempt + comment: | + The device is controlled over a raw TCP socket, not HTTP, so there is no + web session to inject. + strict-typing: todo diff --git a/homeassistant/components/helty/strings.json b/homeassistant/components/helty/strings.json new file mode 100644 index 0000000000000..88bb90015707f --- /dev/null +++ b/homeassistant/components/helty/strings.json @@ -0,0 +1,22 @@ +{ + "config": { + "abort": { + "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" + }, + "error": { + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", + "unknown": "[%key:common::config_flow::error::unknown%]" + }, + "step": { + "user": { + "data": { + "host": "[%key:common::config_flow::data::host%]" + }, + "data_description": { + "host": "The IP address or hostname of the Helty Flow unit on your network." + }, + "title": "Connect to your Helty Flow" + } + } + } +} diff --git a/homeassistant/generated/config_flows.py b/homeassistant/generated/config_flows.py index 7653c9c77cb18..b5e0330d3ae17 100644 --- a/homeassistant/generated/config_flows.py +++ b/homeassistant/generated/config_flows.py @@ -300,6 +300,7 @@ "harmony", "hdfury", "hegel", + "helty", "heos", "here_travel_time", "hikvision", diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index c25fac49108ea..a5f9fd5bcffe1 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -2849,6 +2849,12 @@ "zwave" ] }, + "helty": { + "name": "Helty Flow", + "integration_type": "device", + "config_flow": true, + "iot_class": "local_polling" + }, "here_travel_time": { "name": "HERE Travel Time", "integration_type": "service", diff --git a/requirements_all.txt b/requirements_all.txt index 081d870cefe33..85086bd1db53b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2201,6 +2201,9 @@ pygti==0.9.4 # homeassistant.components.version pyhaversion==22.8.0 +# homeassistant.components.helty +pyhelty==0.2.0 + # homeassistant.components.heos pyheos==1.0.6 diff --git a/tests/components/helty/__init__.py b/tests/components/helty/__init__.py new file mode 100644 index 0000000000000..a036e0c1a0bf6 --- /dev/null +++ b/tests/components/helty/__init__.py @@ -0,0 +1,12 @@ +"""Tests for the Helty Flow integration.""" + +from homeassistant.core import HomeAssistant + +from tests.common import MockConfigEntry + + +async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None: + """Set up the Helty Flow integration in Home Assistant.""" + config_entry.add_to_hass(hass) + assert await hass.config_entries.async_setup(config_entry.entry_id) + await hass.async_block_till_done() diff --git a/tests/components/helty/conftest.py b/tests/components/helty/conftest.py new file mode 100644 index 0000000000000..9f8ac8b31e7c5 --- /dev/null +++ b/tests/components/helty/conftest.py @@ -0,0 +1,72 @@ +"""Common fixtures for the Helty Flow tests.""" + +from collections.abc import Generator +from unittest.mock import AsyncMock, patch + +from pyhelty import FanMode, HeltyData +import pytest + +from homeassistant.components.helty.const import DOMAIN +from homeassistant.const import CONF_HOST + +from tests.common import MockConfigEntry + +DEVICE_NAME = "VMC Soggiorno" +HOST = "192.168.20.232" + + +def make_data(fan_mode: FanMode = FanMode.LOW) -> HeltyData: + """Build a representative HeltyData snapshot.""" + return HeltyData( + name=DEVICE_NAME, + fan_mode=fan_mode, + leds_on=True, + indoor_temperature=28.1, + outdoor_temperature=31.2, + indoor_humidity=42.2, + co2=0, + filter_hours=0, + light_level=0, + raw_sensors=tuple([281, 312, 422] + [0] * 12), + raw_status=tuple([int(fan_mode), 10] + [0] * 13), + ) + + +@pytest.fixture +def mock_setup_entry() -> Generator[AsyncMock]: + """Override async_setup_entry.""" + with patch( + "homeassistant.components.helty.async_setup_entry", + return_value=True, + ) as mock_setup_entry: + yield mock_setup_entry + + +@pytest.fixture +def mock_helty_client() -> Generator[AsyncMock]: + """Mock a Helty client at both the integration and config flow import sites.""" + with ( + patch( + "homeassistant.components.helty.HeltyClient", + autospec=True, + ) as mock_client, + patch( + "homeassistant.components.helty.config_flow.HeltyClient", + new=mock_client, + ), + ): + client = mock_client.return_value + client.async_get_name.return_value = DEVICE_NAME + client.async_get_data.return_value = make_data() + yield client + + +@pytest.fixture +def mock_config_entry() -> MockConfigEntry: + """Return a configured Helty entry.""" + return MockConfigEntry( + domain=DOMAIN, + title=DEVICE_NAME, + data={CONF_HOST: HOST}, + entry_id="01HHHHHHHHHHHHHHHHHHHHHHHH", + ) diff --git a/tests/components/helty/snapshots/test_fan.ambr b/tests/components/helty/snapshots/test_fan.ambr new file mode 100644 index 0000000000000..ce6e8988afad4 --- /dev/null +++ b/tests/components/helty/snapshots/test_fan.ambr @@ -0,0 +1,66 @@ +# serializer version: 1 +# name: test_all_entities[fan.vmc_soggiorno-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'preset_modes': list([ + 'boost', + 'night', + 'free_cooling', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'fan', + 'entity_category': None, + 'entity_id': 'fan.vmc_soggiorno', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'helty', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': None, + 'unique_id': '01HHHHHHHHHHHHHHHHHHHHHHHH', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[fan.vmc_soggiorno-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'VMC Soggiorno', + 'percentage': 25, + 'percentage_step': 25.0, + 'preset_mode': None, + 'preset_modes': list([ + 'boost', + 'night', + 'free_cooling', + ]), + 'supported_features': , + }), + 'context': , + 'entity_id': 'fan.vmc_soggiorno', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- diff --git a/tests/components/helty/test_config_flow.py b/tests/components/helty/test_config_flow.py new file mode 100644 index 0000000000000..639e782ef0e6d --- /dev/null +++ b/tests/components/helty/test_config_flow.py @@ -0,0 +1,111 @@ +"""Test the Helty Flow config flow.""" + +from unittest.mock import AsyncMock + +from pyhelty import HeltyConnectionError, HeltyError +import pytest + +from homeassistant.components.helty.const import DOMAIN +from homeassistant.config_entries import SOURCE_USER +from homeassistant.const import CONF_HOST +from homeassistant.core import HomeAssistant +from homeassistant.data_entry_flow import FlowResultType + +from .conftest import DEVICE_NAME, HOST + +from tests.common import MockConfigEntry + +USER_INPUT = {CONF_HOST: HOST} + + +async def test_user_flow( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_setup_entry: AsyncMock, +) -> None: + """Test the happy path of the user flow.""" + result = await hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_USER} + ) + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], USER_INPUT + ) + + assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["title"] == DEVICE_NAME + assert result["data"] == USER_INPUT + assert len(mock_setup_entry.mock_calls) == 1 + + +async def test_user_flow_empty_name( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_setup_entry: AsyncMock, +) -> None: + """Test the host is used as the title when the unit reports no name.""" + mock_helty_client.async_get_name.return_value = "" + + result = await hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_USER} + ) + result = await hass.config_entries.flow.async_configure( + result["flow_id"], USER_INPUT + ) + + assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["title"] == HOST + + +@pytest.mark.parametrize( + ("side_effect", "error"), + [ + (HeltyConnectionError, "cannot_connect"), + (HeltyError, "unknown"), + ], +) +async def test_user_flow_errors( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_setup_entry: AsyncMock, + side_effect: type[Exception], + error: str, +) -> None: + """Test errors are shown, then the flow recovers.""" + mock_helty_client.async_get_name.side_effect = side_effect + + result = await hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_USER} + ) + result = await hass.config_entries.flow.async_configure( + result["flow_id"], USER_INPUT + ) + assert result["type"] is FlowResultType.FORM + assert result["errors"] == {"base": error} + + mock_helty_client.async_get_name.side_effect = None + result = await hass.config_entries.flow.async_configure( + result["flow_id"], USER_INPUT + ) + assert result["type"] is FlowResultType.CREATE_ENTRY + + +async def test_already_configured( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_setup_entry: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test we abort if a unit at the same host is already configured.""" + mock_config_entry.add_to_hass(hass) + + result = await hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_USER} + ) + result = await hass.config_entries.flow.async_configure( + result["flow_id"], USER_INPUT + ) + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "already_configured" diff --git a/tests/components/helty/test_fan.py b/tests/components/helty/test_fan.py new file mode 100644 index 0000000000000..0cb3350d84240 --- /dev/null +++ b/tests/components/helty/test_fan.py @@ -0,0 +1,168 @@ +"""Test the Helty Flow fan platform.""" + +from unittest.mock import AsyncMock, patch + +from pyhelty import FanMode +import pytest +from syrupy.assertion import SnapshotAssertion + +from homeassistant.components.fan import ( + ATTR_PERCENTAGE, + ATTR_PRESET_MODE, + DOMAIN as FAN_DOMAIN, + SERVICE_SET_PERCENTAGE, + SERVICE_SET_PRESET_MODE, +) +from homeassistant.const import ( + ATTR_ENTITY_ID, + SERVICE_TURN_OFF, + SERVICE_TURN_ON, + Platform, +) +from homeassistant.core import HomeAssistant +from homeassistant.helpers import entity_registry as er + +from . import setup_integration +from .conftest import make_data + +from tests.common import MockConfigEntry, snapshot_platform + +FAN_ENTITY = "fan.vmc_soggiorno" + + +async def test_all_entities( + hass: HomeAssistant, + snapshot: SnapshotAssertion, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, + entity_registry: er.EntityRegistry, +) -> None: + """Test all entities.""" + with patch("homeassistant.components.helty.PLATFORMS", [Platform.FAN]): + await setup_integration(hass, mock_config_entry) + + await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) + + +async def test_fan_preset_state( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test the fan reports an active preset.""" + mock_helty_client.async_get_data.return_value = make_data(fan_mode=FanMode.NIGHT) + await setup_integration(hass, mock_config_entry) + + state = hass.states.get(FAN_ENTITY) + assert state.attributes[ATTR_PRESET_MODE] == "night" + assert state.attributes[ATTR_PERCENTAGE] is None + + +async def test_fan_set_preset( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test setting a preset mode.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, + SERVICE_SET_PRESET_MODE, + {ATTR_ENTITY_ID: FAN_ENTITY, ATTR_PRESET_MODE: "boost"}, + blocking=True, + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.BOOST) + + +@pytest.mark.parametrize( + ("percentage", "expected"), + [(25, FanMode.LOW), (50, FanMode.MEDIUM), (75, FanMode.HIGH), (100, FanMode.MAX)], +) +async def test_fan_set_percentage( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, + percentage: int, + expected: FanMode, +) -> None: + """Test mapping a percentage to a discrete speed.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, + SERVICE_SET_PERCENTAGE, + {ATTR_ENTITY_ID: FAN_ENTITY, ATTR_PERCENTAGE: percentage}, + blocking=True, + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(expected) + + +async def test_fan_set_percentage_zero_turns_off( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test setting 0% turns the fan off.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, + SERVICE_SET_PERCENTAGE, + {ATTR_ENTITY_ID: FAN_ENTITY, ATTR_PERCENTAGE: 0}, + blocking=True, + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.OFF) + + +async def test_fan_turn_off_and_on( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test turning the fan off and back on.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: FAN_ENTITY}, blocking=True + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.OFF) + + await hass.services.async_call( + FAN_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: FAN_ENTITY}, blocking=True + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.LOW) + + +async def test_fan_turn_on_with_percentage( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test turning on with an explicit percentage.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, + SERVICE_TURN_ON, + {ATTR_ENTITY_ID: FAN_ENTITY, ATTR_PERCENTAGE: 100}, + blocking=True, + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.MAX) + + +async def test_fan_turn_on_with_preset( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test turning on with an explicit preset.""" + await setup_integration(hass, mock_config_entry) + + await hass.services.async_call( + FAN_DOMAIN, + SERVICE_TURN_ON, + {ATTR_ENTITY_ID: FAN_ENTITY, ATTR_PRESET_MODE: "free_cooling"}, + blocking=True, + ) + mock_helty_client.async_set_fan_mode.assert_awaited_with(FanMode.FREE_COOLING) diff --git a/tests/components/helty/test_init.py b/tests/components/helty/test_init.py new file mode 100644 index 0000000000000..29368209c89dc --- /dev/null +++ b/tests/components/helty/test_init.py @@ -0,0 +1,43 @@ +"""Test the Helty Flow setup.""" + +from unittest.mock import AsyncMock + +from pyhelty import HeltyConnectionError, HeltyResponseError +import pytest + +from homeassistant.config_entries import ConfigEntryState +from homeassistant.core import HomeAssistant + +from . import setup_integration + +from tests.common import MockConfigEntry + + +async def test_setup_and_unload( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test a config entry sets up and tears down cleanly.""" + await setup_integration(hass, mock_config_entry) + assert mock_config_entry.state is ConfigEntryState.LOADED + + assert await hass.config_entries.async_unload(mock_config_entry.entry_id) + await hass.async_block_till_done() + assert mock_config_entry.state is ConfigEntryState.NOT_LOADED + + +@pytest.mark.parametrize("side_effect", [HeltyConnectionError, HeltyResponseError]) +async def test_setup_error( + hass: HomeAssistant, + mock_helty_client: AsyncMock, + mock_config_entry: MockConfigEntry, + side_effect: type[Exception], +) -> None: + """Test an error talking to the unit during setup leads to a retry.""" + mock_helty_client.async_get_data.side_effect = side_effect + + mock_config_entry.add_to_hass(hass) + assert not await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() + assert mock_config_entry.state is ConfigEntryState.SETUP_RETRY From 9c1cc5548241ccf41df5c88deb985f105e686dae Mon Sep 17 00:00:00 2001 From: Chris <1105672+firstof9@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:22:11 -0700 Subject: [PATCH 29/39] Add OpenEVSE diagnostics (#171762) --- .../components/openevse/diagnostics.py | 102 +++++++++++++++ .../openevse/snapshots/test_diagnostics.ambr | 73 +++++++++++ tests/components/openevse/test_diagnostics.py | 122 ++++++++++++++++++ 3 files changed, 297 insertions(+) create mode 100644 homeassistant/components/openevse/diagnostics.py create mode 100644 tests/components/openevse/snapshots/test_diagnostics.ambr create mode 100644 tests/components/openevse/test_diagnostics.py diff --git a/homeassistant/components/openevse/diagnostics.py b/homeassistant/components/openevse/diagnostics.py new file mode 100644 index 0000000000000..f055735650c4a --- /dev/null +++ b/homeassistant/components/openevse/diagnostics.py @@ -0,0 +1,102 @@ +"""Provide diagnostics for OpenEVSE.""" + +import asyncio +from datetime import date, datetime +from enum import Enum +from typing import Any + +from homeassistant.components.diagnostics import async_redact_data +from homeassistant.const import CONF_PASSWORD, CONF_USERNAME +from homeassistant.core import HomeAssistant + +from .coordinator import OpenEVSEConfigEntry + +REDACT_CONFIG_DATA = {CONF_PASSWORD, CONF_USERNAME} +CHARGER_PROPERTIES = ( + "status", + "vehicle", + "mode", + "charge_mode", + "divertmode", + "manual_override", + "ota_update", + "service_level", + "charge_time_elapsed", + "vehicle_eta", + "charging_current", + "charging_voltage", + "charging_power", + "current_power", + "current_capacity", + "max_current", + "min_amps", + "max_amps", + "max_current_soft", + "available_current", + "smoothed_available_current", + "charge_rate", + "ambient_temperature", + "ir_temperature", + "rtc_temperature", + "esp_temperature", + "usage_session", + "usage_total", + "total_day", + "total_week", + "total_month", + "total_year", + "vehicle_soc", + "vehicle_range", + "wifi_signal", + "shaper_live_power", + "shaper_available_current", + "shaper_max_power", + "gfi_trip_count", + "no_gnd_trip_count", + "stuck_relay_trip_count", + "uptime", + "freeram", + "wifi_firmware", + "openevse_firmware", +) + + +def _to_json_safe(val: Any) -> Any: + """Coerce value to be JSON-serializable.""" + if isinstance(val, (datetime, date)): + return val.isoformat() + if isinstance(val, Enum): + return val.value + return val + + +async def async_get_config_entry_diagnostics( + _hass: HomeAssistant, config_entry: OpenEVSEConfigEntry +) -> dict[str, Any]: + """Return diagnostics for a config entry.""" + coordinator = config_entry.runtime_data + charger = coordinator.charger + + charger_data: dict[str, Any] = {} + + for prop in CHARGER_PROPERTIES: + try: + val = getattr(charger, prop) + except AttributeError: + continue + except asyncio.CancelledError: + raise + except Exception as err: # noqa: BLE001 + charger_data[prop] = f"Error: {type(err).__name__}" + continue + + # Top-level callables on the charger object are omitted from diagnostics. + if callable(val): + continue + + charger_data[prop] = _to_json_safe(val) + + return { + "config_entry": async_redact_data(config_entry.as_dict(), REDACT_CONFIG_DATA), + "charger": charger_data, + } diff --git a/tests/components/openevse/snapshots/test_diagnostics.ambr b/tests/components/openevse/snapshots/test_diagnostics.ambr new file mode 100644 index 0000000000000..77b6627a85610 --- /dev/null +++ b/tests/components/openevse/snapshots/test_diagnostics.ambr @@ -0,0 +1,73 @@ +# serializer version: 1 +# name: test_entry_diagnostics + dict({ + 'charger': dict({ + 'ambient_temperature': 25.5, + 'available_current': 32.0, + 'charge_mode': 'fast', + 'charge_rate': 32.0, + 'charge_time_elapsed': 3600, + 'charging_current': 32000.0, + 'charging_power': 7680000.0, + 'charging_voltage': 240, + 'current_capacity': 32, + 'current_power': 7680, + 'divertmode': 'normal', + 'esp_temperature': 45.0, + 'freeram': 50000, + 'gfi_trip_count': 0, + 'ir_temperature': 30.2, + 'manual_override': False, + 'max_amps': 48, + 'max_current': 48, + 'max_current_soft': 20, + 'min_amps': 6, + 'mode': 'STA', + 'no_gnd_trip_count': 0, + 'ota_update': 'none', + 'rtc_temperature': 28.7, + 'service_level': '2', + 'shaper_available_current': 20.0, + 'shaper_live_power': 5000, + 'shaper_max_power': 11000, + 'smoothed_available_current': 32.0, + 'status': 'Charging', + 'stuck_relay_trip_count': 0, + 'total_day': 10, + 'total_month': 200, + 'total_week': 50, + 'total_year': 2000, + 'uptime': 86400, + 'usage_session': 15000, + 'usage_total': 500000, + 'vehicle': True, + 'vehicle_eta': None, + 'vehicle_range': 250, + 'vehicle_soc': 75, + 'wifi_signal': -65, + }), + 'config_entry': dict({ + 'data': dict({ + 'host': '192.168.1.100', + 'password': '**REDACTED**', + 'username': '**REDACTED**', + }), + 'disabled_by': None, + 'discovery_keys': dict({ + }), + 'domain': 'openevse', + 'entry_id': 'FAKE_AUTH', + 'minor_version': 1, + 'options': dict({ + }), + 'pref_disable_new_entities': False, + 'pref_disable_polling': False, + 'source': 'user', + 'subentries': list([ + ]), + 'title': 'openevse_mock_config', + 'unique_id': 'deadbeeffeed', + 'version': 1, + }), + }) +# --- diff --git a/tests/components/openevse/test_diagnostics.py b/tests/components/openevse/test_diagnostics.py new file mode 100644 index 0000000000000..6f1be8a34be8d --- /dev/null +++ b/tests/components/openevse/test_diagnostics.py @@ -0,0 +1,122 @@ +"""Test OpenEVSE diagnostics.""" + +import asyncio +from datetime import datetime +from enum import Enum +from unittest.mock import MagicMock, PropertyMock, patch + +import pytest +from syrupy.assertion import SnapshotAssertion +from syrupy.filters import props + +from homeassistant.components.openevse.const import DOMAIN +from homeassistant.components.openevse.diagnostics import ( + async_get_config_entry_diagnostics, +) +from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME +from homeassistant.core import HomeAssistant + +from tests.common import MockConfigEntry +from tests.components.diagnostics import get_diagnostics_for_config_entry +from tests.typing import ClientSessionGenerator + + +async def test_entry_diagnostics( + hass: HomeAssistant, + hass_client: ClientSessionGenerator, + mock_charger: MagicMock, + snapshot: SnapshotAssertion, +) -> None: + """Test OpenEVSE diagnostics and redacted data.""" + entry = MockConfigEntry( + title="openevse_mock_config", + domain=DOMAIN, + data={ + CONF_HOST: "192.168.1.100", + CONF_USERNAME: "my_username", + CONF_PASSWORD: "my_password", + }, + entry_id="FAKE_AUTH", + unique_id="deadbeeffeed", + ) + entry.add_to_hass(hass) + assert await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + diagnostics = await get_diagnostics_for_config_entry(hass, hass_client, entry) + + assert diagnostics == snapshot(exclude=props("created_at", "modified_at")) + + +async def test_entry_diagnostics_exceptions( + hass: HomeAssistant, + hass_client: ClientSessionGenerator, + mock_config_entry: MockConfigEntry, + mock_charger: MagicMock, +) -> None: + """Test OpenEVSE diagnostics handles exceptions and JSON coercion correctly.""" + + class MockEnum(Enum): + TEST = "test_value" + + mock_config_entry.add_to_hass(hass) + assert await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() + + # Configure the mock_charger after setup to isolate side effects + mock_charger.vehicle_eta = datetime(2000, 1, 1, 12, 0, 0) + mock_charger.mode = MockEnum.TEST + mock_charger.wifi_firmware = lambda: "callable_value" + + # Delete status to simulate attribute not present and trigger AttributeError + delattr(mock_charger, "status") + + # Patch charging_voltage to raise ValueError + with patch.object( + type(mock_charger), + "charging_voltage", + PropertyMock(side_effect=ValueError("Connection error")), + create=True, + ): + diagnostics = await get_diagnostics_for_config_entry( + hass, hass_client, mock_config_entry + ) + + # status should be omitted because the attribute is not present + assert "status" not in diagnostics["charger"] + + # charging_voltage should show the recorded error type only + assert diagnostics["charger"]["charging_voltage"] == "Error: ValueError" + + # vehicle_eta should be coerced to ISO format string + assert diagnostics["charger"]["vehicle_eta"] == "2000-01-01T12:00:00" + + # mode should be coerced to Enum raw value + assert diagnostics["charger"]["mode"] == "test_value" + + # wifi_firmware should be omitted because it is callable + assert "wifi_firmware" not in diagnostics["charger"] + + +async def test_entry_diagnostics_cancelled_error( + hass: HomeAssistant, + hass_client: ClientSessionGenerator, + mock_config_entry: MockConfigEntry, + mock_charger: MagicMock, +) -> None: + """Test OpenEVSE diagnostics handles asyncio.CancelledError correctly.""" + mock_config_entry.add_to_hass(hass) + assert await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() + + # Raise CancelledError on status access using patch.object + with ( + patch.object( + type(mock_charger), + "status", + PropertyMock(side_effect=asyncio.CancelledError()), + create=True, + ), + pytest.raises(asyncio.CancelledError), + ): + await async_get_config_entry_diagnostics(hass, mock_config_entry) From 25ce81732b92665ff4e13b2d3b62e60e492fcc6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 22:23:04 +0200 Subject: [PATCH 30/39] Bump github/gh-aw-actions from 0.75.0 to 0.76.0 (#172777) Signed-off-by: dependabot[bot] --- .github/workflows/check-requirements.lock.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-requirements.lock.yml b/.github/workflows/check-requirements.lock.yml index 1632827f957b8..3794e91a2c0dc 100644 --- a/.github/workflows/check-requirements.lock.yml +++ b/.github/workflows/check-requirements.lock.yml @@ -36,7 +36,7 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 +# - github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 # # Container images used: # - ghcr.io/github/gh-aw-firewall/agent:0.25.46 @@ -90,7 +90,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -352,7 +352,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -961,7 +961,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1100,7 +1100,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1325,7 +1325,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1383,7 +1383,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@f889c9c3c06adeaabccefc06e29c42733ee05dff # v0.75.0 + uses: github/gh-aw-actions/setup@029b1de3e913e0604df1ada9da1cec03e282c4db # v0.76.0 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} From fb28825f1fbdd27b76e7457b9c7005a6017b3a15 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Mon, 1 Jun 2026 22:23:28 +0200 Subject: [PATCH 31/39] Add tests for Overkiz siren platform (#171900) --- .../overkiz/snapshots/test_siren.ambr | 52 ++++++ tests/components/overkiz/test_siren.py | 158 ++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 tests/components/overkiz/snapshots/test_siren.ambr create mode 100644 tests/components/overkiz/test_siren.py diff --git a/tests/components/overkiz/snapshots/test_siren.ambr b/tests/components/overkiz/snapshots/test_siren.ambr new file mode 100644 index 0000000000000..b130b6986d2b8 --- /dev/null +++ b/tests/components/overkiz/snapshots/test_siren.ambr @@ -0,0 +1,52 @@ +# serializer version: 1 +# name: test_siren_entities_snapshot[local_somfy_tahoma_v2_europe.json][siren.siren-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'siren', + 'entity_category': None, + 'entity_id': 'siren.siren', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': None, + 'unique_id': 'io://1234-5678-3293/2733989', + 'unit_of_measurement': None, + }) +# --- +# name: test_siren_entities_snapshot[local_somfy_tahoma_v2_europe.json][siren.siren-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Siren', + 'supported_features': , + }), + 'context': , + 'entity_id': 'siren.siren', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- diff --git a/tests/components/overkiz/test_siren.py b/tests/components/overkiz/test_siren.py new file mode 100644 index 0000000000000..1c18b3758b98e --- /dev/null +++ b/tests/components/overkiz/test_siren.py @@ -0,0 +1,158 @@ +"""Tests for the Overkiz siren platform.""" + +from collections.abc import Generator +from pathlib import Path +from unittest.mock import patch + +from freezegun.api import FrozenDateTimeFactory +from pyoverkiz.enums import EventName +import pytest +from syrupy.assertion import SnapshotAssertion + +from homeassistant.components.siren import ATTR_DURATION, DOMAIN as SIREN_DOMAIN +from homeassistant.const import ( + ATTR_ENTITY_ID, + SERVICE_TURN_OFF, + SERVICE_TURN_ON, + STATE_UNAVAILABLE, + Platform, +) +from homeassistant.core import HomeAssistant +from homeassistant.helpers import entity_registry as er + +from .conftest import FixtureDevice, MockOverkizClient, SetupOverkizIntegration +from .helpers import assert_command_call, async_deliver_events, build_event + +from tests.common import snapshot_platform + +SIREN = FixtureDevice( + "setup/local_somfy_tahoma_v2_europe.json", + "io://1234-5678-3293/2733989", + "siren.siren", +) + +SNAPSHOT_FIXTURES = [ + SIREN, +] + + +@pytest.fixture(autouse=True) +def fixture_platforms() -> Generator[None]: + """Limit platforms to siren only.""" + with patch("homeassistant.components.overkiz.PLATFORMS", [Platform.SIREN]): + yield + + +@pytest.mark.parametrize( + "device", + SNAPSHOT_FIXTURES, + ids=[Path(device.fixture).name for device in SNAPSHOT_FIXTURES], +) +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +async def test_siren_entities_snapshot( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + entity_registry: er.EntityRegistry, + snapshot: SnapshotAssertion, + device: FixtureDevice, +) -> None: + """Test representative real setups via snapshot.""" + config_entry = await setup_overkiz_integration(fixture=device.fixture) + + await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id) + + +async def test_siren_turn_on_default_duration( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, +) -> None: + """Test turning on the siren with default duration (2 minutes).""" + await setup_overkiz_integration(fixture=SIREN.fixture) + + await hass.services.async_call( + SIREN_DOMAIN, + SERVICE_TURN_ON, + {ATTR_ENTITY_ID: SIREN.entity_id}, + blocking=True, + ) + + assert_command_call( + mock_client, + device_url=SIREN.device_url, + command_name="ringWithSingleSimpleSequence", + parameters=[120000, 75, 2, "memorizedVolume"], + ) + + +async def test_siren_turn_on_custom_duration( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, +) -> None: + """Test turning on the siren with a custom duration.""" + await setup_overkiz_integration(fixture=SIREN.fixture) + + await hass.services.async_call( + SIREN_DOMAIN, + SERVICE_TURN_ON, + {ATTR_ENTITY_ID: SIREN.entity_id, ATTR_DURATION: 30}, + blocking=True, + ) + + assert_command_call( + mock_client, + device_url=SIREN.device_url, + command_name="ringWithSingleSimpleSequence", + parameters=[30000, 75, 2, "memorizedVolume"], + ) + + +async def test_siren_turn_off( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, +) -> None: + """Test turning off the siren.""" + await setup_overkiz_integration(fixture=SIREN.fixture) + + await hass.services.async_call( + SIREN_DOMAIN, + SERVICE_TURN_OFF, + {ATTR_ENTITY_ID: SIREN.entity_id}, + blocking=True, + ) + + assert_command_call( + mock_client, + device_url=SIREN.device_url, + command_name="off", + ) + + +async def test_siren_unavailability( + hass: HomeAssistant, + setup_overkiz_integration: SetupOverkizIntegration, + mock_client: MockOverkizClient, + freezer: FrozenDateTimeFactory, +) -> None: + """Test siren becomes unavailable when device goes offline.""" + await setup_overkiz_integration(fixture=SIREN.fixture) + + state = hass.states.get(SIREN.entity_id) + assert state + assert state.state != STATE_UNAVAILABLE + + await async_deliver_events( + hass, + freezer, + mock_client, + [ + build_event( + EventName.DEVICE_UNAVAILABLE.value, + device_url=SIREN.device_url, + ) + ], + ) + + assert hass.states.get(SIREN.entity_id).state == STATE_UNAVAILABLE From 02720605ae2d3d7541645a45aef8ea01b56d2e00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 22:23:33 +0200 Subject: [PATCH 32/39] Bump dessant/lock-threads from 6.0.1 to 6.0.2 (#172776) Signed-off-by: dependabot[bot] --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index a68154ff5b819..57e7eeebb64f8 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -20,7 +20,7 @@ jobs: issues: write # To lock issues pull-requests: write # To lock pull requests steps: - - uses: dessant/lock-threads@851cffe46851ddd2051ea7147ebdc995113241c3 # v6.0.1 + - uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2 with: github-token: ${{ github.token }} issue-inactive-days: "30" From 8ca4471418f6a2c05773470394465dae677ccdbc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 1 Jun 2026 22:45:58 +0200 Subject: [PATCH 33/39] Cancel iCloud polling timer on config entry unload (#172793) --- homeassistant/components/icloud/__init__.py | 1 + homeassistant/components/icloud/account.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/icloud/__init__.py b/homeassistant/components/icloud/__init__.py index 45a51c246a3a5..696f0aa20a3e5 100644 --- a/homeassistant/components/icloud/__init__.py +++ b/homeassistant/components/icloud/__init__.py @@ -59,6 +59,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: IcloudConfigEntry) -> bo await hass.async_add_executor_job(account.setup) entry.runtime_data = account + entry.async_on_unload(account.cancel_fetch) await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) diff --git a/homeassistant/components/icloud/account.py b/homeassistant/components/icloud/account.py index 630bc3d94ac34..25d9a7e52ab67 100644 --- a/homeassistant/components/icloud/account.py +++ b/homeassistant/components/icloud/account.py @@ -92,6 +92,7 @@ def __init__( self._retried_fetch = False self._config_entry = config_entry + self._unsub_fetch: CALLBACK_TYPE | None = None self.listeners: list[CALLBACK_TYPE] = [] def setup(self) -> None: @@ -293,9 +294,16 @@ def _determine_interval(self) -> int: self._max_interval, ) + def cancel_fetch(self) -> None: + """Cancel the scheduled fetch timer.""" + if self._unsub_fetch is not None: + self._unsub_fetch() + self._unsub_fetch = None + def _schedule_next_fetch(self) -> None: + self.cancel_fetch() if not self._config_entry.pref_disable_polling: - track_point_in_utc_time( + self._unsub_fetch = track_point_in_utc_time( self.hass, self.keep_alive, utcnow() + timedelta(minutes=self._fetch_interval), From 2d8cebf99d4d7c4d3a454c05cbd137cb1ab7d355 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 1 Jun 2026 22:52:30 +0200 Subject: [PATCH 34/39] Bump frontend to 20260527.2 (#172759) Co-authored-by: Franck Nijhof --- homeassistant/components/frontend/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- pylint/plugins/pylint_home_assistant/generated/mdi_icons.py | 2 +- requirements_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/frontend/manifest.json b/homeassistant/components/frontend/manifest.json index 222a33816f833..dd098b7d63c5f 100644 --- a/homeassistant/components/frontend/manifest.json +++ b/homeassistant/components/frontend/manifest.json @@ -21,5 +21,5 @@ "integration_type": "system", "preview_features": { "winter_mode": {} }, "quality_scale": "internal", - "requirements": ["home-assistant-frontend==20260527.1"] + "requirements": ["home-assistant-frontend==20260527.2"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index f39a1f900b877..13aa25986bc79 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -39,7 +39,7 @@ habluetooth==6.8.1 hass-nabucasa==2.2.0 hassil==3.5.0 home-assistant-bluetooth==2.0.0 -home-assistant-frontend==20260527.1 +home-assistant-frontend==20260527.2 home-assistant-intents==2026.5.5 httpx==0.28.1 ifaddr==0.2.0 diff --git a/pylint/plugins/pylint_home_assistant/generated/mdi_icons.py b/pylint/plugins/pylint_home_assistant/generated/mdi_icons.py index 090bb31ed4154..222de95d497ce 100644 --- a/pylint/plugins/pylint_home_assistant/generated/mdi_icons.py +++ b/pylint/plugins/pylint_home_assistant/generated/mdi_icons.py @@ -5,7 +5,7 @@ from typing import Final -FRONTEND_VERSION: Final[str] = "20260527.1" +FRONTEND_VERSION: Final[str] = "20260527.2" MDI_ICONS: Final[set[str]] = { "ab-testing", diff --git a/requirements_all.txt b/requirements_all.txt index 85086bd1db53b..17097a345cc7e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1266,7 +1266,7 @@ hole==0.9.0 holidays==0.97 # homeassistant.components.frontend -home-assistant-frontend==20260527.1 +home-assistant-frontend==20260527.2 # homeassistant.components.conversation home-assistant-intents==2026.5.5 From 2f03b7c42768718389b09163bd123f2b4582764b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 15:53:15 -0500 Subject: [PATCH 35/39] Explain why an eQ-3 Bluetooth device could not be found (#172770) --- .../components/eq3btsmart/__init__.py | 14 ++++++- .../components/eq3btsmart/strings.json | 5 +++ tests/components/eq3btsmart/test_init.py | 42 +++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 tests/components/eq3btsmart/test_init.py diff --git a/homeassistant/components/eq3btsmart/__init__.py b/homeassistant/components/eq3btsmart/__init__.py index 957d17a55d4a9..9472ea7008a25 100644 --- a/homeassistant/components/eq3btsmart/__init__.py +++ b/homeassistant/components/eq3btsmart/__init__.py @@ -8,13 +8,14 @@ from eq3btsmart.exceptions import Eq3Exception from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.dispatcher import async_dispatcher_send -from .const import SIGNAL_THERMOSTAT_CONNECTED, SIGNAL_THERMOSTAT_DISCONNECTED +from .const import DOMAIN, SIGNAL_THERMOSTAT_CONNECTED, SIGNAL_THERMOSTAT_DISCONNECTED from .models import Eq3Config, Eq3ConfigEntryData PLATFORMS = [ @@ -49,7 +50,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: Eq3ConfigEntry) -> bool: if device is None: raise ConfigEntryNotReady( - f"[{eq3_config.mac_address}] Device could not be found" + translation_domain=DOMAIN, + translation_key="device_not_found", + translation_placeholders={ + "mac_address": eq3_config.mac_address, + "reason": bluetooth.async_address_reachability_diagnostics( + hass, + mac_address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) thermostat = Thermostat(device) diff --git a/homeassistant/components/eq3btsmart/strings.json b/homeassistant/components/eq3btsmart/strings.json index c98a47b2d5c14..d7ed397dcd593 100644 --- a/homeassistant/components/eq3btsmart/strings.json +++ b/homeassistant/components/eq3btsmart/strings.json @@ -61,5 +61,10 @@ "name": "Lock" } } + }, + "exceptions": { + "device_not_found": { + "message": "[{mac_address}] Device could not be found: {reason}" + } } } diff --git a/tests/components/eq3btsmart/test_init.py b/tests/components/eq3btsmart/test_init.py new file mode 100644 index 0000000000000..e8cb060959d29 --- /dev/null +++ b/tests/components/eq3btsmart/test_init.py @@ -0,0 +1,42 @@ +"""Test the eq3btsmart integration init.""" + +from unittest.mock import patch + +import pytest + +from homeassistant.components.eq3btsmart.const import DOMAIN +from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_MAC +from homeassistant.core import HomeAssistant +from homeassistant.helpers.device_registry import format_mac + +from .const import MAC + +from tests.common import MockConfigEntry + + +async def test_setup_retries_when_device_not_found( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when the device is missing.""" + entry = MockConfigEntry( + domain=DOMAIN, + data={CONF_MAC: MAC}, + unique_id=format_mac(MAC), + ) + entry.add_to_hass(hass) + + with patch( + "homeassistant.components.eq3btsmart.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + f"[{format_mac(MAC)}] Device could not be found: mock reachability reason" + in caplog.text + ) From 3664eb49425ea0a9f4c628413ad861935b6ce877 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 15:54:11 -0500 Subject: [PATCH 36/39] Explain why a Snooz device could not be found (#172780) --- homeassistant/components/snooz/__init__.py | 19 +++++++-- homeassistant/components/snooz/strings.json | 5 +++ tests/components/snooz/test_init.py | 43 ++++++++++++++++++++- 3 files changed, 63 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/snooz/__init__.py b/homeassistant/components/snooz/__init__.py index 1291825efaa30..d485723844f79 100644 --- a/homeassistant/components/snooz/__init__.py +++ b/homeassistant/components/snooz/__init__.py @@ -4,12 +4,16 @@ from pysnooz.device import SnoozDevice -from homeassistant.components.bluetooth import async_ble_device_from_address +from homeassistant.components.bluetooth import ( + BluetoothReachabilityIntent, + async_address_reachability_diagnostics, + async_ble_device_from_address, +) from homeassistant.const import CONF_ADDRESS, CONF_TOKEN from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady -from .const import PLATFORMS +from .const import DOMAIN, PLATFORMS from .models import SnoozConfigEntry, SnoozConfigurationData @@ -23,7 +27,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: SnoozConfigEntry) -> boo if not (ble_device := async_ble_device_from_address(hass, address)): raise ConfigEntryNotReady( - f"Could not find Snooz with address {address}. Try power cycling the device" + translation_domain=DOMAIN, + translation_key="device_not_found", + translation_placeholders={ + "address": address, + "reason": async_address_reachability_diagnostics( + hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) device = SnoozDevice(ble_device, token) diff --git a/homeassistant/components/snooz/strings.json b/homeassistant/components/snooz/strings.json index cd9568564411b..70621c6eba048 100644 --- a/homeassistant/components/snooz/strings.json +++ b/homeassistant/components/snooz/strings.json @@ -24,6 +24,11 @@ } } }, + "exceptions": { + "device_not_found": { + "message": "Could not find Snooz with address {address}: {reason}" + } + }, "services": { "transition_off": { "description": "Transitions the volume level to the lowest setting over a specified duration, then powers off the device.", diff --git a/tests/components/snooz/test_init.py b/tests/components/snooz/test_init.py index 247a1f55d0550..197c39929dc9a 100644 --- a/tests/components/snooz/test_init.py +++ b/tests/components/snooz/test_init.py @@ -1,8 +1,49 @@ """Test Snooz configuration.""" +from unittest.mock import patch + +import pytest + +from homeassistant.components.snooz.const import DOMAIN +from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_ADDRESS, CONF_TOKEN from homeassistant.core import HomeAssistant -from . import SnoozFixture +from . import TEST_ADDRESS, TEST_PAIRING_TOKEN, SnoozFixture + +from tests.common import MockConfigEntry + + +async def test_setup_retries_when_device_not_found( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when the device is missing.""" + entry = MockConfigEntry( + domain=DOMAIN, + unique_id=TEST_ADDRESS, + data={CONF_ADDRESS: TEST_ADDRESS, CONF_TOKEN: TEST_PAIRING_TOKEN}, + ) + entry.add_to_hass(hass) + + with ( + patch( + "homeassistant.components.snooz.async_ble_device_from_address", + return_value=None, + ), + patch( + "homeassistant.components.snooz.async_address_reachability_diagnostics", + return_value="mock reachability reason", + ), + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + f"Could not find Snooz with address {TEST_ADDRESS}: mock reachability reason" + in caplog.text + ) async def test_removing_entry_cleans_up_connections( From 31fcbe7bce8bb89660f911a5e0ff7de1572a6b30 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 15:54:46 -0500 Subject: [PATCH 37/39] Explain why an LD2410 BLE device could not be found (#172779) --- .../components/ld2410_ble/__init__.py | 13 ++++- .../components/ld2410_ble/strings.json | 5 ++ tests/components/ld2410_ble/test_init.py | 47 +++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 tests/components/ld2410_ble/test_init.py diff --git a/homeassistant/components/ld2410_ble/__init__.py b/homeassistant/components/ld2410_ble/__init__.py index 1a9f3cc57e6b3..0bc5374c7ece2 100644 --- a/homeassistant/components/ld2410_ble/__init__.py +++ b/homeassistant/components/ld2410_ble/__init__.py @@ -10,11 +10,13 @@ from ld2410_ble import LD2410BLE from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.components.bluetooth.match import ADDRESS, BluetoothCallbackMatcher from homeassistant.const import CONF_ADDRESS, EVENT_HOMEASSISTANT_STOP, Platform from homeassistant.core import Event, HomeAssistant, callback from homeassistant.exceptions import ConfigEntryNotReady +from .const import DOMAIN from .coordinator import LD2410BLECoordinator from .models import LD2410BLEConfigEntry, LD2410BLEData @@ -34,7 +36,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: LD2410BLEConfigEntry) -> ) or await get_device(address) if not ble_device: raise ConfigEntryNotReady( - f"Could not find LD2410B device with address {address}" + translation_domain=DOMAIN, + translation_key="device_not_found", + translation_placeholders={ + "address": address, + "reason": bluetooth.async_address_reachability_diagnostics( + hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) ld2410_ble = LD2410BLE(ble_device) diff --git a/homeassistant/components/ld2410_ble/strings.json b/homeassistant/components/ld2410_ble/strings.json index 769cbb6a652cb..ad6b07b7581c7 100644 --- a/homeassistant/components/ld2410_ble/strings.json +++ b/homeassistant/components/ld2410_ble/strings.json @@ -97,5 +97,10 @@ "name": "Static target energy" } } + }, + "exceptions": { + "device_not_found": { + "message": "Could not find LD2410B device with address {address}: {reason}" + } } } diff --git a/tests/components/ld2410_ble/test_init.py b/tests/components/ld2410_ble/test_init.py new file mode 100644 index 0000000000000..606409d530f1f --- /dev/null +++ b/tests/components/ld2410_ble/test_init.py @@ -0,0 +1,47 @@ +"""Test the LD2410 BLE integration init.""" + +from unittest.mock import patch + +import pytest + +from homeassistant.components.ld2410_ble.const import DOMAIN +from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_ADDRESS +from homeassistant.core import HomeAssistant + +from . import LD2410_BLE_DISCOVERY_INFO + +from tests.common import MockConfigEntry + + +async def test_setup_retries_when_device_not_found( + hass: HomeAssistant, + caplog: pytest.LogCaptureFixture, +) -> None: + """Test setup is retried with a diagnostic reason when the device is missing.""" + entry = MockConfigEntry( + domain=DOMAIN, + unique_id=LD2410_BLE_DISCOVERY_INFO.address, + data={CONF_ADDRESS: LD2410_BLE_DISCOVERY_INFO.address}, + ) + entry.add_to_hass(hass) + + with ( + patch( + "homeassistant.components.ld2410_ble.get_device", + return_value=None, + ), + patch( + "homeassistant.components.ld2410_ble.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ), + ): + await hass.config_entries.async_setup(entry.entry_id) + await hass.async_block_till_done() + + assert entry.state is ConfigEntryState.SETUP_RETRY + assert ( + "Could not find LD2410B device with address " + f"{LD2410_BLE_DISCOVERY_INFO.address}: mock reachability reason" in caplog.text + ) From f5819d400ea3a9cf3f598ff54ac62946570f87fc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 1 Jun 2026 15:57:19 -0500 Subject: [PATCH 38/39] Explain why a Husqvarna Automower BLE device could not be connected to (#172774) --- .../husqvarna_automower_ble/__init__.py | 13 +++++++++++- .../husqvarna_automower_ble/strings.json | 3 +++ .../husqvarna_automower_ble/test_init.py | 20 +++++++++++++++---- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/husqvarna_automower_ble/__init__.py b/homeassistant/components/husqvarna_automower_ble/__init__.py index 4eb853ff931cd..ff048b5194622 100644 --- a/homeassistant/components/husqvarna_automower_ble/__init__.py +++ b/homeassistant/components/husqvarna_automower_ble/__init__.py @@ -6,6 +6,7 @@ from bleak_retry_connector import close_stale_connections_by_address, get_device from homeassistant.components import bluetooth +from homeassistant.components.bluetooth import BluetoothReachabilityIntent from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_CLIENT_ID, CONF_PIN, Platform from homeassistant.core import HomeAssistant @@ -56,7 +57,17 @@ async def async_setup_entry(hass: HomeAssistant, entry: HusqvarnaConfigEntry) -> ) except (TimeoutError, BleakError) as exception: raise ConfigEntryNotReady( - f"Unable to connect to device {address} due to {exception}" + translation_domain=DOMAIN, + translation_key="connection_failed", + translation_placeholders={ + "address": address, + "error": str(exception) or type(exception).__name__, + "reason": bluetooth.async_address_reachability_diagnostics( + hass, + address.upper(), + BluetoothReachabilityIntent.CONNECTION, + ), + }, ) from exception LOGGER.debug("connected and paired") diff --git a/homeassistant/components/husqvarna_automower_ble/strings.json b/homeassistant/components/husqvarna_automower_ble/strings.json index ef366540db92c..edf93d1becea7 100644 --- a/homeassistant/components/husqvarna_automower_ble/strings.json +++ b/homeassistant/components/husqvarna_automower_ble/strings.json @@ -45,6 +45,9 @@ } }, "exceptions": { + "connection_failed": { + "message": "Unable to connect to device {address} due to {error}: {reason}" + }, "pin_required": { "message": "PIN is required for {domain_name}" } diff --git a/tests/components/husqvarna_automower_ble/test_init.py b/tests/components/husqvarna_automower_ble/test_init.py index f10ae1fa7430a..83c7e6d3162f8 100644 --- a/tests/components/husqvarna_automower_ble/test_init.py +++ b/tests/components/husqvarna_automower_ble/test_init.py @@ -1,6 +1,6 @@ """Test the Husqvarna Automower Bluetooth setup.""" -from unittest.mock import Mock +from unittest.mock import Mock, patch from automower_ble.protocol import ResponseResult import pytest @@ -75,16 +75,28 @@ async def test_setup_failed_connect( hass: HomeAssistant, mock_automower_client: Mock, mock_config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: - """Test setup creates expected devices.""" + """Test setup retries with a diagnostic reason when the device cannot connect.""" mock_automower_client.connect.side_effect = TimeoutError mock_config_entry.add_to_hass(hass) - await hass.config_entries.async_setup(mock_config_entry.entry_id) - await hass.async_block_till_done() + with patch( + "homeassistant.components.husqvarna_automower_ble.bluetooth." + "async_address_reachability_diagnostics", + return_value="mock reachability reason", + ): + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() assert mock_config_entry.state is ConfigEntryState.SETUP_RETRY + # A bare TimeoutError has an empty str(), so the error falls back to the + # exception class name; both the error and the reachability reason appear. + assert ( + f"Unable to connect to device {mock_config_entry.data[CONF_ADDRESS]} " + "due to TimeoutError: mock reachability reason" in caplog.text + ) async def test_setup_unknown_error( From 71eefdc7165a54b5b938cc9f25d97a47b16d6c2a Mon Sep 17 00:00:00 2001 From: johanzander Date: Mon, 1 Jun 2026 23:12:43 +0200 Subject: [PATCH 39/39] Migrate async_migrate_entry test calls to async_setup in growatt_server (#172587) Co-authored-by: Claude Opus 4.6 --- tests/components/growatt_server/test_init.py | 71 +++++++++----------- 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/tests/components/growatt_server/test_init.py b/tests/components/growatt_server/test_init.py index 6e101c46cbd45..d81d74d1f5ebd 100644 --- a/tests/components/growatt_server/test_init.py +++ b/tests/components/growatt_server/test_init.py @@ -9,7 +9,6 @@ import requests from syrupy.assertion import SnapshotAssertion -from homeassistant.components.growatt_server import async_migrate_entry from homeassistant.components.growatt_server.const import ( AUTH_API_TOKEN, AUTH_PASSWORD, @@ -332,6 +331,7 @@ async def test_classic_api_setup( ), ], ) +@pytest.mark.usefixtures("mock_growatt_v1_api", "mock_growatt_classic_api") async def test_migrate_config_without_auth_type( hass: HomeAssistant, config_data: dict[str, str], @@ -353,11 +353,8 @@ async def test_migrate_config_without_auth_type( ) mock_config_entry.add_to_hass(hass) - - # Execute migration - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - migration_result = await async_migrate_entry(hass, mock_config_entry) - assert migration_result is True + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() # Verify version was updated to 1.1 assert mock_config_entry.version == 1 @@ -366,6 +363,9 @@ async def test_migrate_config_without_auth_type( # Verify auth_type field was added during migration assert mock_config_entry.data[CONF_AUTH_TYPE] == expected_auth_type + # Verify setup completed successfully after migration + assert mock_config_entry.state is ConfigEntryState.LOADED + async def test_migrate_legacy_config_no_auth_fields( hass: HomeAssistant, @@ -385,17 +385,13 @@ async def test_migrate_legacy_config_no_auth_fields( ) mock_config_entry.add_to_hass(hass) + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() - # Migration should succeed (only updates version) - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - migration_result = await async_migrate_entry(hass, mock_config_entry) - assert migration_result is True - - # Verify version was updated + # Migration succeeds (version bumped) but setup fails due to missing auth fields assert mock_config_entry.version == 1 assert mock_config_entry.minor_version == 1 - - # Note: Setup will fail later due to missing auth fields in async_setup_entry + assert mock_config_entry.state is ConfigEntryState.SETUP_ERROR @pytest.mark.parametrize( @@ -613,7 +609,6 @@ async def test_migrate_version_bump( This test verifies that: - Migration successfully resolves DEFAULT_PLANT_ID ("0") to actual plant_id - Config entry version is bumped from 1.0 to 1.1 - - API instance is cached for setup to reuse (rate limit optimization) """ # Create a version 1.0 config entry with DEFAULT_PLANT_ID mock_config_entry = MockConfigEntry( @@ -631,7 +626,7 @@ async def test_migrate_version_bump( minor_version=0, ) - # Mock successful API responses for migration + # Mock successful API responses for migration and setup mock_growatt_classic_api.login.return_value = { "success": True, "user": {"id": 123456}, @@ -639,13 +634,13 @@ async def test_migrate_version_bump( mock_growatt_classic_api.plant_list.return_value = { "data": [{"plantId": "RESOLVED_PLANT_789", "plantName": "My Plant"}] } + mock_growatt_classic_api.device_list.return_value = [ + {"deviceSn": "TLX123456", "deviceType": "tlx"} + ] mock_config_entry.add_to_hass(hass) - - # Execute migration - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - migration_result = await async_migrate_entry(hass, mock_config_entry) - assert migration_result is True + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() # Verify version was updated to 1.1 assert mock_config_entry.version == 1 @@ -654,8 +649,8 @@ async def test_migrate_version_bump( # Verify plant_id was resolved to actual plant_id (not DEFAULT_PLANT_ID) assert mock_config_entry.data[CONF_PLANT_ID] == "RESOLVED_PLANT_789" - # Verify API instance was cached for setup to reuse - assert f"{CACHED_API_KEY}{mock_config_entry.entry_id}" in hass.data[DOMAIN] + # Verify setup completed successfully after migration + assert mock_config_entry.state is ConfigEntryState.LOADED async def test_setup_reuses_cached_api_from_migration( @@ -718,17 +713,12 @@ async def test_setup_reuses_cached_api_from_migration( } mock_config_entry.add_to_hass(hass) - - # Run migration first (resolves plant_id and caches authenticated API) - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - await async_migrate_entry(hass, mock_config_entry) + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() # Verify migration successfully resolved plant_id assert mock_config_entry.data[CONF_PLANT_ID] == "RESOLVED_PLANT_789" - # Now setup the integration (should reuse cached API from migration) - await setup_integration(hass, mock_config_entry) - # Verify integration loaded successfully assert mock_config_entry.state is ConfigEntryState.LOADED @@ -783,13 +773,11 @@ async def test_migrate_failure_returns_false( ) mock_config_entry.add_to_hass(hass) + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() - # Execute migration (should fail gracefully) - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - migration_result = await async_migrate_entry(hass, mock_config_entry) - - # Verify migration returned False (will retry on next restart) - assert migration_result is False + # Verify migration failed (entry is in migration error state) + assert mock_config_entry.state is ConfigEntryState.MIGRATION_ERROR # Verify version was NOT bumped (remains 1.0) assert mock_config_entry.version == 1 @@ -803,6 +791,7 @@ async def test_migrate_failure_returns_false( assert "Migration will retry on next restart" in caplog.text +@pytest.mark.usefixtures("mock_growatt_classic_api") async def test_migrate_already_migrated( hass: HomeAssistant, ) -> None: @@ -823,11 +812,8 @@ async def test_migrate_already_migrated( ) mock_config_entry.add_to_hass(hass) - - # Call migration function - # pylint: disable-next=home-assistant-tests-direct-async-migrate-entry - migration_result = await async_migrate_entry(hass, mock_config_entry) - assert migration_result is True + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() # Verify version remains 1.1 (no change) assert mock_config_entry.version == 1 @@ -836,6 +822,9 @@ async def test_migrate_already_migrated( # Plant ID should remain unchanged assert mock_config_entry.data[CONF_PLANT_ID] == "specific_plant_123" + # Verify setup completed successfully + assert mock_config_entry.state is ConfigEntryState.LOADED + @pytest.mark.usefixtures("init_integration") async def test_dynamic_device_added(