diff --git a/homeassistant/components/assist_pipeline/__init__.py b/homeassistant/components/assist_pipeline/__init__.py index e9394a8ac5d57c..8addca9fbce9ab 100644 --- a/homeassistant/components/assist_pipeline/__init__.py +++ b/homeassistant/components/assist_pipeline/__init__.py @@ -41,6 +41,8 @@ async_setup_pipeline_store, async_update_pipeline, ) +from .select import AssistPipelineSelect, VadSensitivitySelect +from .vad import VadSensitivity from .websocket_api import async_register_websocket_api __all__ = ( @@ -51,11 +53,14 @@ "SAMPLE_CHANNELS", "SAMPLE_RATE", "SAMPLE_WIDTH", + "AssistPipelineSelect", "AudioSettings", "Pipeline", "PipelineEvent", "PipelineEventType", "PipelineNotFound", + "VadSensitivity", + "VadSensitivitySelect", "WakeWordSettings", "async_create_default_pipeline", "async_get_pipelines", diff --git a/homeassistant/components/cloud/manifest.json b/homeassistant/components/cloud/manifest.json index e9d24d453e565c..16904da3867f95 100644 --- a/homeassistant/components/cloud/manifest.json +++ b/homeassistant/components/cloud/manifest.json @@ -13,6 +13,6 @@ "integration_type": "system", "iot_class": "cloud_push", "loggers": ["acme", "hass_nabucasa", "snitun"], - "requirements": ["hass-nabucasa==1.3.0"], + "requirements": ["hass-nabucasa==1.4.0"], "single_config_entry": true } diff --git a/homeassistant/components/eheimdigital/sensor.py b/homeassistant/components/eheimdigital/sensor.py index 82038b408655a3..b1ef70998104c2 100644 --- a/homeassistant/components/eheimdigital/sensor.py +++ b/homeassistant/components/eheimdigital/sensor.py @@ -8,8 +8,11 @@ from eheimdigital.device import EheimDigitalDevice from eheimdigital.types import FilterErrorCode -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription -from homeassistant.components.sensor.const import SensorDeviceClass +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorEntityDescription, +) from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTime from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback diff --git a/homeassistant/components/energy/sensor.py b/homeassistant/components/energy/sensor.py index 9da5d0adfd5135..ccbc1dd5c7a8a9 100644 --- a/homeassistant/components/energy/sensor.py +++ b/homeassistant/components/energy/sensor.py @@ -16,7 +16,9 @@ SensorEntity, SensorStateClass, ) -from homeassistant.components.sensor.recorder import reset_detected +from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import + reset_detected, +) from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, UnitOfEnergy, UnitOfVolume from homeassistant.core import ( HomeAssistant, diff --git a/homeassistant/components/epson/manifest.json b/homeassistant/components/epson/manifest.json index 7b8f8d8a4a2b20..1d2ea0e849d008 100644 --- a/homeassistant/components/epson/manifest.json +++ b/homeassistant/components/epson/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/epson", "iot_class": "local_polling", "loggers": ["epson_projector"], - "requirements": ["epson-projector==0.5.1"] + "requirements": ["epson-projector==0.6.0"] } diff --git a/homeassistant/components/eq3btsmart/sensor.py b/homeassistant/components/eq3btsmart/sensor.py index 0f61ef22452050..d4c6e20891ed60 100644 --- a/homeassistant/components/eq3btsmart/sensor.py +++ b/homeassistant/components/eq3btsmart/sensor.py @@ -10,8 +10,8 @@ SensorDeviceClass, SensorEntity, SensorEntityDescription, + SensorStateClass, ) -from homeassistant.components.sensor.const import SensorStateClass from homeassistant.const import PERCENTAGE from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback diff --git a/homeassistant/components/esphome/select.py b/homeassistant/components/esphome/select.py index 65494e06a3630b..db16ad4010528a 100644 --- a/homeassistant/components/esphome/select.py +++ b/homeassistant/components/esphome/select.py @@ -6,7 +6,7 @@ from aioesphomeapi import EntityInfo, SelectInfo, SelectState -from homeassistant.components.assist_pipeline.select import ( +from homeassistant.components.assist_pipeline import ( AssistPipelineSelect, VadSensitivitySelect, ) diff --git a/homeassistant/components/firefly_iii/sensor.py b/homeassistant/components/firefly_iii/sensor.py index 7e6a8ec863c29c..b667c7585dfbd9 100644 --- a/homeassistant/components/firefly_iii/sensor.py +++ b/homeassistant/components/firefly_iii/sensor.py @@ -4,8 +4,12 @@ from pyfirefly.models import Account, Category -from homeassistant.components.sensor import SensorEntity, SensorStateClass, StateType -from homeassistant.components.sensor.const import SensorDeviceClass +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorStateClass, + StateType, +) from homeassistant.const import EntityCategory from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback diff --git a/homeassistant/components/iometer/config_flow.py b/homeassistant/components/iometer/config_flow.py index ee03d09abf7b6b..19e7a6e09adf7c 100644 --- a/homeassistant/components/iometer/config_flow.py +++ b/homeassistant/components/iometer/config_flow.py @@ -2,7 +2,12 @@ from typing import Any, Final -from iometer import IOmeterClient, IOmeterConnectionError +from iometer import ( + IOmeterClient, + IOmeterConnectionError, + IOmeterNoReadingsError, + IOmeterNoStatusError, +) import voluptuous as vol from homeassistant.config_entries import ConfigFlow, ConfigFlowResult @@ -34,6 +39,11 @@ async def async_step_zeroconf( client = IOmeterClient(host=host, session=session) try: status = await client.get_current_status() + _ = await client.get_current_reading() + except IOmeterNoStatusError: + return self.async_abort(reason="no_status") + except IOmeterNoReadingsError: + return self.async_abort(reason="no_readings") except IOmeterConnectionError: return self.async_abort(reason="cannot_connect") @@ -70,6 +80,11 @@ async def async_step_user( client = IOmeterClient(host=self._host, session=session) try: status = await client.get_current_status() + _ = await client.get_current_reading() + except IOmeterNoStatusError: + errors["base"] = "no_status" + except IOmeterNoReadingsError: + errors["base"] = "no_readings" except IOmeterConnectionError: errors["base"] = "cannot_connect" else: diff --git a/homeassistant/components/iometer/strings.json b/homeassistant/components/iometer/strings.json index 65a962cb42b7ef..305642d57c5f59 100644 --- a/homeassistant/components/iometer/strings.json +++ b/homeassistant/components/iometer/strings.json @@ -20,6 +20,8 @@ "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]" }, "error": { + "no_status": "No status received from the IOmeter. Check your device status in the IOmeter app", + "no_readings": "No readings received from the IOmeter. Please attach the IOmeter Core to the electricity meter and wait for the first reading.", "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "unknown": "[%key:common::config_flow::error::unknown%]" } diff --git a/homeassistant/components/mobile_app/device_tracker.py b/homeassistant/components/mobile_app/device_tracker.py index 2719a4a14c0700..3e2c6b9f1d038c 100644 --- a/homeassistant/components/mobile_app/device_tracker.py +++ b/homeassistant/components/mobile_app/device_tracker.py @@ -8,6 +8,10 @@ ATTR_LOCATION_NAME, TrackerEntity, ) +from homeassistant.components.zone import ( + ENTITY_ID_FORMAT as ZONE_ENTITY_ID_FORMAT, + HOME_ZONE, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_BATTERY_LEVEL, @@ -15,6 +19,7 @@ ATTR_GPS_ACCURACY, ATTR_LATITUDE, ATTR_LONGITUDE, + STATE_HOME, ) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.device_registry import DeviceInfo @@ -99,6 +104,12 @@ def longitude(self) -> float | None: def location_name(self) -> str | None: """Return a location name for the current location of the device.""" if location_name := self._data.get(ATTR_LOCATION_NAME): + if location_name == HOME_ZONE: + return STATE_HOME + if zone_state := self.hass.states.get( + ZONE_ENTITY_ID_FORMAT.format(location_name) + ): + return zone_state.name return location_name return None diff --git a/homeassistant/components/onewire/diagnostics.py b/homeassistant/components/onewire/diagnostics.py index 48426cf3b5bd90..b87d9a90897792 100644 --- a/homeassistant/components/onewire/diagnostics.py +++ b/homeassistant/components/onewire/diagnostics.py @@ -8,6 +8,7 @@ from homeassistant.components.diagnostics import async_redact_data from homeassistant.const import CONF_HOST from homeassistant.core import HomeAssistant +from homeassistant.helpers import device_registry as dr from .onewirehub import OneWireConfigEntry @@ -26,7 +27,28 @@ async def async_get_config_entry_diagnostics( "data": async_redact_data(entry.data, TO_REDACT), "options": {**entry.options}, }, - "devices": [asdict(device_details) for device_details in onewire_hub.devices] - if onewire_hub.devices - else [], + "devices": [asdict(device_details) for device_details in onewire_hub.devices], + } + + +async def async_get_device_diagnostics( + hass: HomeAssistant, entry: OneWireConfigEntry, device_entry: dr.DeviceEntry +) -> dict[str, Any]: + """Return diagnostics for a device.""" + + onewire_hub = entry.runtime_data + + return { + "entry": { + "title": entry.title, + "data": async_redact_data(entry.data, TO_REDACT), + "options": {**entry.options}, + }, + "device": asdict( + next( + device_details + for device_details in onewire_hub.devices + if device_details.id[3:] == device_entry.serial_number + ) + ), } diff --git a/homeassistant/components/onewire/manifest.json b/homeassistant/components/onewire/manifest.json index b7b6377e8b26f6..c4a5c41c0a6a9e 100644 --- a/homeassistant/components/onewire/manifest.json +++ b/homeassistant/components/onewire/manifest.json @@ -7,6 +7,7 @@ "integration_type": "hub", "iot_class": "local_polling", "loggers": ["aio_ownet"], + "quality_scale": "silver", "requirements": ["aio-ownet==0.0.4"], "zeroconf": ["_owserver._tcp.local."] } diff --git a/homeassistant/components/onewire/quality_scale.yaml b/homeassistant/components/onewire/quality_scale.yaml index 84ad52db45028e..485778a811046e 100644 --- a/homeassistant/components/onewire/quality_scale.yaml +++ b/homeassistant/components/onewire/quality_scale.yaml @@ -1,8 +1,6 @@ rules: ## Bronze - config-flow: - status: todo - comment: missing data_description on options flow + config-flow: done test-before-configure: done unique-config-entry: status: done @@ -16,27 +14,19 @@ rules: entity-event-setup: status: exempt comment: entities do not subscribe to events - dependency-transparency: - status: todo - comment: The package is not built and published inside a CI pipeline + dependency-transparency: done action-setup: status: exempt comment: No service actions currently available common-modules: status: done comment: base entity available, but no coordinator - docs-high-level-description: - status: todo - comment: Under review - docs-installation-instructions: - status: todo - comment: Under review - docs-removal-instructions: - status: todo - comment: Under review + docs-high-level-description: done + docs-installation-instructions: done + docs-removal-instructions: done docs-actions: - status: todo - comment: Under review + status: exempt + comment: No service actions currently available brands: done ## Silver @@ -52,12 +42,8 @@ rules: parallel-updates: done test-coverage: done integration-owner: done - docs-installation-parameters: - status: todo - comment: Under review - docs-configuration-parameters: - status: todo - comment: Under review + docs-installation-parameters: done + docs-configuration-parameters: done ## Gold entity-translations: done @@ -73,9 +59,7 @@ rules: comment: > Manual removal, as it is not possible to distinguish between a flaky device and a device that has been removed - diagnostics: - status: todo - comment: config-entry diagnostics level available, might be nice to have device-level diagnostics + diagnostics: done exception-translations: status: todo comment: Under review diff --git a/homeassistant/components/onewire/strings.json b/homeassistant/components/onewire/strings.json index c77f2933fe99d4..6a13dfb87ddc3c 100644 --- a/homeassistant/components/onewire/strings.json +++ b/homeassistant/components/onewire/strings.json @@ -139,8 +139,12 @@ "step": { "device_selection": { "data": { - "clear_device_options": "Clear all device configurations", - "device_selection": "[%key:component::onewire::options::error::device_not_selected%]" + "clear_device_options": "Reset all device customisations", + "device_selection": "Customise specific devices" + }, + "data_description": { + "clear_device_options": "Use this to reset all device specific options to default values.", + "device_selection": "Customise behaviour of individual devices." }, "description": "Select what configuration steps to process", "title": "1-Wire device options" @@ -149,6 +153,9 @@ "data": { "precision": "Sensor precision" }, + "data_description": { + "precision": "The lower the precision, the faster the sensor will respond, but with less accuracy." + }, "description": "Select sensor precision for {sensor_id}", "title": "1-Wire sensor precision" } diff --git a/homeassistant/components/onvif/camera.py b/homeassistant/components/onvif/camera.py index fc17e912fcc676..bd5b7db60691fa 100644 --- a/homeassistant/components/onvif/camera.py +++ b/homeassistant/components/onvif/camera.py @@ -70,7 +70,7 @@ async def async_setup_entry( vol.Optional(ATTR_TILT): vol.In([DIR_UP, DIR_DOWN]), vol.Optional(ATTR_ZOOM): vol.In([ZOOM_OUT, ZOOM_IN]), vol.Optional(ATTR_DISTANCE, default=0.1): cv.small_float, - vol.Optional(ATTR_SPEED, default=0.5): cv.small_float, + vol.Optional(ATTR_SPEED): cv.small_float, vol.Optional(ATTR_MOVE_MODE, default=RELATIVE_MOVE): vol.In( [ CONTINUOUS_MOVE, @@ -210,10 +210,10 @@ async def _async_get_stream_uri(self) -> str: async def async_perform_ptz( self, distance, - speed, move_mode, continuous_duration, preset, + speed=None, pan=None, tilt=None, zoom=None, diff --git a/homeassistant/components/onvif/device.py b/homeassistant/components/onvif/device.py index 9b4d0983682645..2e695a3241e05d 100644 --- a/homeassistant/components/onvif/device.py +++ b/homeassistant/components/onvif/device.py @@ -602,10 +602,11 @@ async def async_perform_ptz( return req.PresetToken = preset_val - req.Speed = { - "PanTilt": {"x": speed_val, "y": speed_val}, - "Zoom": {"x": speed_val}, - } + if speed_val is not None: + req.Speed = { + "PanTilt": {"x": speed_val, "y": speed_val}, + "Zoom": {"x": speed_val}, + } await ptz_service.GotoPreset(req) elif move_mode == STOP_MOVE: await ptz_service.Stop(req) diff --git a/homeassistant/components/onvif/services.yaml b/homeassistant/components/onvif/services.yaml index 9cf3a1fc4c17ae..70ab9fa361d662 100644 --- a/homeassistant/components/onvif/services.yaml +++ b/homeassistant/components/onvif/services.yaml @@ -30,7 +30,6 @@ ptz: max: 1 step: 0.01 speed: - default: 0.5 selector: number: min: 0 diff --git a/homeassistant/components/shelly/__init__.py b/homeassistant/components/shelly/__init__.py index fa920e786b0040..79ade77080604c 100644 --- a/homeassistant/components/shelly/__init__.py +++ b/homeassistant/components/shelly/__init__.py @@ -59,8 +59,8 @@ ) from .repairs import ( async_manage_ble_scanner_firmware_unsupported_issue, + async_manage_deprecated_firmware_issue, async_manage_outbound_websocket_incorrectly_enabled_issue, - async_manage_wall_display_firmware_unsupported_issue, ) from .utils import ( async_create_issue_unsupported_firmware, @@ -337,7 +337,7 @@ async def _async_setup_rpc_entry(hass: HomeAssistant, entry: ShellyConfigEntry) await hass.config_entries.async_forward_entry_setups( entry, runtime_data.platforms ) - async_manage_wall_display_firmware_unsupported_issue(hass, entry) + async_manage_deprecated_firmware_issue(hass, entry) async_manage_ble_scanner_firmware_unsupported_issue( hass, entry, diff --git a/homeassistant/components/shelly/const.py b/homeassistant/components/shelly/const.py index 9576f8da80928d..ff38a24a15b2e8 100644 --- a/homeassistant/components/shelly/const.py +++ b/homeassistant/components/shelly/const.py @@ -5,7 +5,7 @@ from enum import StrEnum from logging import Logger, getLogger import re -from typing import Final +from typing import Final, TypedDict from aioshelly.const import ( MODEL_BULB, @@ -232,7 +232,6 @@ class BLEScannerMode(StrEnum): BLE_SCANNER_MIN_FIRMWARE = "1.5.1" -WALL_DISPLAY_MIN_FIRMWARE = "2.3.0" MAX_PUSH_UPDATE_FAILURES = 5 PUSH_UPDATE_ISSUE_ID = "push_update_{unique}" @@ -245,9 +244,28 @@ class BLEScannerMode(StrEnum): OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID = ( "outbound_websocket_incorrectly_enabled_{unique}" ) -WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID = ( - "wall_display_firmware_unsupported_{unique}" -) +DEPRECATED_FIRMWARE_ISSUE_ID = "deprecated_firmware_{unique}" + + +class DeprecatedFirmwareInfo(TypedDict): + """TypedDict for Deprecated Firmware Info.""" + + min_firmware: str + ha_version: str + + +# Provide firmware deprecation data: +# key: device model +# value: dict with: +# min_firmware: minimum supported firmware version +# ha_version: Home Assistant version when older firmware will be deprecated +# Example: +# DEPRECATED_FIRMWARES: dict[str, DeprecatedFirmwareInfo] = { +# MODEL_WALL_DISPLAY: DeprecatedFirmwareInfo( +# {"min_firmware": "2.3.0", "ha_version": "2025.10.0"} +# ), +# } +DEPRECATED_FIRMWARES: dict[str, DeprecatedFirmwareInfo] = {} GAS_VALVE_OPEN_STATES = ("opening", "opened") diff --git a/homeassistant/components/shelly/repairs.py b/homeassistant/components/shelly/repairs.py index 74203759989453..dba440419defc5 100644 --- a/homeassistant/components/shelly/repairs.py +++ b/homeassistant/components/shelly/repairs.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING -from aioshelly.const import MODEL_OUT_PLUG_S_G3, MODEL_PLUG_S_G3, MODEL_WALL_DISPLAY +from aioshelly.const import MODEL_OUT_PLUG_S_G3, MODEL_PLUG_S_G3 from aioshelly.exceptions import DeviceConnectionError, RpcCallError from aioshelly.rpc_device import RpcDevice from awesomeversion import AwesomeVersion @@ -19,10 +19,10 @@ BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLE_SCANNER_MIN_FIRMWARE, CONF_BLE_SCANNER_MODE, + DEPRECATED_FIRMWARE_ISSUE_ID, + DEPRECATED_FIRMWARES, DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID, - WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID, - WALL_DISPLAY_MIN_FIRMWARE, BLEScannerMode, ) from .coordinator import ShellyConfigEntry @@ -70,21 +70,25 @@ def async_manage_ble_scanner_firmware_unsupported_issue( @callback -def async_manage_wall_display_firmware_unsupported_issue( +def async_manage_deprecated_firmware_issue( hass: HomeAssistant, entry: ShellyConfigEntry, ) -> None: - """Manage the Wall Display firmware unsupported issue.""" - issue_id = WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID.format(unique=entry.unique_id) + """Manage deprecated firmware issue.""" + issue_id = DEPRECATED_FIRMWARE_ISSUE_ID.format(unique=entry.unique_id) if TYPE_CHECKING: assert entry.runtime_data.rpc is not None device = entry.runtime_data.rpc.device + model = entry.data["model"] + + if model in DEPRECATED_FIRMWARES: + min_firmware = DEPRECATED_FIRMWARES[model]["min_firmware"] + ha_version = DEPRECATED_FIRMWARES[model]["ha_version"] - if entry.data["model"] == MODEL_WALL_DISPLAY: firmware = AwesomeVersion(device.shelly["ver"]) - if firmware < WALL_DISPLAY_MIN_FIRMWARE: + if firmware < min_firmware: ir.async_create_issue( hass, DOMAIN, @@ -92,11 +96,12 @@ def async_manage_wall_display_firmware_unsupported_issue( is_fixable=True, is_persistent=True, severity=ir.IssueSeverity.WARNING, - translation_key="wall_display_firmware_unsupported", + translation_key="deprecated_firmware", translation_placeholders={ "device_name": device.name, "ip_address": device.ip_address, "firmware": firmware, + "ha_version": ha_version, }, data={"entry_id": entry.entry_id}, ) @@ -241,7 +246,7 @@ async def async_create_fix_flow( if ( "ble_scanner_firmware_unsupported" in issue_id - or "wall_display_firmware_unsupported" in issue_id + or "deprecated_firmware" in issue_id ): return FirmwareUpdateFlow(device) diff --git a/homeassistant/components/shelly/strings.json b/homeassistant/components/shelly/strings.json index 443abc119e56ed..90e41a1b63af5d 100644 --- a/homeassistant/components/shelly/strings.json +++ b/homeassistant/components/shelly/strings.json @@ -312,13 +312,13 @@ } } }, - "wall_display_firmware_unsupported": { + "deprecated_firmware": { "title": "{device_name} is running outdated firmware", "fix_flow": { "step": { "confirm": { "title": "{device_name} is running outdated firmware", - "description": "Your Shelly device {device_name} with IP address {ip_address} is running firmware {firmware}. This firmware version will not be supported by Shelly integration starting from Home Assistant 2025.11.0.\n\nSelect **Submit** button to start the OTA update to the latest stable firmware version." + "description": "Your Shelly device {device_name} with IP address {ip_address} is running firmware {firmware}. This firmware version will not be supported by Shelly integration starting from Home Assistant {ha_version}.\n\nSelect **Submit** button to start the OTA update to the latest stable firmware version." } }, "abort": { diff --git a/homeassistant/components/telegram_bot/bot.py b/homeassistant/components/telegram_bot/bot.py index 0d9059e8d98959..a397b11daf054d 100644 --- a/homeassistant/components/telegram_bot/bot.py +++ b/homeassistant/components/telegram_bot/bot.py @@ -7,7 +7,7 @@ import logging from ssl import SSLContext from types import MappingProxyType -from typing import Any +from typing import Any, cast import httpx from telegram import ( @@ -23,6 +23,7 @@ InputMediaVideo, InputPollOption, Message, + PhotoSize, ReplyKeyboardMarkup, ReplyKeyboardRemove, Update, @@ -56,6 +57,10 @@ ATTR_DISABLE_NOTIF, ATTR_DISABLE_WEB_PREV, ATTR_FILE, + ATTR_FILE_ID, + ATTR_FILE_MIME_TYPE, + ATTR_FILE_NAME, + ATTR_FILE_SIZE, ATTR_FROM_FIRST, ATTR_FROM_LAST, ATTR_INLINE_MESSAGE_ID, @@ -86,6 +91,7 @@ CONF_CHAT_ID, CONF_PROXY_URL, DOMAIN, + EVENT_TELEGRAM_ATTACHMENT, EVENT_TELEGRAM_CALLBACK, EVENT_TELEGRAM_COMMAND, EVENT_TELEGRAM_SENT, @@ -183,6 +189,10 @@ def _get_message_event_data(self, message: Message) -> tuple[str, dict[str, Any] # This is a command message - set event type to command and split data into command and args event_type = EVENT_TELEGRAM_COMMAND event_data.update(self._get_command_event_data(message.text)) + elif filters.ATTACHMENT.filter(message): + event_type = EVENT_TELEGRAM_ATTACHMENT + event_data[ATTR_TEXT] = message.caption + event_data.update(self._get_file_id_event_data(message)) else: event_type = EVENT_TELEGRAM_TEXT event_data[ATTR_TEXT] = message.text @@ -192,6 +202,26 @@ def _get_message_event_data(self, message: Message) -> tuple[str, dict[str, Any] return event_type, event_data + def _get_file_id_event_data(self, message: Message) -> dict[str, Any]: + """Extract file_id from a message attachment, if any.""" + if filters.PHOTO.filter(message): + photos = cast(Sequence[PhotoSize], message.effective_attachment) + return { + ATTR_FILE_ID: photos[-1].file_id, + ATTR_FILE_MIME_TYPE: "image/jpeg", # telegram always uses jpeg for photos + ATTR_FILE_SIZE: photos[-1].file_size, + } + return { + k: getattr(message.effective_attachment, v) + for k, v in ( + (ATTR_FILE_ID, "file_id"), + (ATTR_FILE_NAME, "file_name"), + (ATTR_FILE_MIME_TYPE, "mime_type"), + (ATTR_FILE_SIZE, "file_size"), + ) + if hasattr(message.effective_attachment, v) + } + def _get_user_event_data(self, user: User) -> dict[str, Any]: return { ATTR_USER_ID: user.id, diff --git a/homeassistant/components/telegram_bot/const.py b/homeassistant/components/telegram_bot/const.py index e891e1fa6399f1..7a90260900e848 100644 --- a/homeassistant/components/telegram_bot/const.py +++ b/homeassistant/components/telegram_bot/const.py @@ -54,6 +54,7 @@ EVENT_TELEGRAM_CALLBACK = "telegram_callback" EVENT_TELEGRAM_COMMAND = "telegram_command" EVENT_TELEGRAM_TEXT = "telegram_text" +EVENT_TELEGRAM_ATTACHMENT = "telegram_attachment" EVENT_TELEGRAM_SENT = "telegram_sent" PARSER_HTML = "html" @@ -90,6 +91,10 @@ ATTR_DISABLE_WEB_PREV = "disable_web_page_preview" ATTR_EDITED_MSG = "edited_message" ATTR_FILE = "file" +ATTR_FILE_ID = "file_id" +ATTR_FILE_MIME_TYPE = "file_mime_type" +ATTR_FILE_NAME = "file_name" +ATTR_FILE_SIZE = "file_size" ATTR_FROM_FIRST = "from_first" ATTR_FROM_LAST = "from_last" ATTR_KEYBOARD = "keyboard" diff --git a/homeassistant/components/template/sensor.py b/homeassistant/components/template/sensor.py index 6e4053aecbd42c..2700c31d58c24e 100644 --- a/homeassistant/components/template/sensor.py +++ b/homeassistant/components/template/sensor.py @@ -21,7 +21,9 @@ SensorEntity, SensorStateClass, ) -from homeassistant.components.sensor.helpers import async_parse_date_datetime +from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import + async_parse_date_datetime, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_ENTITY_ID, diff --git a/homeassistant/components/utility_meter/sensor.py b/homeassistant/components/utility_meter/sensor.py index 457b02c2b50dd7..5ab476edecb73a 100644 --- a/homeassistant/components/utility_meter/sensor.py +++ b/homeassistant/components/utility_meter/sensor.py @@ -20,7 +20,9 @@ SensorExtraStoredData, SensorStateClass, ) -from homeassistant.components.sensor.recorder import _suggest_report_issue +from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import + _suggest_report_issue, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_DEVICE_CLASS, diff --git a/homeassistant/components/vicare/binary_sensor.py b/homeassistant/components/vicare/binary_sensor.py index a032b1fbbcbc83..f1fe7d457545ea 100644 --- a/homeassistant/components/vicare/binary_sensor.py +++ b/homeassistant/components/vicare/binary_sensor.py @@ -24,6 +24,7 @@ BinarySensorEntity, BinarySensorEntityDescription, ) +from homeassistant.const import EntityCategory from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -117,6 +118,32 @@ class ViCareBinarySensorEntityDescription( device_class=BinarySensorDeviceClass.PROBLEM, value_getter=lambda api: len(api.getDeviceErrors()) > 0, ), + ViCareBinarySensorEntityDescription( + key="identification_mode", + translation_key="identification_mode", + entity_category=EntityCategory.DIAGNOSTIC, + value_getter=lambda api: api.getIdentification(), + entity_registry_enabled_default=False, + ), + ViCareBinarySensorEntityDescription( + key="mounting_mode", + translation_key="mounting_mode", + entity_category=EntityCategory.DIAGNOSTIC, + value_getter=lambda api: api.getMountingMode(), + entity_registry_enabled_default=False, + ), + ViCareBinarySensorEntityDescription( + key="child_safety_lock_mode", + translation_key="child_safety_lock_mode", + value_getter=lambda api: api.getChildLock() == "active", + entity_registry_enabled_default=False, + ), + ViCareBinarySensorEntityDescription( + key="valve", + translation_key="valve", + device_class=BinarySensorDeviceClass.DOOR, + value_getter=lambda api: api.isValveOpen(), + ), ) diff --git a/homeassistant/components/vicare/icons.json b/homeassistant/components/vicare/icons.json index c54be7af0d5e86..f3e0daeda52330 100644 --- a/homeassistant/components/vicare/icons.json +++ b/homeassistant/components/vicare/icons.json @@ -21,6 +21,15 @@ }, "one_time_charge": { "default": "mdi:shower-head" + }, + "mounting_mode": { + "default": "mdi:wrench" + }, + "child_safety_lock_mode": { + "default": "mdi:lock" + }, + "valve": { + "default": "mdi:pipe-valve" } }, "button": { @@ -90,6 +99,12 @@ }, "ventilation_level": { "default": "mdi:fan" + }, + "zigbee_signal_strength": { + "default": "mdi:wifi" + }, + "valve_position": { + "default": "mdi:pipe-valve" } } }, diff --git a/homeassistant/components/vicare/sensor.py b/homeassistant/components/vicare/sensor.py index 7825db7043bab7..6f97875247a435 100644 --- a/homeassistant/components/vicare/sensor.py +++ b/homeassistant/components/vicare/sensor.py @@ -943,6 +943,23 @@ class ViCareSensorEntityDescription(SensorEntityDescription, ViCareRequiredKeysM entity_category=EntityCategory.DIAGNOSTIC, value_getter=lambda api: api.getBatteryLevel(), ), + ViCareSensorEntityDescription( + key="zigbee_signal_strength", + translation_key="zigbee_signal_strength", + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=PERCENTAGE, + value_getter=lambda api: api.getZigbeeSignalStrength(), + entity_registry_enabled_default=False, + ), + ViCareSensorEntityDescription( + key="valve_position", + translation_key="valve_position", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=PERCENTAGE, + value_getter=lambda api: api.getValvePosition(), + entity_registry_enabled_default=False, + ), ViCareSensorEntityDescription( key="fuel_need", translation_key="fuel_need", diff --git a/homeassistant/components/vicare/strings.json b/homeassistant/components/vicare/strings.json index ee6ef6d1c75ac0..bb02a633d40ab0 100644 --- a/homeassistant/components/vicare/strings.json +++ b/homeassistant/components/vicare/strings.json @@ -66,6 +66,18 @@ }, "one_time_charge": { "name": "One-time charge" + }, + "identification_mode": { + "name": "Identification mode" + }, + "mounting_mode": { + "name": "Mounting mode" + }, + "child_safety_lock_mode": { + "name": "Child safety lock" + }, + "valve": { + "name": "Valve" } }, "button": { @@ -502,6 +514,12 @@ }, "fuel_need": { "name": "Fuel need" + }, + "zigbee_signal_strength": { + "name": "[%key:component::sensor::entity_component::signal_strength::name%]" + }, + "valve_position": { + "name": "Valve position" } }, "water_heater": { diff --git a/homeassistant/components/voip/repairs.py b/homeassistant/components/voip/repairs.py index 11cacbb7486ea2..600ea4d66fbe2f 100644 --- a/homeassistant/components/voip/repairs.py +++ b/homeassistant/components/voip/repairs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from homeassistant.components.assist_pipeline.repair_flows import ( +from homeassistant.components.assist_pipeline.repair_flows import ( # pylint: disable=hass-component-root-import AssistInProgressDeprecatedRepairFlow, ) from homeassistant.components.repairs import RepairsFlow diff --git a/homeassistant/components/voip/select.py b/homeassistant/components/voip/select.py index bfce112d0c55ef..8c9668b09ef8dd 100644 --- a/homeassistant/components/voip/select.py +++ b/homeassistant/components/voip/select.py @@ -4,7 +4,7 @@ from typing import TYPE_CHECKING -from homeassistant.components.assist_pipeline.select import ( +from homeassistant.components.assist_pipeline import ( AssistPipelineSelect, VadSensitivitySelect, ) diff --git a/homeassistant/components/volvo/manifest.json b/homeassistant/components/volvo/manifest.json index 1d6de143d0dda6..9238f4a770bf68 100644 --- a/homeassistant/components/volvo/manifest.json +++ b/homeassistant/components/volvo/manifest.json @@ -8,6 +8,6 @@ "integration_type": "device", "iot_class": "cloud_polling", "loggers": ["volvocarsapi"], - "quality_scale": "silver", + "quality_scale": "platinum", "requirements": ["volvocarsapi==0.4.3"] } diff --git a/homeassistant/components/volvo/quality_scale.yaml b/homeassistant/components/volvo/quality_scale.yaml index ac91fd001d1e5d..cdf28b1f958a97 100644 --- a/homeassistant/components/volvo/quality_scale.yaml +++ b/homeassistant/components/volvo/quality_scale.yaml @@ -42,7 +42,7 @@ rules: # Gold devices: done - diagnostics: todo + diagnostics: done discovery-update-info: status: exempt comment: | @@ -52,12 +52,12 @@ rules: comment: | No discovery possible. docs-data-update: done - docs-examples: todo + docs-examples: done docs-known-limitations: done docs-supported-devices: done docs-supported-functions: done docs-troubleshooting: done - docs-use-cases: todo + docs-use-cases: done dynamic-devices: status: exempt comment: | @@ -70,7 +70,10 @@ rules: exception-translations: done icon-translations: done reconfiguration-flow: done - repair-issues: todo + repair-issues: + status: exempt + comment: | + This integration doesn't have any cases where raising an issue is needed. stale-devices: status: exempt comment: | diff --git a/homeassistant/components/waqi/__init__.py b/homeassistant/components/waqi/__init__.py index 7b1243ed905047..ae5ed197b0757c 100644 --- a/homeassistant/components/waqi/__init__.py +++ b/homeassistant/components/waqi/__init__.py @@ -2,32 +2,169 @@ from __future__ import annotations +from types import MappingProxyType +from typing import TYPE_CHECKING + from aiowaqi import WAQIClient +from homeassistant.config_entries import ConfigEntry, ConfigSubentry from homeassistant.const import CONF_API_KEY, Platform from homeassistant.core import HomeAssistant +from homeassistant.helpers import ( + config_validation as cv, + device_registry as dr, + entity_registry as er, +) from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.typing import ConfigType +from .const import CONF_STATION_NUMBER, DOMAIN, SUBENTRY_TYPE_STATION from .coordinator import WAQIConfigEntry, WAQIDataUpdateCoordinator +CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) PLATFORMS: list[Platform] = [Platform.SENSOR] +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: + """Set up WAQI.""" + + await async_migrate_integration(hass) + return True + + async def async_setup_entry(hass: HomeAssistant, entry: WAQIConfigEntry) -> bool: """Set up World Air Quality Index (WAQI) from a config entry.""" client = WAQIClient(session=async_get_clientsession(hass)) client.authenticate(entry.data[CONF_API_KEY]) - waqi_coordinator = WAQIDataUpdateCoordinator(hass, entry, client) - await waqi_coordinator.async_config_entry_first_refresh() - entry.runtime_data = waqi_coordinator + entry.runtime_data = {} + + for subentry in entry.subentries.values(): + if subentry.subentry_type != SUBENTRY_TYPE_STATION: + continue + + # Create a coordinator for each station subentry + coordinator = WAQIDataUpdateCoordinator(hass, entry, subentry, client) + await coordinator.async_config_entry_first_refresh() + entry.runtime_data[subentry.subentry_id] = coordinator + + entry.async_on_unload(entry.add_update_listener(async_update_entry)) await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) return True +async def async_update_entry(hass: HomeAssistant, entry: WAQIConfigEntry) -> None: + """Update entry.""" + await hass.config_entries.async_reload(entry.entry_id) + + async def async_unload_entry(hass: HomeAssistant, entry: WAQIConfigEntry) -> bool: """Unload a config entry.""" return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) + + +async def async_migrate_integration(hass: HomeAssistant) -> None: + """Migrate integration entry structure to subentries.""" + + # Make sure we get enabled config entries first + entries = sorted( + hass.config_entries.async_entries(DOMAIN), + key=lambda e: e.disabled_by is not None, + ) + if not any(entry.version == 1 for entry in entries): + return + + api_keys_entries: dict[str, tuple[ConfigEntry, bool]] = {} + entity_registry = er.async_get(hass) + device_registry = dr.async_get(hass) + + for entry in entries: + subentry = ConfigSubentry( + data=MappingProxyType( + {CONF_STATION_NUMBER: entry.data[CONF_STATION_NUMBER]} + ), + subentry_type="station", + title=entry.title, + unique_id=entry.unique_id, + ) + if entry.data[CONF_API_KEY] not in api_keys_entries: + all_disabled = all( + e.disabled_by is not None + for e in entries + if e.data[CONF_API_KEY] == entry.data[CONF_API_KEY] + ) + api_keys_entries[entry.data[CONF_API_KEY]] = (entry, all_disabled) + + parent_entry, all_disabled = api_keys_entries[entry.data[CONF_API_KEY]] + + hass.config_entries.async_add_subentry(parent_entry, subentry) + + entities = er.async_entries_for_config_entry(entity_registry, entry.entry_id) + if TYPE_CHECKING: + assert entry.unique_id is not None + device = device_registry.async_get_device( + identifiers={(DOMAIN, entry.unique_id)} + ) + + for entity_entry in entities: + entity_disabled_by = entity_entry.disabled_by + if ( + entity_disabled_by is er.RegistryEntryDisabler.CONFIG_ENTRY + and not all_disabled + ): + # Device and entity registries don't update the disabled_by flag + # when moving a device or entity from one config entry to another, + # so we need to do it manually. + entity_disabled_by = ( + er.RegistryEntryDisabler.DEVICE + if device + else er.RegistryEntryDisabler.USER + ) + entity_registry.async_update_entity( + entity_entry.entity_id, + config_entry_id=parent_entry.entry_id, + config_subentry_id=subentry.subentry_id, + disabled_by=entity_disabled_by, + ) + + if device is not None: + # Device and entity registries don't update the disabled_by flag when + # moving a device or entity from one config entry to another, so we + # need to do it manually. + device_disabled_by = device.disabled_by + if ( + device.disabled_by is dr.DeviceEntryDisabler.CONFIG_ENTRY + and not all_disabled + ): + device_disabled_by = dr.DeviceEntryDisabler.USER + device_registry.async_update_device( + device.id, + disabled_by=device_disabled_by, + add_config_subentry_id=subentry.subentry_id, + add_config_entry_id=parent_entry.entry_id, + ) + if parent_entry.entry_id != entry.entry_id: + device_registry.async_update_device( + device.id, + remove_config_entry_id=entry.entry_id, + ) + else: + device_registry.async_update_device( + device.id, + remove_config_entry_id=entry.entry_id, + remove_config_subentry_id=None, + ) + + if parent_entry.entry_id != entry.entry_id: + await hass.config_entries.async_remove(entry.entry_id) + else: + hass.config_entries.async_update_entry( + entry, + title="WAQI", + version=2, + data={CONF_API_KEY: entry.data[CONF_API_KEY]}, + unique_id=None, + ) diff --git a/homeassistant/components/waqi/config_flow.py b/homeassistant/components/waqi/config_flow.py index 8ed2dcd8425212..d4090e688d90b5 100644 --- a/homeassistant/components/waqi/config_flow.py +++ b/homeassistant/components/waqi/config_flow.py @@ -13,22 +13,24 @@ ) import voluptuous as vol -from homeassistant.config_entries import ConfigFlow, ConfigFlowResult +from homeassistant.config_entries import ( + ConfigEntry, + ConfigFlow, + ConfigFlowResult, + ConfigSubentryFlow, + SubentryFlowResult, +) from homeassistant.const import ( CONF_API_KEY, CONF_LATITUDE, CONF_LOCATION, CONF_LONGITUDE, - CONF_METHOD, ) +from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession -from homeassistant.helpers.selector import ( - LocationSelector, - SelectSelector, - SelectSelectorConfig, -) +from homeassistant.helpers.selector import LocationSelector -from .const import CONF_STATION_NUMBER, DOMAIN +from .const import CONF_STATION_NUMBER, DOMAIN, SUBENTRY_TYPE_STATION _LOGGER = logging.getLogger(__name__) @@ -54,11 +56,15 @@ async def get_by_station_number( class WAQIConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for World Air Quality Index (WAQI).""" - VERSION = 1 + VERSION = 2 - def __init__(self) -> None: - """Initialize config flow.""" - self.data: dict[str, Any] = {} + @classmethod + @callback + def async_get_supported_subentry_types( + cls, config_entry: ConfigEntry + ) -> dict[str, type[ConfigSubentryFlow]]: + """Return subentries supported by this handler.""" + return {SUBENTRY_TYPE_STATION: StationFlowHandler} async def async_step_user( self, user_input: dict[str, Any] | None = None @@ -66,6 +72,7 @@ async def async_step_user( """Handle the initial step.""" errors: dict[str, str] = {} if user_input is not None: + self._async_abort_entries_match({CONF_API_KEY: user_input[CONF_API_KEY]}) client = WAQIClient(session=async_get_clientsession(self.hass)) client.authenticate(user_input[CONF_API_KEY]) try: @@ -78,35 +85,40 @@ async def async_step_user( _LOGGER.exception("Unexpected exception") errors["base"] = "unknown" else: - self.data = user_input - if user_input[CONF_METHOD] == CONF_MAP: - return await self.async_step_map() - return await self.async_step_station_number() + return self.async_create_entry( + title="World Air Quality Index", + data={ + CONF_API_KEY: user_input[CONF_API_KEY], + }, + ) return self.async_show_form( step_id="user", - data_schema=vol.Schema( - { - vol.Required(CONF_API_KEY): str, - vol.Required(CONF_METHOD): SelectSelector( - SelectSelectorConfig( - options=[CONF_MAP, CONF_STATION_NUMBER], - translation_key="method", - ) - ), - } - ), + data_schema=vol.Schema({vol.Required(CONF_API_KEY): str}), errors=errors, ) + +class StationFlowHandler(ConfigSubentryFlow): + """Handle subentry flow.""" + + async def async_step_user( + self, user_input: dict[str, Any] | None = None + ) -> SubentryFlowResult: + """User flow to create a sensor subentry.""" + return self.async_show_menu( + step_id="user", + menu_options=["map", "station_number"], + ) + async def async_step_map( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: + ) -> SubentryFlowResult: """Add measuring station via map.""" errors: dict[str, str] = {} if user_input is not None: client = WAQIClient(session=async_get_clientsession(self.hass)) - client.authenticate(self.data[CONF_API_KEY]) + client.authenticate(self._get_entry().data[CONF_API_KEY]) try: measuring_station = await client.get_by_coordinates( user_input[CONF_LOCATION][CONF_LATITUDE], @@ -124,9 +136,7 @@ async def async_step_map( data_schema=self.add_suggested_values_to_schema( vol.Schema( { - vol.Required( - CONF_LOCATION, - ): LocationSelector(), + vol.Required(CONF_LOCATION): LocationSelector(), } ), { @@ -141,12 +151,12 @@ async def async_step_map( async def async_step_station_number( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: + ) -> SubentryFlowResult: """Add measuring station via station number.""" errors: dict[str, str] = {} if user_input is not None: client = WAQIClient(session=async_get_clientsession(self.hass)) - client.authenticate(self.data[CONF_API_KEY]) + client.authenticate(self._get_entry().data[CONF_API_KEY]) station_number = user_input[CONF_STATION_NUMBER] measuring_station, errors = await get_by_station_number( client, abs(station_number) @@ -160,25 +170,22 @@ async def async_step_station_number( return await self._async_create_entry(measuring_station) return self.async_show_form( step_id=CONF_STATION_NUMBER, - data_schema=vol.Schema( - { - vol.Required( - CONF_STATION_NUMBER, - ): int, - } - ), + data_schema=vol.Schema({vol.Required(CONF_STATION_NUMBER): int}), errors=errors, ) async def _async_create_entry( self, measuring_station: WAQIAirQuality - ) -> ConfigFlowResult: - await self.async_set_unique_id(str(measuring_station.station_id)) - self._abort_if_unique_id_configured() + ) -> SubentryFlowResult: + station_id = str(measuring_station.station_id) + for entry in self.hass.config_entries.async_entries(DOMAIN): + for subentry in entry.subentries.values(): + if subentry.unique_id == station_id: + return self.async_abort(reason="already_configured") return self.async_create_entry( title=measuring_station.city.name, data={ - CONF_API_KEY: self.data[CONF_API_KEY], CONF_STATION_NUMBER: measuring_station.station_id, }, + unique_id=station_id, ) diff --git a/homeassistant/components/waqi/const.py b/homeassistant/components/waqi/const.py index c5ffea20b46e7a..3e48857b85fab4 100644 --- a/homeassistant/components/waqi/const.py +++ b/homeassistant/components/waqi/const.py @@ -8,4 +8,4 @@ CONF_STATION_NUMBER = "station_number" -ISSUE_PLACEHOLDER = {"url": "/config/integrations/dashboard/add?domain=waqi"} +SUBENTRY_TYPE_STATION = "station" diff --git a/homeassistant/components/waqi/coordinator.py b/homeassistant/components/waqi/coordinator.py index f40df4a1b89d0a..0c9e624ba663f0 100644 --- a/homeassistant/components/waqi/coordinator.py +++ b/homeassistant/components/waqi/coordinator.py @@ -6,13 +6,13 @@ from aiowaqi import WAQIAirQuality, WAQIClient, WAQIError -from homeassistant.config_entries import ConfigEntry +from homeassistant.config_entries import ConfigEntry, ConfigSubentry from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed -from .const import CONF_STATION_NUMBER, DOMAIN, LOGGER +from .const import CONF_STATION_NUMBER, LOGGER -type WAQIConfigEntry = ConfigEntry[WAQIDataUpdateCoordinator] +type WAQIConfigEntry = ConfigEntry[dict[str, WAQIDataUpdateCoordinator]] class WAQIDataUpdateCoordinator(DataUpdateCoordinator[WAQIAirQuality]): @@ -21,22 +21,27 @@ class WAQIDataUpdateCoordinator(DataUpdateCoordinator[WAQIAirQuality]): config_entry: WAQIConfigEntry def __init__( - self, hass: HomeAssistant, config_entry: WAQIConfigEntry, client: WAQIClient + self, + hass: HomeAssistant, + config_entry: WAQIConfigEntry, + subentry: ConfigSubentry, + client: WAQIClient, ) -> None: """Initialize the WAQI data coordinator.""" super().__init__( hass, LOGGER, config_entry=config_entry, - name=DOMAIN, + name=subentry.title, update_interval=timedelta(minutes=5), ) self._client = client + self.subentry = subentry async def _async_update_data(self) -> WAQIAirQuality: try: return await self._client.get_by_station_number( - self.config_entry.data[CONF_STATION_NUMBER] + self.subentry.data[CONF_STATION_NUMBER] ) except WAQIError as exc: raise UpdateFailed from exc diff --git a/homeassistant/components/waqi/sensor.py b/homeassistant/components/waqi/sensor.py index c887d893c0816c..cbec9d7476bdb6 100644 --- a/homeassistant/components/waqi/sensor.py +++ b/homeassistant/components/waqi/sensor.py @@ -130,12 +130,15 @@ async def async_setup_entry( async_add_entities: AddConfigEntryEntitiesCallback, ) -> None: """Set up the WAQI sensor.""" - coordinator = entry.runtime_data - async_add_entities( - WaqiSensor(coordinator, sensor) - for sensor in SENSORS - if sensor.available_fn(coordinator.data) - ) + for subentry_id, coordinator in entry.runtime_data.items(): + async_add_entities( + ( + WaqiSensor(coordinator, sensor) + for sensor in SENSORS + if sensor.available_fn(coordinator.data) + ), + config_subentry_id=subentry_id, + ) class WaqiSensor(CoordinatorEntity[WAQIDataUpdateCoordinator], SensorEntity): diff --git a/homeassistant/components/waqi/strings.json b/homeassistant/components/waqi/strings.json index f455e3ead339f7..96fefe99f585bb 100644 --- a/homeassistant/components/waqi/strings.json +++ b/homeassistant/components/waqi/strings.json @@ -3,19 +3,10 @@ "step": { "user": { "data": { - "api_key": "[%key:common::config_flow::data::api_key%]", - "method": "How do you want to select a measuring station?" - } - }, - "map": { - "description": "Select a location to get the closest measuring station.", - "data": { - "location": "[%key:common::config_flow::data::location%]" - } - }, - "station_number": { - "data": { - "station_number": "Measuring station number" + "api_key": "[%key:common::config_flow::data::api_key%]" + }, + "data_description": { + "api_key": "API key for the World Air Quality Index" } } }, @@ -25,15 +16,44 @@ "unknown": "[%key:common::config_flow::error::unknown%]" }, "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" + "already_configured": "[%key:common::config_flow::abort::already_configured_service%]" } }, - "selector": { - "method": { - "options": { - "map": "Select nearest from point on the map", - "station_number": "Enter a station number" - } + "config_subentries": { + "station": { + "step": { + "user": { + "title": "Add measuring station", + "description": "How do you want to select a measuring station?", + "menu_options": { + "map": "[%key:common::config_flow::data::location%]", + "station_number": "Measuring station number" + } + }, + "map": { + "data": { + "location": "[%key:common::config_flow::data::location%]" + }, + "data_description": { + "location": "The location to get the nearest measuring station from" + } + }, + "station_number": { + "data": { + "station_number": "[%key:component::waqi::config_subentries::station::step::user::menu_options::station_number%]" + }, + "data_description": { + "station_number": "The number of the measuring station" + } + } + }, + "abort": { + "already_configured": "[%key:common::config_flow::abort::already_configured_service%]" + }, + "initiate_flow": { + "user": "Add measuring station" + }, + "entry_type": "Measuring station" } }, "entity": { diff --git a/homeassistant/components/wyoming/devices.py b/homeassistant/components/wyoming/devices.py index 2e00b31fd34e57..dec5d066f4d4a3 100644 --- a/homeassistant/components/wyoming/devices.py +++ b/homeassistant/components/wyoming/devices.py @@ -5,7 +5,7 @@ from collections.abc import Callable from dataclasses import dataclass -from homeassistant.components.assist_pipeline.vad import VadSensitivity +from homeassistant.components.assist_pipeline import VadSensitivity from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import entity_registry as er diff --git a/homeassistant/components/wyoming/select.py b/homeassistant/components/wyoming/select.py index 2af0438e35f201..b3af22a4c16ed1 100644 --- a/homeassistant/components/wyoming/select.py +++ b/homeassistant/components/wyoming/select.py @@ -4,11 +4,11 @@ from typing import TYPE_CHECKING, Final -from homeassistant.components.assist_pipeline.select import ( +from homeassistant.components.assist_pipeline import ( AssistPipelineSelect, + VadSensitivity, VadSensitivitySelect, ) -from homeassistant.components.assist_pipeline.vad import VadSensitivity from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.const import EntityCategory diff --git a/homeassistant/helpers/trigger_template_entity.py b/homeassistant/helpers/trigger_template_entity.py index 46a50b184b5041..1e83f66e5eedcf 100644 --- a/homeassistant/helpers/trigger_template_entity.py +++ b/homeassistant/helpers/trigger_template_entity.py @@ -16,7 +16,9 @@ SensorDeviceClass, SensorEntity, ) -from homeassistant.components.sensor.helpers import async_parse_date_datetime +from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import + async_parse_date_datetime, +) from homeassistant.const import ( ATTR_ENTITY_PICTURE, ATTR_FRIENDLY_NAME, diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 9af0efd4ab9617..ae799828bf90fa 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -36,7 +36,7 @@ fnv-hash-fast==1.6.0 go2rtc-client==0.2.1 ha-ffmpeg==3.2.2 habluetooth==5.7.0 -hass-nabucasa==1.3.0 +hass-nabucasa==1.4.0 hassil==3.2.0 home-assistant-bluetooth==1.13.1 home-assistant-frontend==20251001.4 diff --git a/pylint/plugins/hass_imports.py b/pylint/plugins/hass_imports.py index ede92875e1bf5b..95f7b0a0feb640 100644 --- a/pylint/plugins/hass_imports.py +++ b/pylint/plugins/hass_imports.py @@ -126,7 +126,6 @@ class ObsoleteImportMatch: } _IGNORE_ROOT_IMPORT = ( - "assist_pipeline", "automation", "bluetooth", "camera", @@ -144,7 +143,6 @@ class ObsoleteImportMatch: "recorder", "rest", "script", - "sensor", "stream", ) diff --git a/pyproject.toml b/pyproject.toml index d1d78d939552bc..561e99a985b75b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ "fnv-hash-fast==1.6.0", # hass-nabucasa is imported by helpers which don't depend on the cloud # integration - "hass-nabucasa==1.3.0", + "hass-nabucasa==1.4.0", # When bumping httpx, please check the version pins of # httpcore, anyio, and h11 in gen_requirements_all "httpx==0.28.1", diff --git a/requirements.txt b/requirements.txt index 93e63f6e3bdc33..2d64703e83fcad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ certifi>=2021.5.30 ciso8601==2.3.3 cronsim==2.6 fnv-hash-fast==1.6.0 -hass-nabucasa==1.3.0 +hass-nabucasa==1.4.0 httpx==0.28.1 home-assistant-bluetooth==1.13.1 ifaddr==0.2.0 diff --git a/requirements_all.txt b/requirements_all.txt index ecb1fd19979ea6..adc8d35ed8feb0 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -916,7 +916,7 @@ epicstore-api==0.1.7 epion==0.0.3 # homeassistant.components.epson -epson-projector==0.5.1 +epson-projector==0.6.0 # homeassistant.components.eq3btsmart eq3btsmart==2.3.0 @@ -1154,7 +1154,7 @@ habiticalib==0.4.5 habluetooth==5.7.0 # homeassistant.components.cloud -hass-nabucasa==1.3.0 +hass-nabucasa==1.4.0 # homeassistant.components.splunk hass-splunk==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2b5b89dafc09df..a87200c786acd0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -798,7 +798,7 @@ epicstore-api==0.1.7 epion==0.0.3 # homeassistant.components.epson -epson-projector==0.5.1 +epson-projector==0.6.0 # homeassistant.components.eq3btsmart eq3btsmart==2.3.0 @@ -1015,7 +1015,7 @@ habiticalib==0.4.5 habluetooth==5.7.0 # homeassistant.components.cloud -hass-nabucasa==1.3.0 +hass-nabucasa==1.4.0 # homeassistant.components.assist_satellite # homeassistant.components.conversation diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index 7468afab89045d..50334cb8ac2642 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -1755,7 +1755,6 @@ class Rule: "omnilogic", "oncue", "ondilo_ico", - "onewire", "onvif", "open_meteo", "openai_conversation", diff --git a/script/hassfest/requirements.py b/script/hassfest/requirements.py index e725b9f334bb8f..c25e1f3ddfb567 100644 --- a/script/hassfest/requirements.py +++ b/script/hassfest/requirements.py @@ -137,11 +137,6 @@ }, "emulated_kasa": {"sense-energy": {"async-timeout"}}, "entur_public_transport": {"enturclient": {"async-timeout"}}, - "epson": { - # https://github.com/pszafer/epson_projector/pull/22 - # epson-projector > pyserial-asyncio - "epson-projector": {"pyserial-asyncio", "async-timeout"} - }, "escea": {"pescea": {"async-timeout"}}, "evil_genius_labs": {"pyevilgenius": {"async-timeout"}}, "familyhub": {"python-family-hub-local": {"async-timeout"}}, diff --git a/tests/components/cloud/test_http_api.py b/tests/components/cloud/test_http_api.py index 5256ff8a5099db..dd63c7165759a0 100644 --- a/tests/components/cloud/test_http_api.py +++ b/tests/components/cloud/test_http_api.py @@ -28,7 +28,9 @@ # pylint: disable-next=hass-component-root-import from homeassistant.components.alexa.entities import LightCapabilities -from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY +from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import + STORAGE_KEY, +) from homeassistant.components.cloud.const import DEFAULT_EXPOSED_DOMAINS, DOMAIN from homeassistant.components.cloud.http_api import validate_language_voice from homeassistant.components.google_assistant.helpers import GoogleEntity diff --git a/tests/components/cloud/test_stt.py b/tests/components/cloud/test_stt.py index 02acda1450e97c..a817820ae2db2d 100644 --- a/tests/components/cloud/test_stt.py +++ b/tests/components/cloud/test_stt.py @@ -9,7 +9,9 @@ from hass_nabucasa.voice import STTResponse, VoiceError import pytest -from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY +from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import + STORAGE_KEY, +) from homeassistant.components.cloud.const import DOMAIN from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN from homeassistant.core import HomeAssistant diff --git a/tests/components/cloud/test_tts.py b/tests/components/cloud/test_tts.py index 44430f9c39a167..f830cb272599e4 100644 --- a/tests/components/cloud/test_tts.py +++ b/tests/components/cloud/test_tts.py @@ -13,7 +13,9 @@ import pytest import voluptuous as vol -from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY +from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import + STORAGE_KEY, +) from homeassistant.components.cloud.const import DEFAULT_TTS_DEFAULT_VOICE, DOMAIN from homeassistant.components.cloud.tts import ( DEFAULT_VOICES, diff --git a/tests/components/cups/test_sensor.py b/tests/components/cups/test_sensor.py index 22e12d61980b7d..e751568c3dbb62 100644 --- a/tests/components/cups/test_sensor.py +++ b/tests/components/cups/test_sensor.py @@ -3,7 +3,7 @@ from unittest.mock import patch from homeassistant.components.cups import CONF_PRINTERS, DOMAIN -from homeassistant.components.sensor.const import DOMAIN as SENSOR_DOMAIN +from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.const import CONF_PLATFORM from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant from homeassistant.helpers import issue_registry as ir diff --git a/tests/components/energy/test_sensor.py b/tests/components/energy/test_sensor.py index b7ccbadbe1cf8f..01f57a88085562 100644 --- a/tests/components/energy/test_sensor.py +++ b/tests/components/energy/test_sensor.py @@ -17,7 +17,9 @@ SensorDeviceClass, SensorStateClass, ) -from homeassistant.components.sensor.recorder import compile_statistics +from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import + compile_statistics, +) from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_UNIT_OF_MEASUREMENT, diff --git a/tests/components/esphome/test_assist_satellite.py b/tests/components/esphome/test_assist_satellite.py index d6643c17d45669..fe5ac70d687a60 100644 --- a/tests/components/esphome/test_assist_satellite.py +++ b/tests/components/esphome/test_assist_satellite.py @@ -28,7 +28,9 @@ tts, ) from homeassistant.components.assist_pipeline import PipelineEvent, PipelineEventType -from homeassistant.components.assist_pipeline.pipeline import KEY_ASSIST_PIPELINE +from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import + KEY_ASSIST_PIPELINE, +) from homeassistant.components.assist_satellite import ( AssistSatelliteConfiguration, AssistSatelliteEntityFeature, diff --git a/tests/components/iometer/test_config_flow.py b/tests/components/iometer/test_config_flow.py index 49fce459282ff8..f297688ee22c37 100644 --- a/tests/components/iometer/test_config_flow.py +++ b/tests/components/iometer/test_config_flow.py @@ -3,7 +3,8 @@ from ipaddress import ip_address from unittest.mock import AsyncMock -from iometer import IOmeterConnectionError +from iometer import IOmeterConnectionError, IOmeterNoReadingsError, IOmeterNoStatusError +import pytest from homeassistant.components import zeroconf from homeassistant.components.iometer.const import DOMAIN @@ -93,12 +94,25 @@ async def test_zeroconf_flow_abort_duplicate( assert result["reason"] == "already_configured" -async def test_zeroconf_flow_connection_error( +@pytest.mark.parametrize( + ("method_name", "exception", "reason"), + [ + ("get_current_status", IOmeterConnectionError(), "cannot_connect"), + ("get_current_status", IOmeterNoStatusError(), "no_status"), + ("get_current_reading", IOmeterNoReadingsError(), "no_readings"), + ], + ids=["status-connection", "status-missing", "reading-missing"], +) +async def test_zeroconf_flow_abort_errors( hass: HomeAssistant, mock_iometer_client: AsyncMock, + method_name: str, + exception: Exception, + reason: str, ) -> None: - """Test zeroconf flow.""" - mock_iometer_client.get_current_status.side_effect = IOmeterConnectionError() + """Test zeroconf flow aborts when the client raises an exception.""" + getattr(mock_iometer_client, method_name).side_effect = exception + result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_ZEROCONF}, @@ -106,16 +120,28 @@ async def test_zeroconf_flow_connection_error( ) await hass.async_block_till_done() assert result["type"] is FlowResultType.ABORT - assert result["reason"] == "cannot_connect" + assert result["reason"] == reason -async def test_user_flow_connection_error( +@pytest.mark.parametrize( + ("method_name", "exception", "error_key"), + [ + ("get_current_status", IOmeterConnectionError(), "cannot_connect"), + ("get_current_status", IOmeterNoStatusError(), "no_status"), + ("get_current_reading", IOmeterNoReadingsError(), "no_readings"), + ], + ids=["status-connection", "status-missing", "reading-missing"], +) +async def test_user_flow_errors( hass: HomeAssistant, mock_iometer_client: AsyncMock, mock_setup_entry: AsyncMock, + method_name: str, + exception: Exception, + error_key: str, ) -> None: - """Test flow error.""" - mock_iometer_client.get_current_status.side_effect = IOmeterConnectionError() + """Test user flow returns errors for client exceptions.""" + getattr(mock_iometer_client, method_name).side_effect = exception result = await hass.config_entries.flow.async_init( DOMAIN, @@ -130,11 +156,10 @@ async def test_user_flow_connection_error( {CONF_HOST: IP_ADDRESS}, ) await hass.async_block_till_done() - assert result["type"] is FlowResultType.FORM - assert result["errors"] == {"base": "cannot_connect"} + assert result["errors"] == {"base": error_key} - mock_iometer_client.get_current_status.side_effect = None + getattr(mock_iometer_client, method_name).side_effect = None result = await hass.config_entries.flow.async_configure( result["flow_id"], diff --git a/tests/components/matter/conftest.py b/tests/components/matter/conftest.py index 2e789e441dca3a..360e532e65faab 100644 --- a/tests/components/matter/conftest.py +++ b/tests/components/matter/conftest.py @@ -78,6 +78,7 @@ async def integration_fixture( "air_quality_sensor", "aqara_door_window_p2", "aqara_motion_p2", + "aqara_u200", "battery_storage", "color_temperature_light", "cooktop", @@ -86,6 +87,7 @@ async def integration_fixture( "door_lock", "door_lock_with_unbolt", "eve_contact_sensor", + "eve_energy_20ecn4101", "eve_energy_plug", "eve_energy_plug_patched", "eve_thermo", diff --git a/tests/components/matter/fixtures/nodes/aqara_u200.json b/tests/components/matter/fixtures/nodes/aqara_u200.json new file mode 100644 index 00000000000000..c38b57f75fdbc7 --- /dev/null +++ b/tests/components/matter/fixtures/nodes/aqara_u200.json @@ -0,0 +1,285 @@ +{ + "node_id": 20, + "date_commissioned": "2025-05-13T09:27:58.381227", + "last_interview": "2025-05-13T09:27:58.381243", + "interview_version": 6, + "available": true, + "is_bridge": false, + "attributes": { + "0/29/0": [ + { + "0": 22, + "1": 1 + } + ], + "0/29/1": [29, 31, 40, 42, 48, 49, 51, 60, 62, 63, 323615744], + "0/29/2": [41], + "0/29/3": [1, 2], + "0/29/65532": 0, + "0/29/65533": 2, + "0/29/65528": [], + "0/29/65529": [], + "0/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/31/0": [ + { + "1": 5, + "2": 2, + "3": [112233], + "4": null, + "254": 2 + } + ], + "0/31/1": [], + "0/31/2": 4, + "0/31/3": 3, + "0/31/4": 4, + "0/31/65532": 0, + "0/31/65533": 1, + "0/31/65528": [], + "0/31/65529": [], + "0/31/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/40/0": 17, + "0/40/1": "Aqara", + "0/40/2": 4447, + "0/40/3": "Aqara Smart Lock U200", + "0/40/4": 10242, + "0/40/5": "", + "0/40/6": "**REDACTED**", + "0/40/7": 1000, + "0/40/8": "1.0.0.0", + "0/40/9": 77, + "0/40/10": "077", + "0/40/12": "AD040", + "0/40/13": "https://www.aqara.com/en/products.html", + "0/40/14": "Aqara Smart Lock U200", + "0/40/15": "54EF441000D94666", + "0/40/16": false, + "0/40/18": "578441C22900C2FE", + "0/40/19": { + "0": 3, + "1": 3 + }, + "0/40/20": { + "0": 2, + "1": 16 + }, + "0/40/65532": 0, + "0/40/65533": 2, + "0/40/65528": [], + "0/40/65529": [], + "0/40/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 65528, + 65529, 65531, 65532, 65533 + ], + "0/42/0": [], + "0/42/1": true, + "0/42/2": 1, + "0/42/3": null, + "0/42/65532": 0, + "0/42/65533": 1, + "0/42/65528": [], + "0/42/65529": [0], + "0/42/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/48/0": 0, + "0/48/1": { + "0": 60, + "1": 900 + }, + "0/48/2": 0, + "0/48/3": 0, + "0/48/4": true, + "0/48/65532": 0, + "0/48/65533": 1, + "0/48/65528": [1, 3, 5], + "0/48/65529": [0, 2, 4], + "0/48/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/49/0": 1, + "0/49/1": [ + { + "0": "s2O8fvmCrHM=", + "1": true + } + ], + "0/49/2": 10, + "0/49/3": 20, + "0/49/4": true, + "0/49/5": 0, + "0/49/6": "s2O8fvmCrHM=", + "0/49/7": null, + "0/49/65532": 2, + "0/49/65533": 1, + "0/49/65528": [1, 5, 7], + "0/49/65529": [0, 3, 4, 6, 8], + "0/49/65531": [0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533], + "0/51/0": [ + { + "0": "AqaraHome-f8c4", + "1": true, + "2": null, + "3": null, + "4": "cOgBIHu1Awg=", + "5": [], + "6": [], + "7": 4 + } + ], + "0/51/1": 3, + "0/51/2": 46, + "0/51/3": 0, + "0/51/4": 0, + "0/51/5": [], + "0/51/6": [], + "0/51/7": [], + "0/51/8": false, + "0/51/65532": 0, + "0/51/65533": 1, + "0/51/65528": [], + "0/51/65529": [0], + "0/51/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 65528, 65529, 65531, 65532, 65533 + ], + "0/60/0": 0, + "0/60/1": null, + "0/60/2": null, + "0/60/65532": 0, + "0/60/65533": 1, + "0/60/65528": [], + "0/60/65529": [0, 1, 2], + "0/60/65531": [0, 1, 2, 65528, 65529, 65531, 65532, 65533], + "0/62/0": [ + { + "1": "FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVAiQRFBgkBwEkCAEwCUEEXN2MZ3fD2gWqdO9Y9S2ddP7Gl8tmq/QuymADONq2H5NM5xh3u4odYORp9SIl/WvKIaqQcUQqDA9R9u77ecUSdDcKNQEoARgkAgE2AwQCBAEYMAQUXRIFcQgFKfuYt0Mu0iXMP1ZUwwswBRT7fMgwDZS0bd8SFXAmkpOxF7zzmhgwC0CTF9mGUM55s8BAjmIMNLfmhmfOon9X6ahlC/Zj5xnKjGSG5v438s6r4ZaGBqJAzcX3GcTR/+603LkwI38pwVKdGA==", + "2": "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEZNSK34btJV+E1E9OjT0IrHEOkDSG85EPY1gqKGGsUUP25bDrkScXq09hD5S6k+p500uhGQRvMN8i8szYsjST4zcKNQEpARgkAmAwBBT7fMgwDZS0bd8SFXAmkpOxF7zzmjAFFDCUe/tJj0diikcyYJ9GzITcfSbmGDALQNLb4iOK471M1d7ZY+j//NLcGnu7QKO0GmV29dTZQDhfGooVzMXsjattPi7J/Wh3SJhD53NzXAU/rlRqJPObsFoY", + "254": 2 + } + ], + "0/62/1": [ + { + "1": "BA7Yvq12JcNnxYcB+WO8ufuYsMV3nWOuTpv6cA1QpyQjt/IzS9tBxscNKAYDEHjOtG6A7At3Mk2fKYDWJGBpVwk=", + "2": 4939, + "3": 2, + "4": 20, + "5": "Home", + "254": 2 + } + ], + "0/62/2": 5, + "0/62/3": 2, + "0/62/4": [ + "FTABAQEkAgE3AycUwfqP/wE0xFwYJgQAbr0uJgUAdFVUNwYnFMH6j/8BNMRcGCQHASQIATAJQQRquxusiggwdhOw9MlXlL8vRMRnjH/NGHy59y+6eT5/H8pUrazwyF/s6ZtTnopz05bMUDG5iFlxX+CAUeGhTO69Nwo1ASkBGCQCYDAEFNA6aTfL+QeSBl9MTaFxBy0UZx72MAUU0DppN8v5B5IGX0xNoXEHLRRnHvYYMAtAq1RC4eiqqzvI7mexZEZ2653sxnxciMkMhF3PSsf0ENhyWn8SgzzvdgPeFAnzOYO+8PtRkzPLsmHtL8ZR0Te9IBg=", + "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEDti+rXYlw2fFhwH5Y7y5+5iwxXedY65Om/pwDVCnJCO38jNL20HGxw0oBgMQeM60boDsC3cyTZ8pgNYkYGlXCTcKNQEpARgkAmAwBBQwlHv7SY9HYopHMmCfRsyE3H0m5jAFFDCUe/tJj0diikcyYJ9GzITcfSbmGDALQJjTJwzY5PEGKI7NVy85FKhOzMdnnG4i0ItwtlbHy/QJqLHJFuVrqFdt1X0kmjUQjLuL7RAOQqBJ69+ouCsQWRcY" + ], + "0/62/5": 2, + "0/62/65532": 0, + "0/62/65533": 1, + "0/62/65528": [1, 3, 5, 8], + "0/62/65529": [0, 2, 4, 6, 7, 9, 10, 11], + "0/62/65531": [0, 1, 2, 3, 4, 5, 65528, 65529, 65531, 65532, 65533], + "0/63/0": [], + "0/63/1": [], + "0/63/2": 4, + "0/63/3": 3, + "0/63/65532": 0, + "0/63/65533": 2, + "0/63/65528": [2, 5], + "0/63/65529": [0, 1, 3, 4], + "0/63/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/323615744/0": true, + "0/323615744/65532": 0, + "0/323615744/65533": 1, + "0/323615744/65528": [], + "0/323615744/65529": [], + "0/323615744/65531": [0, 65528, 65529, 65531, 65532, 65533], + "1/3/0": 0, + "1/3/1": 2, + "1/3/65532": 0, + "1/3/65533": 4, + "1/3/65528": [], + "1/3/65529": [0, 64], + "1/3/65531": [0, 1, 65528, 65529, 65531, 65532, 65533], + "1/29/0": [ + { + "0": 10, + "1": 1 + } + ], + "1/29/1": [3, 29, 257, 291503106], + "1/29/2": [], + "1/29/3": [], + "1/29/65532": 0, + "1/29/65533": 2, + "1/29/65528": [], + "1/29/65529": [], + "1/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "1/257/0": 1, + "1/257/1": 9, + "1/257/2": false, + "1/257/17": 10, + "1/257/18": 15, + "1/257/19": 15, + "1/257/20": 1, + "1/257/21": 1, + "1/257/22": 1, + "1/257/23": 8, + "1/257/24": 4, + "1/257/25": 74, + "1/257/26": 10, + "1/257/27": 1, + "1/257/28": 15, + "1/257/37": 0, + "1/257/38": 65526, + "1/257/41": false, + "1/257/48": 10, + "1/257/49": 60, + "1/257/51": false, + "1/257/65532": 387, + "1/257/65533": 7, + "1/257/65528": [28, 35, 37], + "1/257/65529": [0, 1, 3, 26, 27, 29, 34, 36, 38], + "1/257/65531": [ + 0, 1, 2, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 37, 38, 41, 48, + 49, 51, 65528, 65529, 65531, 65532, 65533 + ], + "1/291503106/0": 2, + "1/291503106/1": 2, + "1/291503106/2": 2, + "1/291503106/3": 2, + "1/291503106/4": false, + "1/291503106/65532": 7, + "1/291503106/65533": 1, + "1/291503106/65528": [], + "1/291503106/65529": [0, 1], + "1/291503106/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "2/29/0": [ + { + "0": 17, + "1": 1 + } + ], + "2/29/1": [29, 47], + "2/29/2": [], + "2/29/3": [], + "2/29/65532": 0, + "2/29/65533": 2, + "2/29/65528": [], + "2/29/65529": [], + "2/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "2/47/0": 1, + "2/47/1": 0, + "2/47/2": "Rechargeable Battery", + "2/47/11": 7400, + "2/47/12": 80, + "2/47/14": 0, + "2/47/15": false, + "2/47/16": 3, + "2/47/31": [], + "2/47/65532": 2, + "2/47/65533": 1, + "2/47/65528": [], + "2/47/65529": [], + "2/47/65531": [ + 0, 1, 2, 11, 12, 14, 15, 16, 31, 65528, 65529, 65531, 65532, 65533 + ] + }, + "attribute_subscriptions": [] +} diff --git a/tests/components/matter/fixtures/nodes/eve_energy_20ecn4101.json b/tests/components/matter/fixtures/nodes/eve_energy_20ecn4101.json new file mode 100644 index 00000000000000..5f2735be5283e8 --- /dev/null +++ b/tests/components/matter/fixtures/nodes/eve_energy_20ecn4101.json @@ -0,0 +1,1109 @@ +{ + "node_id": 199, + "date_commissioned": "2025-04-21T16:36:55.676724", + "last_interview": "2025-04-21T16:36:55.676729", + "interview_version": 6, + "available": true, + "is_bridge": false, + "attributes": { + "0/29/0": [ + { + "0": 22, + "1": 1 + } + ], + "0/29/1": [29, 31, 40, 42, 48, 49, 51, 53, 60, 62, 63], + "0/29/2": [41], + "0/29/3": [1, 2], + "0/29/65532": 0, + "0/29/65533": 1, + "0/29/65528": [], + "0/29/65529": [], + "0/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/31/0": [ + { + "1": 5, + "2": 2, + "3": [112233], + "4": null, + "254": 3 + } + ], + "0/31/1": [], + "0/31/2": 10, + "0/31/3": 3, + "0/31/4": 6, + "0/31/65532": 0, + "0/31/65533": 1, + "0/31/65528": [], + "0/31/65529": [], + "0/31/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/40/0": 1, + "0/40/1": "Eve Systems", + "0/40/2": 4874, + "0/40/3": "Eve Energy 20ECN4101", + "0/40/4": 105, + "0/40/5": "", + "0/40/6": "**REDACTED**", + "0/40/7": 1, + "0/40/8": "1.1", + "0/40/9": 7404, + "0/40/10": "3.3.0", + "0/40/15": "OX48N1M00992", + "0/40/18": "110E40BD39E1EC38", + "0/40/19": { + "0": 3, + "1": 3 + }, + "0/40/65532": 0, + "0/40/65533": 1, + "0/40/65528": [], + "0/40/65529": [], + "0/40/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 18, 19, 65528, 65529, 65531, 65532, + 65533 + ], + "0/42/0": [], + "0/42/1": true, + "0/42/2": 1, + "0/42/3": null, + "0/42/65532": 0, + "0/42/65533": 1, + "0/42/65528": [], + "0/42/65529": [0], + "0/42/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/48/0": 0, + "0/48/1": { + "0": 60, + "1": 900 + }, + "0/48/2": 0, + "0/48/3": 0, + "0/48/4": true, + "0/48/65532": 0, + "0/48/65533": 1, + "0/48/65528": [1, 3, 5], + "0/48/65529": [0, 2, 4], + "0/48/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/49/0": 1, + "0/49/1": [ + { + "0": "78ZT6vbYSG4=", + "1": true + } + ], + "0/49/2": 10, + "0/49/3": 20, + "0/49/4": true, + "0/49/5": 0, + "0/49/6": "78ZT6vbYSG4=", + "0/49/7": null, + "0/49/65532": 2, + "0/49/65533": 1, + "0/49/65528": [1, 5, 7], + "0/49/65529": [0, 3, 4, 6, 8], + "0/49/65531": [0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533], + "0/51/0": [ + { + "0": "ieee802154", + "1": true, + "2": null, + "3": null, + "4": "LkZuUiQ6At0=", + "5": [], + "6": [ + "/oAAAAAAAAAsRm5SJDoC3Q==", + "/RSewj1oAACMK0/7Pq2mXw==", + "/SzZ5ehaAAFcRgLbRqdd5Q==" + ], + "7": 4 + } + ], + "0/51/1": 11, + "0/51/2": 216584, + "0/51/3": 4223, + "0/51/5": [], + "0/51/6": [], + "0/51/7": [], + "0/51/8": false, + "0/51/65532": 0, + "0/51/65533": 1, + "0/51/65528": [], + "0/51/65529": [0], + "0/51/65531": [0, 1, 2, 3, 5, 6, 7, 8, 65528, 65529, 65531, 65532, 65533], + "0/53/0": 25, + "0/53/1": 5, + "0/53/2": "MyHome********", + "0/53/3": 4551, + "0/53/4": 17277589289082308718, + "0/53/5": "QP0UnsI9aAAA", + "0/53/6": 0, + "0/53/7": [ + { + "0": 15188750886080278579, + "1": 0, + "2": 47150, + "3": 41193, + "4": 81, + "5": 3, + "6": -65, + "7": -66, + "8": 34, + "9": 8, + "10": false, + "11": false, + "12": false, + "13": true + }, + { + "0": 6213658399517661295, + "1": 0, + "2": 47148, + "3": 342145, + "4": 1340, + "5": 3, + "6": -65, + "7": -65, + "8": 22, + "9": 3, + "10": false, + "11": false, + "12": false, + "13": true + }, + { + "0": 3608747888223923824, + "1": 0, + "2": 47149, + "3": 327943, + "4": 594, + "5": 3, + "6": -65, + "7": -66, + "8": 42, + "9": 7, + "10": false, + "11": false, + "12": false, + "13": true + }, + { + "0": 15185452433711244206, + "1": 0, + "2": 47153, + "3": 29895, + "4": 269, + "5": 3, + "6": -66, + "7": -66, + "8": 3, + "9": 0, + "10": false, + "11": false, + "12": false, + "13": true + }, + { + "0": 2163195351084522891, + "1": 0, + "2": 47152, + "3": 72805, + "4": 304, + "5": 3, + "6": -77, + "7": -78, + "8": 23, + "9": 0, + "10": false, + "11": false, + "12": false, + "13": true + }, + { + "0": 5086511412530643128, + "1": 15, + "2": 5120, + "3": 336500, + "4": 12734, + "5": 3, + "6": -65, + "7": -66, + "8": 89, + "9": 21, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 11742887156395478125, + "1": 15, + "2": 6144, + "3": 324576, + "4": 33346, + "5": 2, + "6": -81, + "7": -83, + "8": 94, + "9": 19, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 6205900145031232602, + "1": 29, + "2": 7168, + "3": 300661, + "4": 8611, + "5": 2, + "6": -83, + "7": -84, + "8": 37, + "9": 3, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 15163764054334418108, + "1": 0, + "2": 10240, + "3": 331802, + "4": 9085, + "5": 3, + "6": -73, + "7": -75, + "8": 8, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 6551600658751898388, + "1": 26, + "2": 13312, + "3": 8292, + "4": 688, + "5": 3, + "6": -77, + "7": -76, + "8": 12, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 17734126393520660548, + "1": 23, + "2": 16384, + "3": 23151, + "4": 5816, + "5": 2, + "6": -80, + "7": -81, + "8": 3, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 11455257964084887050, + "1": 0, + "2": 18432, + "3": 821, + "4": 373, + "5": 2, + "6": -81, + "7": -79, + "8": 11, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 1336785460606859342, + "1": 4, + "2": 24576, + "3": 10008, + "4": 6631, + "5": 3, + "6": -77, + "7": -78, + "8": 33, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 1943517749273230026, + "1": 15, + "2": 25600, + "3": 104546, + "4": 5633, + "5": 2, + "6": -83, + "7": -83, + "8": 6, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 1334557987712014158, + "1": 1, + "2": 28672, + "3": 36131, + "4": 4703, + "5": 2, + "6": -80, + "7": -79, + "8": 15, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 3059534182488563761, + "1": 2, + "2": 32768, + "3": 79061, + "4": 6734, + "5": 3, + "6": -62, + "7": -62, + "8": 73, + "9": 5, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 434921903695134756, + "1": 17, + "2": 34816, + "3": 16983, + "4": 3131, + "5": 1, + "6": -89, + "7": -88, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 4776645791669622945, + "1": 57, + "2": 37888, + "3": 65381, + "4": 20257, + "5": 2, + "6": -83, + "7": -82, + "8": 3, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 8517119984751758255, + "1": 27, + "2": 46080, + "3": 34533, + "4": 4745, + "5": 2, + "6": -80, + "7": -81, + "8": 8, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 14861487343125519459, + "1": 24, + "2": 59392, + "3": 41127, + "4": 4724, + "5": 2, + "6": -83, + "7": -83, + "8": 11, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 17750557866087337571, + "1": 51, + "2": 61440, + "3": 14533, + "4": 4780, + "5": 1, + "6": -93, + "7": -94, + "8": 22, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + } + ], + "0/53/8": [ + { + "0": 5086511412530643128, + "1": 5120, + "2": 5, + "3": 32, + "4": 2, + "5": 3, + "6": 2, + "7": 16, + "8": true, + "9": true + }, + { + "0": 11742887156395478125, + "1": 6144, + "2": 6, + "3": 37, + "4": 1, + "5": 2, + "6": 3, + "7": 16, + "8": true, + "9": true + }, + { + "0": 6205900145031232602, + "1": 7168, + "2": 7, + "3": 5, + "4": 1, + "5": 2, + "6": 0, + "7": 30, + "8": true, + "9": true + }, + { + "0": 15163764054334418108, + "1": 10240, + "2": 10, + "3": 32, + "4": 1, + "5": 3, + "6": 1, + "7": 0, + "8": true, + "9": true + }, + { + "0": 6551600658751898388, + "1": 13312, + "2": 13, + "3": 32, + "4": 2, + "5": 3, + "6": 1, + "7": 27, + "8": true, + "9": true + }, + { + "0": 13472614297978576343, + "1": 15360, + "2": 15, + "3": 32, + "4": 4, + "5": 0, + "6": 0, + "7": 6, + "8": true, + "9": false + }, + { + "0": 17734126393520660548, + "1": 16384, + "2": 16, + "3": 5, + "4": 1, + "5": 2, + "6": 1, + "7": 24, + "8": true, + "9": true + }, + { + "0": 11455257964084887050, + "1": 18432, + "2": 18, + "3": 32, + "4": 2, + "5": 2, + "6": 0, + "7": 2, + "8": true, + "9": true + }, + { + "0": 1336785460606859342, + "1": 24576, + "2": 24, + "3": 32, + "4": 2, + "5": 3, + "6": 1, + "7": 5, + "8": true, + "9": true + }, + { + "0": 1943517749273230026, + "1": 25600, + "2": 25, + "3": 32, + "4": 1, + "5": 2, + "6": 1, + "7": 16, + "8": true, + "9": true + }, + { + "0": 1334557987712014158, + "1": 28672, + "2": 28, + "3": 32, + "4": 1, + "5": 2, + "6": 1, + "7": 2, + "8": true, + "9": true + }, + { + "0": 3059534182488563761, + "1": 32768, + "2": 32, + "3": 5, + "4": 2, + "5": 3, + "6": 3, + "7": 2, + "8": true, + "9": true + }, + { + "0": 434921903695134756, + "1": 34816, + "2": 34, + "3": 32, + "4": 2, + "5": 1, + "6": 0, + "7": 17, + "8": true, + "9": true + }, + { + "0": 0, + "1": 36864, + "2": 36, + "3": 5, + "4": 1, + "5": 0, + "6": 0, + "7": 218, + "8": true, + "9": false + }, + { + "0": 4776645791669622945, + "1": 37888, + "2": 37, + "3": 32, + "4": 2, + "5": 2, + "6": 2, + "7": 57, + "8": true, + "9": true + }, + { + "0": 0, + "1": 38912, + "2": 38, + "3": 5, + "4": 1, + "5": 0, + "6": 0, + "7": 135, + "8": true, + "9": false + }, + { + "0": 0, + "1": 40960, + "2": 40, + "3": 5, + "4": 1, + "5": 0, + "6": 0, + "7": 57, + "8": true, + "9": false + }, + { + "0": 0, + "1": 41984, + "2": 41, + "3": 32, + "4": 3, + "5": 0, + "6": 0, + "7": 172, + "8": true, + "9": false + }, + { + "0": 0, + "1": 43008, + "2": 42, + "3": 5, + "4": 2, + "5": 0, + "6": 0, + "7": 29, + "8": true, + "9": false + }, + { + "0": 8813088355503224885, + "1": 44032, + "2": 43, + "3": 32, + "4": 2, + "5": 0, + "6": 0, + "7": 7, + "8": true, + "9": false + }, + { + "0": 8517119984751758255, + "1": 46080, + "2": 45, + "3": 32, + "4": 1, + "5": 2, + "6": 1, + "7": 27, + "8": true, + "9": true + }, + { + "0": 3334473873188586205, + "1": 47104, + "2": 46, + "3": 63, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": true, + "9": false + }, + { + "0": 3633986594937726866, + "1": 49152, + "2": 48, + "3": 5, + "4": 2, + "5": 0, + "6": 0, + "7": 5, + "8": true, + "9": false + }, + { + "0": 0, + "1": 52224, + "2": 51, + "3": 5, + "4": 4, + "5": 0, + "6": 0, + "7": 4, + "8": true, + "9": false + }, + { + "0": 0, + "1": 54272, + "2": 53, + "3": 5, + "4": 4, + "5": 0, + "6": 0, + "7": 4, + "8": true, + "9": false + }, + { + "0": 0, + "1": 57344, + "2": 56, + "3": 5, + "4": 2, + "5": 0, + "6": 0, + "7": 70, + "8": true, + "9": false + }, + { + "0": 0, + "1": 58368, + "2": 57, + "3": 5, + "4": 2, + "5": 0, + "6": 0, + "7": 62, + "8": true, + "9": false + }, + { + "0": 14861487343125519459, + "1": 59392, + "2": 58, + "3": 32, + "4": 2, + "5": 2, + "6": 0, + "7": 25, + "8": true, + "9": true + }, + { + "0": 6790899548533368178, + "1": 60416, + "2": 59, + "3": 32, + "4": 2, + "5": 0, + "6": 0, + "7": 39, + "8": true, + "9": false + }, + { + "0": 17750557866087337571, + "1": 61440, + "2": 60, + "3": 5, + "4": 1, + "5": 1, + "6": 0, + "7": 52, + "8": true, + "9": true + }, + { + "0": 438305107144379357, + "1": 62464, + "2": 61, + "3": 32, + "4": 2, + "5": 0, + "6": 0, + "7": 4, + "8": true, + "9": false + } + ], + "0/53/9": 1615974939, + "0/53/10": 64, + "0/53/11": 187, + "0/53/12": 251, + "0/53/13": 43, + "0/53/14": 9, + "0/53/15": 6, + "0/53/16": 5, + "0/53/17": 3, + "0/53/18": 4, + "0/53/19": 8, + "0/53/20": 7, + "0/53/21": 3, + "0/53/22": 128471, + "0/53/23": 106978, + "0/53/24": 21493, + "0/53/25": 106978, + "0/53/26": 95581, + "0/53/27": 21493, + "0/53/28": 128500, + "0/53/29": 0, + "0/53/30": 0, + "0/53/31": 0, + "0/53/32": 0, + "0/53/33": 188394, + "0/53/34": 4365, + "0/53/35": 7032, + "0/53/36": 180, + "0/53/37": 0, + "0/53/38": 7, + "0/53/39": 11955758, + "0/53/40": 572966, + "0/53/41": 241075, + "0/53/42": 322104, + "0/53/43": 439875, + "0/53/44": 0, + "0/53/45": 0, + "0/53/46": 1, + "0/53/47": 0, + "0/53/48": 10911680, + "0/53/49": 47933, + "0/53/50": 103874, + "0/53/51": 12628, + "0/53/52": 0, + "0/53/53": 4128, + "0/53/54": 72487, + "0/53/55": 41048, + "0/53/59": { + "0": 672, + "1": 8335 + }, + "0/53/60": "AB//wA==", + "0/53/61": { + "0": true, + "1": false, + "2": true, + "3": true, + "4": true, + "5": true, + "6": false, + "7": true, + "8": true, + "9": true, + "10": true, + "11": true + }, + "0/53/62": [0, 0, 0, 0], + "0/53/65532": 15, + "0/53/65533": 1, + "0/53/65528": [], + "0/53/65529": [0], + "0/53/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 59, + 60, 61, 62, 65528, 65529, 65531, 65532, 65533 + ], + "0/60/0": 0, + "0/60/1": null, + "0/60/2": null, + "0/60/65532": 0, + "0/60/65533": 1, + "0/60/65528": [], + "0/60/65529": [0, 1, 2], + "0/60/65531": [0, 1, 2, 65528, 65529, 65531, 65532, 65533], + "0/62/0": [ + { + "1": "FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVAiQRxxgkBwEkCAEwCUEEmpkPzsEbiQhfa6aMvzXOHxM6nbEZRf97JY6xYgrHSUrqXDN2JnLHxxjp9Vs4xRubpGTCz7RQvjlYUJdaM5HLCDcKNQEoARgkAgE2AwQCBAEYMAQUs/UL2M+UNzFWQ7xgcdZ3S5t3De8wBRT/JG5bPRHFqkrJE98D5ZSVOj5EWxgwC0A2pU68guK7g/KUP7+gqkZ/s8VbQCyhMtxbamMFedKDazu/RRDGJ/h/fln6U6NH3Y59kes23YUEWaQZUboiCGfiGA==", + "2": "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEUKENPQRtOhZDKlRflp0Cxu1DKOlL6bvw7pA7H6bHiJCnphRQKcU6D5yaa2KYkWhynF8bYUqBlUT2v0KmrRyrLzcKNQEpARgkAmAwBBT/JG5bPRHFqkrJE98D5ZSVOj5EWzAFFNvb2flPzyP8U2er1dDqBaHHwy8aGDALQPB/fkQ2Yh7PzFIf4NAa+6gxMR3BrIjxX1dqxCMmT7+B4fKaZAMsuDbxGgt7PPD1i/ctKuQsDgFA9PmkHjUob9sY", + "254": 3 + } + ], + "0/62/1": [ + { + "1": "BFX0o1x76dBsQSmQaeacYfEg2XTtXTA/HUvQXsScrTTIDRR2sgrSnRkQyNUmFpk33JTEUtJ9uQDX70FJAxWM+Is=", + "2": 4939, + "3": 2, + "4": 199, + "5": "USCSS Nostromo", + "254": 3 + } + ], + "0/62/2": 6, + "0/62/3": 4, + "0/62/4": [ + "FTABAQAkAgE3AycUxxt9sfxycj8mFZkiBagYJgQNz0YtJAUANwYnFMcbfbH8cnI/JhWZIgWoGCQHASQIATAJQQTGlfTQVqZk2GnxHCh364hEd0J4+rUEblxiWQDmYIienGmHY50RviHxI+875LHFTo9rcntChj+TPxP00yUIw3yoNwo1ASkBGCQCYDAEFK5Ln3+cjAgPxBcWXXzMO1MEyW6oMAUUrkuff5yMCA/EFxZdfMw7UwTJbqgYMAtAleRSrdtPawWmPJ2A0t6EFlYTVKtqseAiuHxSwE+U4sEeL+QCO9OCT6f1bsTzD5KDjqTBlWPSjeUDfd5u61o30Bg=", + "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEVfSjXHvp0GxBKZBp5pxh8SDZdO1dMD8dS9BexJytNMgNFHayCtKdGRDI1SYWmTfclMRS0n25ANfvQUkDFYz4izcKNQEpARgkAmAwBBTb29n5T88j/FNnq9XQ6gWhx8MvGjAFFNvb2flPzyP8U2er1dDqBaHHwy8aGDALQPT1qrwqgZgdH6jmHxvKQDVkzItZOjsIGrSHQTcGenPnIJ5ulcDnzSDAkardY9P1SN+lnJQkfL1QHPgLsRNYqvgY", + "FTABAQAkAgE3AyYU2nLdAyYVbSr9GRgmBKP1RTAkBQA3BiYU2nLdAyYVbSr9GRgkBwEkCAEwCUEENrEEk8M5ztCYkE5UAh3jIAN89pc0KFJ/gbwBIWeN3Ws5aFKjFWCndluUHWDEWPtSMxWTrno8vATU3x8j+yycijcKNQEpARgkAmAwBBQErHkbm0I53zyvS+R5vrTzJR1doTAFFASseRubQjnfPK9L5Hm+tPMlHV2hGDALQKbYYjG6J3YkPq2p3NL/XYSi3/Uux7sO0galcxuWCzGJMmBOWYi9diGLS5ZxxcY5fGSK/3bMMbBJWBN+HTj4BX0Y", + "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEBnH+cL01MPCuWvU4k4koXYt+1hkj5g/U4fAh8UNlRizetXtHmrL2PqftEE29qfcid3Sxq0Es++l1TWi8cE0u2DcKNQEpARgkAmAwBBRZqF7Hw3KTo6v1NDzsGwfckQwiJTAFFFmoXsfDcpOjq/U0POwbB9yRDCIlGDALQHuza1TckXIHaVwUMK8+UHSSiy/5JFMgHRKl7Y8jXesCVLcBI+y6DhrTLOKPf2IVSK7XZzhcSXrKyt+CYHqbXzEY" + ], + "0/62/5": 3, + "0/62/65532": 0, + "0/62/65533": 1, + "0/62/65528": [1, 3, 5, 8], + "0/62/65529": [0, 2, 4, 6, 7, 9, 10, 11], + "0/62/65531": [0, 1, 2, 3, 4, 5, 65528, 65529, 65531, 65532, 65533], + "0/63/0": [], + "0/63/1": [], + "0/63/2": 4, + "0/63/3": 3, + "0/63/65532": 0, + "0/63/65533": 1, + "0/63/65528": [2, 5], + "0/63/65529": [0, 1, 3, 4], + "0/63/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "1/3/0": 0, + "1/3/1": 2, + "1/3/65532": 0, + "1/3/65533": 4, + "1/3/65528": [], + "1/3/65529": [0], + "1/3/65531": [0, 1, 65528, 65529, 65531, 65532, 65533], + "1/4/0": 128, + "1/4/65532": 1, + "1/4/65533": 4, + "1/4/65528": [0, 1, 2, 3], + "1/4/65529": [0, 1, 2, 3, 4, 5], + "1/4/65531": [0, 65528, 65529, 65531, 65532, 65533], + "1/6/0": false, + "1/6/16384": true, + "1/6/16385": 0, + "1/6/16386": 0, + "1/6/16387": null, + "1/6/65532": 1, + "1/6/65533": 4, + "1/6/65528": [], + "1/6/65529": [0, 1, 2, 64, 65, 66], + "1/6/65531": [ + 0, 16384, 16385, 16386, 16387, 65528, 65529, 65531, 65532, 65533 + ], + "1/29/0": [ + { + "0": 266, + "1": 1 + } + ], + "1/29/1": [3, 4, 6, 29, 64, 319486977], + "1/29/2": [], + "1/29/3": [], + "1/29/65532": 0, + "1/29/65533": 1, + "1/29/65528": [], + "1/29/65529": [], + "1/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "1/64/0": [ + { + "0": "id", + "1": "1" + }, + { + "0": "orientation", + "1": "top" + } + ], + "1/64/65532": 0, + "1/64/65533": 1, + "1/64/65528": [], + "1/64/65529": [], + "1/64/65531": [0, 65528, 65529, 65531, 65532, 65533], + "1/319486977/319422464": "AAFpCwIAAAMC8BwEDE9YNDhOMU0wMDk5MpwBAP8EAQIAuPkBAR0BAGABZNAEAAAAAEUFBRAAAABGVAUvIywPAABCBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEkGBQwIEIABRBEFFAAFA9T+//+j4A5ChZadwkcRBYEibyPtI9skeAAAADwAAABIBgUAAAAAAEoGBQAAAAAA", + "1/319486977/319422466": "3i3oAAAAAAAAAAAABwsCDAINAgcCDgEVAQECrA8AEABVAAAC9sMAAQA=", + "1/319486977/319422467": "EhlVAACaMMQADwAA0AQAAAAA", + "1/319486977/319422471": 0, + "1/319486977/319422472": 123.0999984741211, + "1/319486977/319422473": 0.1599999964237213, + "1/319486977/319422474": 13.399999618530273, + "1/319486977/319422475": 18.78033447265625, + "1/319486977/319422476": 0, + "1/319486977/319422478": 0, + "1/319486977/319422481": false, + "1/319486977/319422482": 47104, + "1/319486977/65532": 0, + "1/319486977/65533": 1, + "1/319486977/65528": [], + "1/319486977/65529": [], + "1/319486977/65531": [ + 65528, 65529, 65531, 319422464, 319422465, 319422466, 319422467, + 319422468, 319422469, 319422471, 319422472, 319422473, 319422474, + 319422475, 319422476, 319422478, 319422481, 319422482, 65532, 65533 + ], + "2/3/0": 0, + "2/3/1": 2, + "2/3/65532": 0, + "2/3/65533": 4, + "2/3/65528": [], + "2/3/65529": [0], + "2/3/65531": [0, 1, 65528, 65529, 65531, 65532, 65533], + "2/4/0": 128, + "2/4/65532": 1, + "2/4/65533": 4, + "2/4/65528": [0, 1, 2, 3], + "2/4/65529": [0, 1, 2, 3, 4, 5], + "2/4/65531": [0, 65528, 65529, 65531, 65532, 65533], + "2/6/0": true, + "2/6/16384": true, + "2/6/16385": 0, + "2/6/16386": 0, + "2/6/16387": null, + "2/6/65532": 1, + "2/6/65533": 4, + "2/6/65528": [], + "2/6/65529": [0, 1, 2, 64, 65, 66], + "2/6/65531": [ + 0, 16384, 16385, 16386, 16387, 65528, 65529, 65531, 65532, 65533 + ], + "2/29/0": [ + { + "0": 266, + "1": 1 + } + ], + "2/29/1": [3, 4, 6, 29, 64], + "2/29/2": [], + "2/29/3": [], + "2/29/65532": 0, + "2/29/65533": 1, + "2/29/65528": [], + "2/29/65529": [], + "2/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "2/64/0": [ + { + "0": "id", + "1": "2" + }, + { + "0": "orientation", + "1": "bottom" + } + ], + "2/64/65532": 0, + "2/64/65533": 1, + "2/64/65528": [], + "2/64/65529": [], + "2/64/65531": [0, 65528, 65529, 65531, 65532, 65533] + }, + "attribute_subscriptions": [] +} diff --git a/tests/components/matter/snapshots/test_button.ambr b/tests/components/matter/snapshots/test_button.ambr index 4f2541054c7bbf..4514afa0dc9f6d 100644 --- a/tests/components/matter/snapshots/test_button.ambr +++ b/tests/components/matter/snapshots/test_button.ambr @@ -242,6 +242,55 @@ 'state': 'unknown', }) # --- +# name: test_buttons[aqara_u200][button.aqara_smart_lock_u200_identify-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': , + 'entity_id': 'button.aqara_smart_lock_u200_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Identify', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-1-IdentifyButton-3-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_buttons[aqara_u200][button.aqara_smart_lock_u200_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'Aqara Smart Lock U200 Identify', + }), + 'context': , + 'entity_id': 'button.aqara_smart_lock_u200_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_buttons[color_temperature_light][button.mock_color_temperature_light_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -389,6 +438,104 @@ 'state': 'unknown', }) # --- +# name: test_buttons[eve_energy_20ecn4101][button.eve_energy_20ecn4101_identify_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': , + 'entity_id': 'button.eve_energy_20ecn4101_identify_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Identify (1)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-IdentifyButton-3-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_buttons[eve_energy_20ecn4101][button.eve_energy_20ecn4101_identify_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'Eve Energy 20ECN4101 Identify (1)', + }), + 'context': , + 'entity_id': 'button.eve_energy_20ecn4101_identify_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_buttons[eve_energy_20ecn4101][button.eve_energy_20ecn4101_identify_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': , + 'entity_id': 'button.eve_energy_20ecn4101_identify_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Identify (2)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-2-IdentifyButton-3-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_buttons[eve_energy_20ecn4101][button.eve_energy_20ecn4101_identify_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'Eve Energy 20ECN4101 Identify (2)', + }), + 'context': , + 'entity_id': 'button.eve_energy_20ecn4101_identify_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_buttons[eve_energy_plug][button.eve_energy_plug_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_lock.ambr b/tests/components/matter/snapshots/test_lock.ambr index 4fbf8ddb822023..15cc2354c809a8 100644 --- a/tests/components/matter/snapshots/test_lock.ambr +++ b/tests/components/matter/snapshots/test_lock.ambr @@ -1,4 +1,54 @@ # serializer version: 1 +# name: test_locks[aqara_u200][lock.aqara_smart_lock_u200-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'lock', + 'entity_category': None, + 'entity_id': 'lock.aqara_smart_lock_u200', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-1-MatterLock-257-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_locks[aqara_u200][lock.aqara_smart_lock_u200-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'changed_by': 'Unknown', + 'friendly_name': 'Aqara Smart Lock U200', + 'supported_features': , + }), + 'context': , + 'entity_id': 'lock.aqara_smart_lock_u200', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'locked', + }) +# --- # name: test_locks[door_lock][lock.mock_door_lock-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_number.ambr b/tests/components/matter/snapshots/test_number.ambr index da92410c055f10..cd0f0b3fff1b77 100644 --- a/tests/components/matter/snapshots/test_number.ambr +++ b/tests/components/matter/snapshots/test_number.ambr @@ -57,6 +57,121 @@ 'state': '30', }) # --- +# name: test_numbers[aqara_u200][number.aqara_smart_lock_u200_user_code_temporary_disable_time-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'max': 255, + 'min': 1, + 'mode': , + 'step': 1, + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'number', + 'entity_category': , + 'entity_id': 'number.aqara_smart_lock_u200_user_code_temporary_disable_time', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'User code temporary disable time', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'user_code_temporary_disable_time', + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-1-DoorLockUserCodeTemporaryDisableTime-257-49', + 'unit_of_measurement': , + }) +# --- +# name: test_numbers[aqara_u200][number.aqara_smart_lock_u200_user_code_temporary_disable_time-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Aqara Smart Lock U200 User code temporary disable time', + 'max': 255, + 'min': 1, + 'mode': , + 'step': 1, + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'number.aqara_smart_lock_u200_user_code_temporary_disable_time', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '60', + }) +# --- +# name: test_numbers[aqara_u200][number.aqara_smart_lock_u200_wrong_code_limit-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'max': 255, + 'min': 1, + 'mode': , + 'step': 1, + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'number', + 'entity_category': , + 'entity_id': 'number.aqara_smart_lock_u200_wrong_code_limit', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Wrong code limit', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wrong_code_entry_limit', + 'unique_id': '00000000000004D2-0000000000000014-MatterNodeDevice-1-DoorLockWrongCodeEntryLimit-257-48', + 'unit_of_measurement': None, + }) +# --- +# name: test_numbers[aqara_u200][number.aqara_smart_lock_u200_wrong_code_limit-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Aqara Smart Lock U200 Wrong code limit', + 'max': 255, + 'min': 1, + 'mode': , + 'step': 1, + }), + 'context': , + 'entity_id': 'number.aqara_smart_lock_u200_wrong_code_limit', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '10', + }) +# --- # name: test_numbers[color_temperature_light][number.mock_color_temperature_light_on_level-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_select.ambr b/tests/components/matter/snapshots/test_select.ambr index e7283f5bdef612..5dfc7ba90c009f 100644 --- a/tests/components/matter/snapshots/test_select.ambr +++ b/tests/components/matter/snapshots/test_select.ambr @@ -682,6 +682,128 @@ 'state': 'silent', }) # --- +# name: test_selects[eve_energy_20ecn4101][select.eve_energy_20ecn4101_power_on_behavior_on_startup_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'on', + 'off', + 'toggle', + 'previous', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Power-on behavior on startup (1)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'startup_on_off', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-MatterStartUpOnOff-6-16387', + 'unit_of_measurement': None, + }) +# --- +# name: test_selects[eve_energy_20ecn4101][select.eve_energy_20ecn4101_power_on_behavior_on_startup_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Eve Energy 20ECN4101 Power-on behavior on startup (1)', + 'options': list([ + 'on', + 'off', + 'toggle', + 'previous', + ]), + }), + 'context': , + 'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'previous', + }) +# --- +# name: test_selects[eve_energy_20ecn4101][select.eve_energy_20ecn4101_power_on_behavior_on_startup_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'on', + 'off', + 'toggle', + 'previous', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Power-on behavior on startup (2)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'startup_on_off', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-2-MatterStartUpOnOff-6-16387', + 'unit_of_measurement': None, + }) +# --- +# name: test_selects[eve_energy_20ecn4101][select.eve_energy_20ecn4101_power_on_behavior_on_startup_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Eve Energy 20ECN4101 Power-on behavior on startup (2)', + 'options': list([ + 'on', + 'off', + 'toggle', + 'previous', + ]), + }), + 'context': , + 'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'previous', + }) +# --- # name: test_selects[eve_energy_plug][select.eve_energy_plug_power_on_behavior_on_startup-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_sensor.ambr b/tests/components/matter/snapshots/test_sensor.ambr index 41cf65d8ed3f42..05b63964e0c991 100644 --- a/tests/components/matter/snapshots/test_sensor.ambr +++ b/tests/components/matter/snapshots/test_sensor.ambr @@ -1622,6 +1622,118 @@ 'state': '37.0', }) # --- +# name: test_sensors[aqara_u200][sensor.aqara_smart_lock_u200_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + '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': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.aqara_smart_lock_u200_battery_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + '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[battery_storage][sensor.mock_battery_storage_active_current-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2323,6 +2435,230 @@ 'state': '3.558', }) # --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-EveEnergySensorWattCurrent-319486977-319422473', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'current', + 'friendly_name': 'Eve Energy 20ECN4101 Current', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.eve_energy_20ecn4101_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.159999996423721', + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 3, + }), + }), + '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-00000000000000C7-MatterNodeDevice-1-EveEnergySensorWattAccumulated-319486977-319422475', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Eve Energy 20ECN4101 Energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.eve_energy_20ecn4101_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '18.7803344726562', + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + '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-00000000000000C7-MatterNodeDevice-1-EveEnergySensorWatt-319486977-319422474', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Eve Energy 20ECN4101 Power', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.eve_energy_20ecn4101_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '13.3999996185303', + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.eve_energy_20ecn4101_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + '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': , + }) +# --- +# name: test_sensors[eve_energy_20ecn4101][sensor.eve_energy_20ecn4101_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'Eve Energy 20ECN4101 Voltage', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.eve_energy_20ecn4101_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '123.099998474121', + }) +# --- # name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_switch.ambr b/tests/components/matter/snapshots/test_switch.ambr index eb5c97501a193b..ad13a448030ada 100644 --- a/tests/components/matter/snapshots/test_switch.ambr +++ b/tests/components/matter/snapshots/test_switch.ambr @@ -291,6 +291,104 @@ 'state': 'off', }) # --- +# name: test_switches[eve_energy_20ecn4101][switch.eve_energy_20ecn4101_switch_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.eve_energy_20ecn4101_switch_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Switch (1)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'switch', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-1-MatterPlug-6-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_switches[eve_energy_20ecn4101][switch.eve_energy_20ecn4101_switch_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Eve Energy 20ECN4101 Switch (1)', + }), + 'context': , + 'entity_id': 'switch.eve_energy_20ecn4101_switch_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_switches[eve_energy_20ecn4101][switch.eve_energy_20ecn4101_switch_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.eve_energy_20ecn4101_switch_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Switch (2)', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'switch', + 'unique_id': '00000000000004D2-00000000000000C7-MatterNodeDevice-2-MatterPlug-6-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_switches[eve_energy_20ecn4101][switch.eve_energy_20ecn4101_switch_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Eve Energy 20ECN4101 Switch (2)', + }), + 'context': , + 'entity_id': 'switch.eve_energy_20ecn4101_switch_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- # name: test_switches[eve_energy_plug][switch.eve_energy_plug-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/mobile_app/test_device_tracker.py b/tests/components/mobile_app/test_device_tracker.py index 6272b0ea8935fd..46e3b6e5e6a1bf 100644 --- a/tests/components/mobile_app/test_device_tracker.py +++ b/tests/components/mobile_app/test_device_tracker.py @@ -57,12 +57,12 @@ async def setup_zone(hass: HomeAssistant) -> None: ( {"gps": [20, 30], "location_name": "office"}, {"latitude": 20, "longitude": 30, "gps_accuracy": 30}, - "office", + "Office", ), ( {"gps": [30, 40], "location_name": "school"}, {"latitude": 30, "longitude": 40, "gps_accuracy": 30}, - "school", + "School", ), # Send wrong coordinates + location_name: Location name has precedence ( @@ -73,17 +73,17 @@ async def setup_zone(hass: HomeAssistant) -> None: ( {"gps": [10, 10], "location_name": "office"}, {"latitude": 10, "longitude": 10, "gps_accuracy": 30}, - "office", + "Office", ), ( {"gps": [10, 10], "location_name": "school"}, {"latitude": 10, "longitude": 10, "gps_accuracy": 30}, - "school", + "School", ), # Send location_name only ({"location_name": "home"}, {}, "home"), - ({"location_name": "office"}, {}, "office"), - ({"location_name": "school"}, {}, "school"), + ({"location_name": "office"}, {}, "Office"), + ({"location_name": "school"}, {}, "School"), # Send coordinates only - location is determined by coordinates ( {"gps": [10, 20]}, diff --git a/tests/components/onewire/snapshots/test_diagnostics.ambr b/tests/components/onewire/snapshots/test_diagnostics.ambr index b65506e60b3d0e..1b1d4a0b30bc97 100644 --- a/tests/components/onewire/snapshots/test_diagnostics.ambr +++ b/tests/components/onewire/snapshots/test_diagnostics.ambr @@ -1,4 +1,45 @@ # serializer version: 1 +# name: test_device_diagnostics[EF.111111111113] + dict({ + 'device': dict({ + 'device_info': dict({ + 'identifiers': list([ + list([ + 'onewire', + 'EF.111111111113', + ]), + ]), + 'manufacturer': 'Hobby Boards', + 'model': None, + 'model_id': 'HB_HUB', + 'name': 'EF.111111111113', + 'serial_number': '111111111113', + 'sw_version': '3.2', + }), + 'family': 'EF', + 'id': 'EF.111111111113', + 'path': '/EF.111111111113/', + 'type': 'HB_HUB', + }), + 'entry': dict({ + 'data': dict({ + 'host': '**REDACTED**', + 'port': 1234, + }), + 'options': dict({ + 'device_options': dict({ + '28.222222222222': dict({ + 'precision': 'temperature9', + }), + '28.222222222223': dict({ + 'precision': 'temperature5', + }), + }), + }), + 'title': 'Mock Title', + }), + }) +# --- # name: test_entry_diagnostics[EF.111111111113] dict({ 'devices': list([ diff --git a/tests/components/onewire/test_diagnostics.py b/tests/components/onewire/test_diagnostics.py index 60b57bd14f7102..de444a1186975d 100644 --- a/tests/components/onewire/test_diagnostics.py +++ b/tests/components/onewire/test_diagnostics.py @@ -6,13 +6,18 @@ import pytest from syrupy.assertion import SnapshotAssertion +from homeassistant.components.onewire import DOMAIN from homeassistant.const import Platform from homeassistant.core import HomeAssistant +from homeassistant.helpers import device_registry as dr from . import setup_owproxy_mock_devices from tests.common import MockConfigEntry -from tests.components.diagnostics import get_diagnostics_for_config_entry +from tests.components.diagnostics import ( + get_diagnostics_for_config_entry, + get_diagnostics_for_device, +) from tests.typing import ClientSessionGenerator @@ -41,3 +46,27 @@ async def test_entry_diagnostics( await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == snapshot ) + + +@pytest.mark.parametrize("device_id", ["EF.111111111113"], indirect=True) +async def test_device_diagnostics( + hass: HomeAssistant, + config_entry: MockConfigEntry, + device_registry: dr.DeviceRegistry, + hass_client: ClientSessionGenerator, + owproxy: MagicMock, + device_id: str, + snapshot: SnapshotAssertion, +) -> None: + """Test device diagnostics.""" + setup_owproxy_mock_devices(owproxy, [device_id]) + await hass.config_entries.async_setup(config_entry.entry_id) + await hass.async_block_till_done() + + device = device_registry.async_get_device(identifiers={(DOMAIN, "EF.111111111113")}) + assert device is not None + + assert ( + await get_diagnostics_for_device(hass, hass_client, config_entry, device) + == snapshot + ) diff --git a/tests/components/shelly/test_repairs.py b/tests/components/shelly/test_repairs.py index d5d01402877023..7597e2076494c5 100644 --- a/tests/components/shelly/test_repairs.py +++ b/tests/components/shelly/test_repairs.py @@ -1,6 +1,6 @@ """Test repairs handling for Shelly.""" -from unittest.mock import Mock +from unittest.mock import Mock, patch from aioshelly.const import MODEL_WALL_DISPLAY from aioshelly.exceptions import DeviceConnectionError, RpcCallError @@ -9,10 +9,11 @@ from homeassistant.components.shelly.const import ( BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID, CONF_BLE_SCANNER_MODE, + DEPRECATED_FIRMWARE_ISSUE_ID, DOMAIN, OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID, - WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID, BLEScannerMode, + DeprecatedFirmwareInfo, ) from homeassistant.core import HomeAssistant from homeassistant.helpers import issue_registry as ir @@ -215,17 +216,25 @@ async def test_outbound_websocket_incorrectly_enabled_issue_exc( assert len(issue_registry.issues) == 1 -async def test_wall_display_unsupported_firmware_issue( +async def test_deprecated_firmware_issue( hass: HomeAssistant, hass_client: ClientSessionGenerator, mock_rpc_device: Mock, issue_registry: ir.IssueRegistry, ) -> None: - """Test repair issues handling for Wall Display with unsupported firmware.""" - issue_id = WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID.format(unique=MOCK_MAC) + """Test repair issues handling deprecated firmware.""" + issue_id = DEPRECATED_FIRMWARE_ISSUE_ID.format(unique=MOCK_MAC) assert await async_setup_component(hass, "repairs", {}) await hass.async_block_till_done() - await init_integration(hass, 2, model=MODEL_WALL_DISPLAY) + with patch( + "homeassistant.components.shelly.repairs.DEPRECATED_FIRMWARES", + { + MODEL_WALL_DISPLAY: DeprecatedFirmwareInfo( + {"min_firmware": "2.3.0", "ha_version": "2025.10.0"} + ) + }, + ): + await init_integration(hass, 2, model=MODEL_WALL_DISPLAY) # The default fw version in tests is 1.0.0, the repair issue should be created. assert issue_registry.async_get_issue(DOMAIN, issue_id) diff --git a/tests/components/smartthings/conftest.py b/tests/components/smartthings/conftest.py index 393b6b4e3d6741..7840cf40777677 100644 --- a/tests/components/smartthings/conftest.py +++ b/tests/components/smartthings/conftest.py @@ -126,6 +126,7 @@ def mock_smartthings() -> Generator[AsyncMock]: "da_sac_ehs_000002_sub", "da_ac_ehs_01001", "da_wm_dw_000001", + "da_wm_wd_01011", "da_wm_wd_000001", "da_wm_wd_000001_1", "da_wm_wm_01011", diff --git a/tests/components/smartthings/fixtures/device_status/da_wm_wd_01011.json b/tests/components/smartthings/fixtures/device_status/da_wm_wd_01011.json new file mode 100644 index 00000000000000..6169a7839b9cb4 --- /dev/null +++ b/tests/components/smartthings/fixtures/device_status/da_wm_wd_01011.json @@ -0,0 +1,1013 @@ +{ + "components": { + "hca.main": { + "hca.dryerMode": { + "mode": { + "value": "others", + "timestamp": "2025-10-16T09:03:25.402Z" + }, + "supportedModes": { + "value": ["quickDry", "timeDry"], + "timestamp": "2025-10-16T08:43:36.089Z" + } + } + }, + "main": { + "custom.dryerWrinklePrevent": { + "operatingState": { + "value": "ready", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "dryerWrinklePrevent": { + "value": "off", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.dryerDryingTemperature": { + "dryingTemperature": { + "value": null + }, + "supportedDryingTemperature": { + "value": null + } + }, + "samsungce.welcomeMessage": { + "welcomeMessage": { + "value": null + } + }, + "samsungce.clothingExtraCare": { + "operationMode": { + "value": "off", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "userLocation": { + "value": "indoor", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.dryerCyclePreset": { + "maxNumberOfPresets": { + "value": 10, + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "presets": { + "value": { + "F1": {}, + "F2": {}, + "F3": {}, + "F4": {}, + "F5": {}, + "F6": {}, + "F7": {}, + "F8": {}, + "F9": {}, + "FA": {} + }, + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.deviceIdentification": { + "micomAssayCode": { + "value": "80010141", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "modelName": { + "value": null + }, + "serialNumber": { + "value": null + }, + "serialNumberExtra": { + "value": null + }, + "modelClassificationCode": { + "value": "30010102001911004AA3039F00820000", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "description": { + "value": "DA_WM_TP1_21_COMMON_DV8400D/DC91-00067A_CC5E", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "releaseYear": { + "value": null + }, + "binaryId": { + "value": "DA_WM_TP1_21_COMMON", + "timestamp": "2025-10-16T09:45:07.937Z" + } + }, + "switch": { + "switch": { + "value": "off", + "timestamp": "2025-10-16T09:45:07.937Z" + } + }, + "samsungce.quickControl": { + "version": { + "value": "1.0", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.dryerFreezePrevent": { + "operatingState": { + "value": null + } + }, + "ocf": { + "st": { + "value": null + }, + "mndt": { + "value": null + }, + "mnfv": { + "value": "DA_WM_TP1_21_COMMON_30250508", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnhw": { + "value": "Realtek", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "di": { + "value": "3d39866c-7716-5259-44f0-fd7025efd85f", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnsl": { + "value": "http://www.samsung.com", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "dmv": { + "value": "1.2.1", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "n": { + "value": "[dryer] Samsung", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnmo": { + "value": "DA_WM_TP1_21_COMMON|80010141|30010102001911004AA3039F00820000", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "vid": { + "value": "DA-WM-WD-01011", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnmn": { + "value": "Samsung Electronics", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnml": { + "value": "http://www.samsung.com", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnpv": { + "value": "DAWIT 2.0", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "mnos": { + "value": "TizenRT 3.1", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "pi": { + "value": "3d39866c-7716-5259-44f0-fd7025efd85f", + "timestamp": "2025-10-04T09:17:12.642Z" + }, + "icv": { + "value": "core.1.1.0", + "timestamp": "2025-10-04T09:17:12.642Z" + } + }, + "custom.dryerDryLevel": { + "dryerDryLevel": { + "value": "normal", + "timestamp": "2025-10-16T09:03:25.456Z" + }, + "supportedDryerDryLevel": { + "value": ["none", "damp", "less", "normal", "more"], + "timestamp": "2025-10-04T09:10:44.838Z" + } + }, + "samsungce.dryerAutoCycleLink": { + "dryerAutoCycleLink": { + "value": "off", + "timestamp": "2025-10-16T08:43:29.542Z" + } + }, + "samsungce.dryerCycle": { + "dryerCycle": { + "value": "Table_03_Course_51", + "timestamp": "2025-10-16T09:03:25.402Z" + }, + "supportedCycles": { + "value": [ + { + "cycle": "51", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D31E", + "default": "normal", + "options": ["damp", "less", "normal", "more"] + } + } + }, + { + "cycle": "53", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D31E", + "default": "normal", + "options": ["damp", "less", "normal", "more"] + } + } + }, + { + "cycle": "23", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D000", + "default": "none", + "options": [] + } + } + }, + { + "cycle": "17", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D31E", + "default": "normal", + "options": ["damp", "less", "normal", "more"] + } + } + }, + { + "cycle": "18", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D20C", + "default": "less", + "options": ["less", "normal"] + } + } + }, + { + "cycle": "19", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D20C", + "default": "less", + "options": ["less", "normal"] + } + } + }, + { + "cycle": "1D", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D318", + "default": "normal", + "options": ["normal", "more"] + } + } + }, + { + "cycle": "1B", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D318", + "default": "normal", + "options": ["normal", "more"] + } + } + }, + { + "cycle": "1C", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D308", + "default": "normal", + "options": ["normal"] + } + } + }, + { + "cycle": "21", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D410", + "default": "more", + "options": ["more"] + } + } + }, + { + "cycle": "1A", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D102", + "default": "damp", + "options": ["damp"] + } + } + }, + { + "cycle": "1E", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D308", + "default": "normal", + "options": ["normal"] + } + } + }, + { + "cycle": "22", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D308", + "default": "normal", + "options": ["normal"] + } + } + }, + { + "cycle": "20", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D102", + "default": "damp", + "options": ["damp"] + } + } + }, + { + "cycle": "27", + "supportedOptions": { + "dryingTime": { + "raw": "010007FE", + "default": "20", + "options": [ + "20", + "30", + "40", + "50", + "60", + "90", + "120", + "150", + "180", + "240" + ] + }, + "dryingLevel": { + "raw": "D000", + "default": "none", + "options": [] + } + } + }, + { + "cycle": "25", + "supportedOptions": { + "dryingTime": { + "raw": "020007FE", + "default": "30", + "options": [ + "20", + "30", + "40", + "50", + "60", + "90", + "120", + "150", + "180", + "240" + ] + }, + "dryingLevel": { + "raw": "D000", + "default": "none", + "options": [] + } + } + }, + { + "cycle": "24", + "supportedOptions": { + "dryingTime": { + "raw": "020007FE", + "default": "30", + "options": [ + "20", + "30", + "40", + "50", + "60", + "90", + "120", + "150", + "180", + "240" + ] + }, + "dryingLevel": { + "raw": "D000", + "default": "none", + "options": [] + } + } + }, + { + "cycle": "4E", + "supportedOptions": { + "dryingTime": { + "raw": "09000200", + "default": "180", + "options": ["180"] + }, + "dryingLevel": { + "raw": "D000", + "default": "none", + "options": [] + } + } + }, + { + "cycle": "4C", + "supportedOptions": { + "dryingTime": { + "raw": "00000000", + "default": "0", + "options": [] + }, + "dryingLevel": { + "raw": "D21C", + "default": "less", + "options": ["less", "normal", "more"] + } + } + } + ], + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "referenceTable": { + "value": { + "id": "Table_03" + }, + "timestamp": "2025-10-16T08:43:38.650Z" + }, + "specializedFunctionClassification": { + "value": 20, + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.audioVolumeLevel": { + "volumeLevel": { + "value": 3, + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "volumeLevelRange": { + "value": { + "minimum": 0, + "maximum": 3, + "step": 1 + }, + "data": {}, + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": [ + "samsungce.selfCheck", + "logTrigger", + "sec.smartthingsHub", + "samsungce.dryerFreezePrevent", + "samsungce.dryerDryingTemperature" + ], + "timestamp": "2025-10-04T09:10:44.838Z" + } + }, + "logTrigger": { + "logState": { + "value": null + }, + "logRequestState": { + "value": null + }, + "logInfo": { + "value": null + } + }, + "samsungce.driverVersion": { + "versionNumber": { + "value": 25040101, + "timestamp": "2025-10-04T09:10:44.838Z" + } + }, + "sec.diagnosticsInformation": { + "logType": { + "value": ["errCode", "dump"], + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "endpoint": { + "value": "SSM", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "minVersion": { + "value": "3.0", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "signinPermission": { + "value": null + }, + "setupId": { + "value": "DRC", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "protocolType": { + "value": "ble_ocf", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "tsId": { + "value": "DA01", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "mnId": { + "value": "0AJT", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "dumpType": { + "value": "file", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.dryerLabelScanCyclePreset": { + "presets": { + "value": { + "FB": {} + }, + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.kidsLock": { + "lockState": { + "value": "unlocked", + "timestamp": "2025-10-16T08:43:29.503Z" + } + }, + "demandResponseLoadControl": { + "drlcStatus": { + "value": { + "drlcType": 1, + "drlcLevel": 2, + "start": "2025-10-16T08:43:29Z", + "duration": 1366, + "override": false + }, + "timestamp": "2025-10-16T08:43:30.012Z" + } + }, + "samsungce.detergentOrder": { + "alarmEnabled": { + "value": false, + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "orderThreshold": { + "value": 5, + "unit": "ea", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "powerConsumptionReport": { + "powerConsumption": { + "value": { + "energy": 16900, + "deltaEnergy": 0, + "power": 0, + "powerEnergy": 0.0, + "persistedEnergy": 0, + "energySaved": 0, + "persistedSavedEnergy": 1387, + "start": "2025-10-16T09:03:25Z", + "end": "2025-10-16T09:45:07Z" + }, + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "dryerOperatingState": { + "completionTime": { + "value": "2025-10-16T14:15:07Z", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "machineState": { + "value": "stop", + "timestamp": "2025-10-16T09:03:25.452Z" + }, + "supportedMachineStates": { + "value": ["stop", "run", "pause"], + "timestamp": "2025-10-16T08:43:29.612Z" + }, + "dryerJobState": { + "value": "none", + "timestamp": "2025-10-16T09:03:28.210Z" + } + }, + "samsungce.detergentState": { + "remainingAmount": { + "value": 0, + "unit": "ea", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "dosage": { + "value": 1, + "unit": "ea", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "initialAmount": { + "value": 0, + "unit": "ea", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "detergentType": { + "value": "drySheet", + "timestamp": "2025-10-04T09:29:09.476Z" + } + }, + "samsungce.dryerDelayEnd": { + "remainingTime": { + "value": 0, + "unit": "min", + "timestamp": "2025-10-16T08:43:29.612Z" + } + }, + "refresh": {}, + "custom.jobBeginningStatus": { + "jobBeginningStatus": { + "value": "None", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "execute": { + "data": { + "value": null + } + }, + "sec.wifiConfiguration": { + "autoReconnection": { + "value": true, + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "minVersion": { + "value": "1.0", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "supportedWiFiFreq": { + "value": ["2.4G"], + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "supportedAuthType": { + "value": ["OPEN", "WEP", "WPA-PSK", "WPA2-PSK", "SAE"], + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "protocolType": { + "value": ["helper_hotspot", "ble_ocf"], + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "samsungce.selfCheck": { + "result": { + "value": null + }, + "supportedActions": { + "value": null + }, + "progress": { + "value": null + }, + "errors": { + "value": null + }, + "status": { + "value": null + } + }, + "samsungce.softwareVersion": { + "versions": { + "value": [ + { + "id": "0", + "swType": "Software", + "versionNumber": "02986A250508(A164)", + "description": "DA_WM_TP1_21_COMMON|80010141|30010102001911004AA3039F00820000" + }, + { + "id": "1", + "swType": "Firmware", + "versionNumber": "00101A25021014,00067A25021023", + "description": "Firmware_1_DB_80010141250210140FFFFF800067412502102304FFFF(816580006741FFFFFFFF_30000000)(FileDown:0)(Type:0)" + }, + { + "id": "2", + "swType": "Firmware", + "versionNumber": "00069A25021203,00068A25021203", + "description": "Firmware_2_DB_8000694125021203045FFF8000684125021203042FFF(816580010141FFFFFFFF_30000000)(FileDown:0)(Type:0)" + } + ], + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "remoteControlStatus": { + "remoteControlEnabled": { + "value": "false", + "timestamp": "2025-10-16T09:45:07.940Z" + } + }, + "custom.supportedOptions": { + "course": { + "value": "51", + "timestamp": "2025-10-16T09:03:25.314Z" + }, + "referenceTable": { + "value": { + "id": "Table_03" + }, + "timestamp": "2025-10-16T08:43:38.650Z" + }, + "supportedCourses": { + "value": [ + "51", + "53", + "23", + "17", + "18", + "19", + "1D", + "1B", + "1C", + "21", + "1A", + "1E", + "22", + "20", + "27", + "25", + "24", + "4E", + "4C" + ], + "timestamp": "2025-10-16T08:43:36.089Z" + } + }, + "custom.energyType": { + "energyType": { + "value": "2.0", + "timestamp": "2025-10-04T09:10:44.838Z" + }, + "energySavingSupport": { + "value": true, + "timestamp": "2025-10-04T09:10:49.280Z" + }, + "drMaxDuration": { + "value": 99999999, + "unit": "min", + "timestamp": "2025-10-04T09:10:44.842Z" + }, + "energySavingLevel": { + "value": null + }, + "energySavingInfo": { + "value": null + }, + "supportedEnergySavingLevels": { + "value": null + }, + "energySavingOperation": { + "value": false, + "timestamp": "2025-10-16T08:43:30.012Z" + }, + "notificationTemplateID": { + "value": null + }, + "energySavingOperationSupport": { + "value": true, + "timestamp": "2025-10-04T09:10:44.842Z" + } + }, + "samsungce.dryerOperatingState": { + "operatingState": { + "value": "ready", + "timestamp": "2025-10-16T09:03:25.452Z" + }, + "supportedOperatingStates": { + "value": ["ready", "running", "paused"], + "timestamp": "2025-10-04T09:10:44.838Z" + }, + "scheduledJobs": { + "value": [ + { + "jobName": "drying", + "timeInMin": 18 + }, + { + "jobName": "cooling", + "timeInMin": 1 + } + ], + "timestamp": "2025-10-16T08:43:49.779Z" + }, + "progress": { + "value": 1, + "unit": "%", + "timestamp": "2025-10-16T09:03:25.452Z" + }, + "remainingTimeStr": { + "value": "04:30", + "timestamp": "2025-10-16T09:03:25.452Z" + }, + "dryerJobState": { + "value": "none", + "timestamp": "2025-10-16T09:03:28.210Z" + }, + "remainingTime": { + "value": 270, + "unit": "min", + "timestamp": "2025-10-16T09:03:25.452Z" + } + }, + "samsungce.softwareUpdate": { + "targetModule": { + "value": { + "newVersion": "00000000", + "currentVersion": "00000000", + "moduleType": "mainController" + }, + "timestamp": "2025-10-15T08:56:06.850Z" + }, + "otnDUID": { + "value": "CPCOKGGJQZTBC", + "timestamp": "2025-10-16T09:45:07.940Z" + }, + "lastUpdatedDate": { + "value": null + }, + "availableModules": { + "value": [], + "timestamp": "2025-10-15T08:56:06.850Z" + }, + "newVersionAvailable": { + "value": false, + "timestamp": "2025-10-15T08:56:06.850Z" + }, + "operatingState": { + "value": "none", + "timestamp": "2025-10-15T08:56:06.850Z" + }, + "progress": { + "value": 0, + "unit": "%", + "timestamp": "2025-10-04T09:16:22.385Z" + } + }, + "sec.smartthingsHub": { + "threadHardwareAvailability": { + "value": null + }, + "availability": { + "value": null + }, + "deviceId": { + "value": null + }, + "zigbeeHardwareAvailability": { + "value": null + }, + "version": { + "value": null + }, + "threadRequiresExternalHardware": { + "value": null + }, + "zigbeeRequiresExternalHardware": { + "value": null + }, + "eui": { + "value": null + }, + "lastOnboardingResult": { + "value": null + }, + "zwaveHardwareAvailability": { + "value": null + }, + "zwaveRequiresExternalHardware": { + "value": null + }, + "state": { + "value": null + }, + "onboardingProgress": { + "value": null + }, + "lastOnboardingErrorCode": { + "value": null + } + }, + "samsungce.dryerDryingTime": { + "supportedDryingTime": { + "value": [ + "0", + "20", + "30", + "40", + "50", + "60", + "90", + "120", + "150", + "180", + "240" + ], + "timestamp": "2025-10-04T09:10:44.838Z" + }, + "dryingTime": { + "value": "0", + "unit": "min", + "timestamp": "2025-10-16T09:03:25.450Z" + } + } + } + } +} diff --git a/tests/components/smartthings/fixtures/devices/da_wm_wd_01011.json b/tests/components/smartthings/fixtures/devices/da_wm_wd_01011.json new file mode 100644 index 00000000000000..f1e98bb26534cc --- /dev/null +++ b/tests/components/smartthings/fixtures/devices/da_wm_wd_01011.json @@ -0,0 +1,233 @@ +{ + "items": [ + { + "deviceId": "3d39866c-7716-5259-44f0-fd7025efd85f", + "name": "[dryer] Samsung", + "label": "Trockner", + "manufacturerName": "Samsung Electronics", + "presentationId": "DA-WM-WD-01011", + "deviceManufacturerCode": "Samsung Electronics", + "locationId": "8038d392-c5a9-439a-a2f5-4e7b8dcb46e9", + "ownerId": "670b46d1-514a-8c37-5f41-45a57f413e8c", + "roomId": "afd177b2-45cb-4208-b7c1-b24b4a08a146", + "deviceTypeName": "Samsung OCF Dryer", + "components": [ + { + "id": "main", + "label": "main", + "capabilities": [ + { + "id": "ocf", + "version": 1 + }, + { + "id": "execute", + "version": 1 + }, + { + "id": "refresh", + "version": 1 + }, + { + "id": "switch", + "version": 1 + }, + { + "id": "remoteControlStatus", + "version": 1 + }, + { + "id": "dryerOperatingState", + "version": 1 + }, + { + "id": "powerConsumptionReport", + "version": 1 + }, + { + "id": "demandResponseLoadControl", + "version": 1 + }, + { + "id": "logTrigger", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + }, + { + "id": "custom.dryerDryLevel", + "version": 1 + }, + { + "id": "custom.dryerWrinklePrevent", + "version": 1 + }, + { + "id": "custom.energyType", + "version": 1 + }, + { + "id": "custom.jobBeginningStatus", + "version": 1 + }, + { + "id": "custom.supportedOptions", + "version": 1 + }, + { + "id": "samsungce.audioVolumeLevel", + "version": 1 + }, + { + "id": "samsungce.softwareUpdate", + "version": 1 + }, + { + "id": "samsungce.detergentOrder", + "version": 1 + }, + { + "id": "samsungce.detergentState", + "version": 1 + }, + { + "id": "samsungce.deviceIdentification", + "version": 1 + }, + { + "id": "samsungce.driverVersion", + "version": 1 + }, + { + "id": "samsungce.dryerAutoCycleLink", + "version": 1 + }, + { + "id": "samsungce.dryerCycle", + "version": 1 + }, + { + "id": "samsungce.dryerCyclePreset", + "version": 1 + }, + { + "id": "samsungce.dryerDelayEnd", + "version": 1 + }, + { + "id": "samsungce.dryerDryingTemperature", + "version": 1 + }, + { + "id": "samsungce.dryerDryingTime", + "version": 1 + }, + { + "id": "samsungce.dryerFreezePrevent", + "version": 1 + }, + { + "id": "samsungce.dryerLabelScanCyclePreset", + "version": 1 + }, + { + "id": "samsungce.dryerOperatingState", + "version": 1 + }, + { + "id": "samsungce.kidsLock", + "version": 1 + }, + { + "id": "samsungce.welcomeMessage", + "version": 1 + }, + { + "id": "samsungce.clothingExtraCare", + "version": 1 + }, + { + "id": "samsungce.selfCheck", + "version": 1 + }, + { + "id": "samsungce.quickControl", + "version": 1 + }, + { + "id": "samsungce.softwareVersion", + "version": 1 + }, + { + "id": "sec.diagnosticsInformation", + "version": 1 + }, + { + "id": "sec.wifiConfiguration", + "version": 1 + }, + { + "id": "sec.smartthingsHub", + "version": 1, + "ephemeral": true + } + ], + "categories": [ + { + "name": "Dryer", + "categoryType": "manufacturer" + } + ], + "optional": false + }, + { + "id": "hca.main", + "label": "hca.main", + "capabilities": [ + { + "id": "hca.dryerMode", + "version": 1 + } + ], + "categories": [ + { + "name": "Other", + "categoryType": "manufacturer" + } + ], + "optional": false + } + ], + "createTime": "2025-10-04T09:10:39.516Z", + "profile": { + "id": "ef0b94d4-7113-36ad-beaa-2ab415cbc8f7" + }, + "ocf": { + "ocfDeviceType": "oic.d.dryer", + "name": "[dryer] Samsung", + "specVersion": "core.1.1.0", + "verticalDomainSpecVersion": "1.2.1", + "manufacturerName": "Samsung Electronics", + "modelNumber": "DA_WM_TP1_21_COMMON|80010141|30010102001911004AA3039F00820000", + "platformVersion": "DAWIT 2.0", + "platformOS": "TizenRT 3.1", + "hwVersion": "Realtek", + "firmwareVersion": "DA_WM_TP1_21_COMMON_30250508", + "vendorId": "DA-WM-WD-01011", + "vendorResourceClientServerVersion": "Realtek Release 3.1.240801", + "lastSignupTime": "2025-10-04T09:10:39.448894766Z", + "transferCandidate": false, + "additionalAuthCodeRequired": false, + "modelCode": "DV90DB8845GHU2" + }, + "type": "OCF", + "restrictionTier": 0, + "allowed": null, + "executionContext": "CLOUD", + "relationships": [] + } + ], + "_links": {} +} diff --git a/tests/components/smartthings/snapshots/test_binary_sensor.ambr b/tests/components/smartthings/snapshots/test_binary_sensor.ambr index 4873737f7f536e..c68d1359c411a9 100644 --- a/tests/components/smartthings/snapshots/test_binary_sensor.ambr +++ b/tests/components/smartthings/snapshots/test_binary_sensor.ambr @@ -2040,6 +2040,199 @@ 'state': 'off', }) # --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_child_lock-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.trockner_child_lock', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Child lock', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'child_lock', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_samsungce.kidsLock_lockState_lockState', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_child_lock-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Trockner Child lock', + }), + 'context': , + 'entity_id': 'binary_sensor.trockner_child_lock', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.trockner_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_switch_switch_switch', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Trockner Power', + }), + 'context': , + 'entity_id': 'binary_sensor.trockner_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_remote_control-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.trockner_remote_control', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Remote control', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'remote_control', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_remoteControlStatus_remoteControlEnabled_remoteControlEnabled', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_remote_control-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Trockner Remote control', + }), + 'context': , + 'entity_id': 'binary_sensor.trockner_remote_control', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_wrinkle_prevent_active-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.trockner_wrinkle_prevent_active', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Wrinkle prevent active', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'dryer_wrinkle_prevent_active', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_custom.dryerWrinklePrevent_operatingState_operatingState', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][binary_sensor.trockner_wrinkle_prevent_active-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Trockner Wrinkle prevent active', + }), + 'context': , + 'entity_id': 'binary_sensor.trockner_wrinkle_prevent_active', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_all_entities[da_wm_wm_000001][binary_sensor.washer_child_lock-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/smartthings/snapshots/test_init.ambr b/tests/components/smartthings/snapshots/test_init.ambr index 3de46994c4c257..f4ad7c4bce482d 100644 --- a/tests/components/smartthings/snapshots/test_init.ambr +++ b/tests/components/smartthings/snapshots/test_init.ambr @@ -1087,6 +1087,37 @@ 'via_device_id': None, }) # --- +# name: test_devices[da_wm_wd_01011] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': 'https://account.smartthings.com', + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': 'Realtek', + 'id': , + 'identifiers': set({ + tuple( + 'smartthings', + '3d39866c-7716-5259-44f0-fd7025efd85f', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Samsung Electronics', + 'model': 'DA_WM_TP1_21_COMMON', + 'model_id': None, + 'name': 'Trockner', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': 'DA_WM_TP1_21_COMMON_30250508', + 'via_device_id': None, + }) +# --- # name: test_devices[da_wm_wm_000001] DeviceRegistryEntrySnapshot({ 'area_id': 'theater', diff --git a/tests/components/smartthings/snapshots/test_select.ambr b/tests/components/smartthings/snapshots/test_select.ambr index d36132cc1ef0c5..e8c92b3bfcd18f 100644 --- a/tests/components/smartthings/snapshots/test_select.ambr +++ b/tests/components/smartthings/snapshots/test_select.ambr @@ -465,6 +465,65 @@ 'state': 'stop', }) # --- +# name: test_all_entities[da_wm_wd_01011][select.trockner-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'stop', + 'run', + 'pause', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.trockner', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'operating_state', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_dryerOperatingState_machineState_machineState', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][select.trockner-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Trockner', + 'options': list([ + 'stop', + 'run', + 'pause', + ]), + }), + 'context': , + 'entity_id': 'select.trockner', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'stop', + }) +# --- # name: test_all_entities[da_wm_wm_000001][select.washer-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/smartthings/snapshots/test_sensor.ambr b/tests/components/smartthings/snapshots/test_sensor.ambr index bf5760afc3dbb0..e2e32bdeac3e8d 100644 --- a/tests/components/smartthings/snapshots/test_sensor.ambr +++ b/tests/components/smartthings/snapshots/test_sensor.ambr @@ -10962,6 +10962,481 @@ 'state': '0.0', }) # --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_completion_time-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_completion_time', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Completion time', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'completion_time', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_dryerOperatingState_completionTime_completionTime', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_completion_time-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'timestamp', + 'friendly_name': 'Trockner Completion time', + }), + 'context': , + 'entity_id': 'sensor.trockner_completion_time', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2025-10-16T14:15:07+00:00', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_powerConsumptionReport_powerConsumption_energy_meter', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Trockner Energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.trockner_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.9', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy_difference-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_energy_difference', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy difference', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_difference', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_powerConsumptionReport_powerConsumption_deltaEnergy_meter', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy_difference-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Trockner Energy difference', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.trockner_energy_difference', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy_saved-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_energy_saved', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy saved', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_saved', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_powerConsumptionReport_powerConsumption_energySaved_meter', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy_saved-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Trockner Energy saved', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.trockner_energy_saved', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_job_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'cooling', + 'delay_wash', + 'drying', + 'finished', + 'none', + 'refreshing', + 'weight_sensing', + 'wrinkle_prevent', + 'dehumidifying', + 'ai_drying', + 'sanitizing', + 'internal_care', + 'freeze_protection', + 'continuous_dehumidifying', + 'thawing_frozen_inside', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_job_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Job state', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'dryer_job_state', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_dryerOperatingState_dryerJobState_dryerJobState', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_job_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Trockner Job state', + 'options': list([ + 'cooling', + 'delay_wash', + 'drying', + 'finished', + 'none', + 'refreshing', + 'weight_sensing', + 'wrinkle_prevent', + 'dehumidifying', + 'ai_drying', + 'sanitizing', + 'internal_care', + 'freeze_protection', + 'continuous_dehumidifying', + 'thawing_frozen_inside', + ]), + }), + 'context': , + 'entity_id': 'sensor.trockner_job_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'none', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_machine_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'pause', + 'run', + 'stop', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_machine_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Machine state', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'dryer_machine_state', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_dryerOperatingState_machineState_machineState', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_machine_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Trockner Machine state', + 'options': list([ + 'pause', + 'run', + 'stop', + ]), + }), + 'context': , + 'entity_id': 'sensor.trockner_machine_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'stop', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_powerConsumptionReport_powerConsumption_power_meter', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Trockner Power', + 'power_consumption_end': '2025-10-16T09:45:07Z', + 'power_consumption_start': '2025-10-16T09:03:25Z', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.trockner_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_power_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.trockner_power_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power energy', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'power_energy', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_powerConsumptionReport_powerConsumption_powerEnergy_meter', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[da_wm_wd_01011][sensor.trockner_power_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Trockner Power energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.trockner_power_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- # name: test_all_entities[da_wm_wm_000001][sensor.washer_completion_time-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/smartthings/snapshots/test_switch.ambr b/tests/components/smartthings/snapshots/test_switch.ambr index 1bd79b3307c6de..03f3c938abc35a 100644 --- a/tests/components/smartthings/snapshots/test_switch.ambr +++ b/tests/components/smartthings/snapshots/test_switch.ambr @@ -1055,6 +1055,54 @@ 'state': 'off', }) # --- +# name: test_all_entities[da_wm_wd_01011][switch.trockner_wrinkle_prevent-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': , + 'entity_id': 'switch.trockner_wrinkle_prevent', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Wrinkle prevent', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'wrinkle_prevent', + 'unique_id': '3d39866c-7716-5259-44f0-fd7025efd85f_main_custom.dryerWrinklePrevent_dryerWrinklePrevent_dryerWrinklePrevent', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wd_01011][switch.trockner_wrinkle_prevent-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Trockner Wrinkle prevent', + }), + 'context': , + 'entity_id': 'switch.trockner_wrinkle_prevent', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_all_entities[da_wm_wm_000001_1][switch.washing_machine_bubble_soak-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/telegram_bot/fixtures/update_message_attachment_document.json b/tests/components/telegram_bot/fixtures/update_message_attachment_document.json new file mode 100644 index 00000000000000..4d6fde54196b87 --- /dev/null +++ b/tests/components/telegram_bot/fixtures/update_message_attachment_document.json @@ -0,0 +1,27 @@ +{ + "update_id": 2, + "message": { + "message_id": 2, + "date": 1441645532, + "from": { + "id": 12345678, + "is_bot": false, + "last_name": "Test Lastname", + "first_name": "Test Firstname", + "username": "Testusername" + }, + "chat": { + "last_name": "Test Lastname", + "id": 1111111, + "type": "private", + "first_name": "Test Firstname", + "username": "Testusername" + }, + "document": { + "file_id": "AgACAgUAAxkBAAIBUWJ5aXl6Y3h5bXl6Y3h5bXl6Y3gAAJxvMRtP7nG4Fq7m0m0vBAAMCAAN5AAMjBA", + "file_unique_id": "AQADcbzEbT-5xuBa", + "mime_type": "application/pdf", + "file_size": 123456 + } + } +} diff --git a/tests/components/telegram_bot/fixtures/update_message_attachment_photo.json b/tests/components/telegram_bot/fixtures/update_message_attachment_photo.json new file mode 100644 index 00000000000000..9610b8705983e2 --- /dev/null +++ b/tests/components/telegram_bot/fixtures/update_message_attachment_photo.json @@ -0,0 +1,44 @@ +{ + "update_id": 1, + "message": { + "message_id": 1, + "date": 1441645532, + "from": { + "id": 12345678, + "is_bot": false, + "last_name": "Test Lastname", + "first_name": "Test Firstname", + "username": "Testusername" + }, + "chat": { + "last_name": "Test Lastname", + "id": 1111111, + "type": "private", + "first_name": "Test Firstname", + "username": "Testusername" + }, + "photo": [ + { + "file_id": "AgACAgUAAxkBAAIBUWJ5aXl6Y3h5bXl6Y3h5bXl6Y3gAAJxvMRtP7nG4Fq7m0m0vBAAMCAAN5AAMjBA", + "file_unique_id": "AQADcbzEbT-5xuBa", + "file_size": 1234, + "width": 90, + "height": 90 + }, + { + "file_id": "AgACAgUAAxkBAAIBUWJ5aXl6Y3h5bXl6Y3h5bXl6Y3gAAJxvMRtP7nG4Fq7m0m0vBAAMCAAN5AAMjBA", + "file_unique_id": "AQADcbzEbT-5xuBa", + "file_size": 12345, + "width": 320, + "height": 320 + }, + { + "file_id": "AgACAgUAAxkBAAIBUWJ5aXl6Y3h5bXl6Y3h5bXl6Y3gAAJxvMRtP7nG4Fq7m0m0vBAAMCAAN5AAMjBA", + "file_unique_id": "AQADcbzEbT-5xuBa", + "file_size": 123456, + "width": 800, + "height": 800 + } + ] + } +} diff --git a/tests/components/telegram_bot/test_telegram_bot.py b/tests/components/telegram_bot/test_telegram_bot.py index 45db89a77a9822..1410147633f62e 100644 --- a/tests/components/telegram_bot/test_telegram_bot.py +++ b/tests/components/telegram_bot/test_telegram_bot.py @@ -91,9 +91,10 @@ ServiceValidationError, ) from homeassistant.setup import async_setup_component +from homeassistant.util import json as json_util from homeassistant.util.file import write_utf8_file -from tests.common import MockConfigEntry, async_capture_events +from tests.common import MockConfigEntry, async_capture_events, async_load_fixture from tests.typing import ClientSessionGenerator @@ -565,6 +566,52 @@ async def test_webhook_endpoint_generates_telegram_callback_event( assert isinstance(events[0].context, Context) +@pytest.mark.parametrize( + ("attachment_type"), + [ + ("photo"), + ("document"), + ], +) +async def test_webhook_endpoint_generates_telegram_attachment_event( + hass: HomeAssistant, + webhook_platform: None, + hass_client: ClientSessionGenerator, + mock_generate_secret_token: str, + attachment_type: str, +) -> None: + """POST to the configured webhook endpoint and assert fired `telegram_attachment` event for photo and document.""" + client = await hass_client() + events = async_capture_events(hass, "telegram_attachment") + update_message_attachment = await async_load_fixture( + hass, f"update_message_attachment_{attachment_type}.json", DOMAIN + ) + + response = await client.post( + f"{TELEGRAM_WEBHOOK_URL}_123456", + data=update_message_attachment, + headers={ + "X-Telegram-Bot-Api-Secret-Token": mock_generate_secret_token, + "Content-Type": "application/json", + }, + ) + assert response.status == 200 + assert (await response.read()).decode("utf-8") == "" + + # Make sure event has fired + await hass.async_block_till_done() + + assert len(events) == 1 + loaded = json_util.json_loads(update_message_attachment) + if attachment_type == "photo": + expected_file_id = loaded["message"]["photo"][-1]["file_id"] + else: + expected_file_id = loaded["message"][attachment_type]["file_id"] + + assert events[0].data["file_id"] == expected_file_id + assert isinstance(events[0].context, Context) + + async def test_polling_platform_message_text_update( hass: HomeAssistant, config_polling, diff --git a/tests/components/vicare/fixtures/ZigbeeRepeater.json b/tests/components/vicare/fixtures/ZigbeeRepeater.json new file mode 100644 index 00000000000000..30e72e82f27ce4 --- /dev/null +++ b/tests/components/vicare/fixtures/ZigbeeRepeater.json @@ -0,0 +1,143 @@ +{ + "data": [ + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.identification", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "triggered": { + "type": "boolean", + "value": false + } + }, + "timestamp": "2025-10-05T14:18:37.089Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.identification" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.messages.status.raw", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "entries": { + "type": "array", + "value": [] + } + }, + "timestamp": "2025-10-05T14:18:37.089Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.messages.status.raw" + }, + { + "apiVersion": 1, + "commands": { + "setName": { + "isExecutable": true, + "name": "setName", + "params": { + "name": { + "constraints": { + "maxLength": 40, + "minLength": 1, + "regEx": "^[\\p{L}0-9]+( [\\p{L}0-9]+)*$" + }, + "required": true, + "type": "string" + } + }, + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.name/commands/setName" + } + }, + "deviceId": "zigbee-################", + "feature": "device.name", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "name": { + "type": "string", + "value": "OG Repeater" + } + }, + "timestamp": "2025-10-05T14:18:37.089Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.name" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.lqi", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "strength": { + "type": "number", + "unit": "percent", + "value": 46 + } + }, + "timestamp": "2025-10-06T11:06:23.603Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.lqi" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.id", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "string", + "value": "################" + } + }, + "timestamp": "2025-10-06T11:05:13.499Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.id" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.rx", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "", + "value": 125 + } + }, + "timestamp": "2025-10-06T11:07:24.638Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.rx" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.tx", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "", + "value": 122 + } + }, + "timestamp": "2025-10-06T11:06:23.603Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.tx" + } + ] +} diff --git a/tests/components/vicare/fixtures/ZigbeeTRV.json b/tests/components/vicare/fixtures/ZigbeeTRV.json new file mode 100644 index 00000000000000..f49b566c22d22a --- /dev/null +++ b/tests/components/vicare/fixtures/ZigbeeTRV.json @@ -0,0 +1,327 @@ +{ + "data": [ + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.configuration.measurementWeight", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "weight": { + "type": "number", + "unit": "", + "value": 20 + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.configuration.measurementWeight" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.heatingCircuitId", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "", + "value": 1 + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.heatingCircuitId" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.identification", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "triggered": { + "type": "boolean", + "value": false + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.identification" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.information", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "manufacturer": { + "type": "string", + "value": "Viessmann" + }, + "modelId": { + "type": "string", + "value": "#######" + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.information" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.messages.status.raw", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "entries": { + "type": "array", + "value": [] + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.messages.status.raw" + }, + { + "apiVersion": 1, + "commands": { + "setName": { + "isExecutable": true, + "name": "setName", + "params": { + "name": { + "constraints": { + "maxLength": 40, + "minLength": 1, + "regEx": "^[\\p{L}0-9]+( [\\p{L}0-9]+)*$" + }, + "required": true, + "type": "string" + } + }, + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.name/commands/setName" + } + }, + "deviceId": "zigbee-################", + "feature": "device.name", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "name": { + "type": "string", + "value": "Thermostat UG Flur" + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.name" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.power.battery", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "level": { + "type": "number", + "unit": "percent", + "value": 36 + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.power.battery" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.sensors.temperature", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "status": { + "type": "string", + "value": "connected" + }, + "value": { + "type": "number", + "unit": "celsius", + "value": 21.5 + } + }, + "timestamp": "2025-10-06T11:07:20.743Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.sensors.temperature" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.lqi", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "strength": { + "type": "number", + "unit": "percent", + "value": 90 + } + }, + "timestamp": "2025-10-06T03:45:38.469Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.lqi" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.id", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "string", + "value": "################" + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.id" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.rx", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "", + "value": 232 + } + }, + "timestamp": "2025-10-06T07:40:28.475Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.rx" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "device.zigbee.parent.tx", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "", + "value": 232 + } + }, + "timestamp": "2025-10-06T10:59:21.173Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/device.zigbee.parent.tx" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "trv.childLock", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "status": { + "type": "string", + "value": "active" + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/trv.childLock" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "trv.mountingMode", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "active": { + "type": "boolean", + "value": false + } + }, + "timestamp": "2025-10-05T14:18:33.979Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/trv.mountingMode" + }, + { + "apiVersion": 1, + "commands": { + "setTargetTemperature": { + "isExecutable": true, + "name": "setTargetTemperature", + "params": { + "temperature": { + "constraints": { + "max": 30, + "min": 8, + "stepping": 0.5 + }, + "required": true, + "type": "number" + } + }, + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/trv.temperature/commands/setTargetTemperature" + } + }, + "deviceId": "zigbee-################", + "feature": "trv.temperature", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "number", + "unit": "celsius", + "value": 21.5 + } + }, + "timestamp": "2025-10-06T06:51:17.042Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/trv.temperature" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "zigbee-################", + "feature": "trv.valve.position", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "position": { + "type": "number", + "unit": "percent", + "value": 2 + } + }, + "timestamp": "2025-10-06T11:03:17.282Z", + "uri": "https://api.viessmann-climatesolutions.com/iot/v2/features/installations/#######/gateways/################/devices/zigbee-################/features/trv.valve.position" + } + ] +} diff --git a/tests/components/vicare/snapshots/test_binary_sensor.ambr b/tests/components/vicare/snapshots/test_binary_sensor.ambr index 7a6e09c55a5d55..6240729cc24962 100644 --- a/tests/components/vicare/snapshots/test_binary_sensor.ambr +++ b/tests/components/vicare/snapshots/test_binary_sensor.ambr @@ -438,6 +438,247 @@ 'state': 'unavailable', }) # --- +# name: test_all_entities[binary_sensor.model1_child_safety_lock-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.model1_child_safety_lock', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Child safety lock', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'child_safety_lock_mode', + 'unique_id': 'gateway1_zigbee_################-child_safety_lock_mode', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[binary_sensor.model1_child_safety_lock-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model1 Child safety lock', + }), + 'context': , + 'entity_id': 'binary_sensor.model1_child_safety_lock', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_all_entities[binary_sensor.model1_identification_mode-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.model1_identification_mode', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Identification mode', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'identification_mode', + 'unique_id': 'gateway1_zigbee_################-identification_mode', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[binary_sensor.model1_identification_mode-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model1 Identification mode', + }), + 'context': , + 'entity_id': 'binary_sensor.model1_identification_mode', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_all_entities[binary_sensor.model1_mounting_mode-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.model1_mounting_mode', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Mounting mode', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'mounting_mode', + 'unique_id': 'gateway1_zigbee_################-mounting_mode', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[binary_sensor.model1_mounting_mode-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model1 Mounting mode', + }), + 'context': , + 'entity_id': 'binary_sensor.model1_mounting_mode', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_all_entities[binary_sensor.model1_valve-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.model1_valve', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Valve', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'valve', + 'unique_id': 'gateway1_zigbee_################-valve', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[binary_sensor.model1_valve-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'door', + 'friendly_name': 'model1 Valve', + }), + 'context': , + 'entity_id': 'binary_sensor.model1_valve', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_all_entities[binary_sensor.model2_identification_mode-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': , + 'entity_id': 'binary_sensor.model2_identification_mode', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Identification mode', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'identification_mode', + 'unique_id': 'gateway2_zigbee_################-identification_mode', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[binary_sensor.model2_identification_mode-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Identification mode', + }), + 'context': , + 'entity_id': 'binary_sensor.model2_identification_mode', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_binary_sensors[burner] StateSnapshot({ 'attributes': ReadOnlyDict({ diff --git a/tests/components/vicare/snapshots/test_sensor.ambr b/tests/components/vicare/snapshots/test_sensor.ambr index 6c21511a201af6..408a82cb4ffea4 100644 --- a/tests/components/vicare/snapshots/test_sensor.ambr +++ b/tests/components/vicare/snapshots/test_sensor.ambr @@ -1,5 +1,5 @@ # serializer version: 1 -# name: test_all_entities[None-vicare/VitoValor.json][sensor.vitovalor_hydraulic_separator_temperature-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -14,7 +14,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.vitovalor_hydraulic_separator_temperature', + 'entity_id': 'sensor.model1_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -23,39 +23,36 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Hydraulic separator temperature', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hydraulic_separator_temperature', - 'unique_id': 'gateway0_deviceId0-hydraulic_separator_temperature', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[None-vicare/VitoValor.json][sensor.vitovalor_hydraulic_separator_temperature-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'Vitovalor Hydraulic separator temperature', + 'device_class': 'battery', + 'friendly_name': 'model1 Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.vitovalor_hydraulic_separator_temperature', + 'entity_id': 'sensor.model1_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '22.3', + 'state': '89', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_boiler_temperature-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -70,7 +67,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_boiler_temperature', + 'entity_id': 'sensor.model1_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -79,45 +76,42 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boiler temperature', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boiler_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-boiler_temperature', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_boiler_temperature-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Boiler temperature', + 'device_class': 'humidity', + 'friendly_name': 'model1 Humidity', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_boiler_temperature', + 'entity_id': 'sensor.model1_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '63', + 'state': '53', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_hours-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -125,8 +119,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_burner_hours', + 'entity_category': None, + 'entity_id': 'sensor.model1_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -135,35 +129,39 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Burner hours', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'burner_hours', - 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_hours-0', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_hours-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model1_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Burner hours', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model1 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_burner_hours', + 'entity_id': 'sensor.model1_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '18726.3', + 'state': '17.5', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_modulation-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model2_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -178,7 +176,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_burner_modulation', + 'entity_id': 'sensor.model2_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -188,40 +186,41 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Burner modulation', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'burner_modulation', - 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_modulation-0', + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_humidity', 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_modulation-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model2_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Burner modulation', + 'device_class': 'humidity', + 'friendly_name': 'model2 Humidity', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_burner_modulation', + 'entity_id': 'sensor.model2_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '52', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_starts-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model2_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -229,8 +228,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_burner_starts', + 'entity_category': None, + 'entity_id': 'sensor.model2_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -239,40 +238,45 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Burner starts', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'burner_starts', - 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_starts-0', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_starts-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model2_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Burner starts', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'model2 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_burner_starts', + 'entity_id': 'sensor.model2_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '14315', + 'state': '16.9', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_month-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -280,8 +284,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_month', + 'entity_category': , + 'entity_id': 'sensor.model3_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -291,39 +295,41 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW gas consumption this month', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_gas_consumption_heating_this_month', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_month', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_month-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 DHW gas consumption this month', - 'state_class': , + 'device_class': 'battery', + 'friendly_name': 'model3 Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_month', + 'entity_id': 'sensor.model3_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '805', + 'state': '36', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_week-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -331,8 +337,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_week', + 'entity_category': , + 'entity_id': 'sensor.model3_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -344,37 +350,38 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'DHW gas consumption this week', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_gas_consumption_heating_this_week', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_week', - 'unit_of_measurement': None, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway3_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_week-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 DHW gas consumption this week', - 'state_class': , + 'friendly_name': 'model3 Signal strength', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_week', + 'entity_id': 'sensor.model3_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '84', + 'state': '90', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_year-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -383,7 +390,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_year', + 'entity_id': 'sensor.model3_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -392,40 +399,45 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW gas consumption this year', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_gas_consumption_heating_this_year', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_year', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_year-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 DHW gas consumption this year', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'model3 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_gas_consumption_this_year', + 'entity_id': 'sensor.model3_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '8203', + 'state': '21.5', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_today-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_valve_position-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -434,7 +446,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_gas_consumption_today', + 'entity_id': 'sensor.model3_valve_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -446,31 +458,32 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'DHW gas consumption today', + 'original_name': 'Valve position', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_gas_consumption_today', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_today', - 'unit_of_measurement': None, + 'translation_key': 'valve_position', + 'unique_id': 'gateway3_zigbee_################-valve_position', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_today-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model3_valve_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 DHW gas consumption today', - 'state_class': , + 'friendly_name': 'model3 Valve position', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_dhw_gas_consumption_today', + 'entity_id': 'sensor.model3_valve_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '22', + 'state': '2', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_max_temperature-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model4_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -484,8 +497,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_max_temperature', + 'entity_category': , + 'entity_id': 'sensor.model4_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -494,39 +507,35 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'DHW max temperature', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_max_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_max_temperature', - 'unit_of_measurement': , + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway4_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_max_temperature-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.model4_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 DHW max temperature', + 'friendly_name': 'model4 Signal strength', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_dhw_max_temperature', + 'entity_id': 'sensor.model4_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '60', + 'state': '46', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_min_temperature-entry] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.vitovalor_hydraulic_separator_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -540,8 +549,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_min_temperature', + 'entity_category': , + 'entity_id': 'sensor.vitovalor_hydraulic_separator_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -556,39 +565,39 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW min temperature', + 'original_name': 'Hydraulic separator temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_min_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_min_temperature', + 'translation_key': 'hydraulic_separator_temperature', + 'unique_id': 'gateway0_deviceId0-hydraulic_separator_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_min_temperature-state] +# name: test_all_entities[None-vicare/VitoValor.json][sensor.vitovalor_hydraulic_separator_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 DHW min temperature', + 'friendly_name': 'Vitovalor Hydraulic separator temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_min_temperature', + 'entity_id': 'sensor.vitovalor_hydraulic_separator_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '10', + 'state': '22.3', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_week-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_boiler_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -597,7 +606,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_electricity_consumption_this_week', + 'entity_id': 'sensor.model0_boiler_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -607,38 +616,38 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Electricity consumption this week', + 'original_name': 'Boiler temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'power_consumption_this_week', - 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this week', - 'unit_of_measurement': , + 'translation_key': 'boiler_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-boiler_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_week-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_boiler_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Electricity consumption this week', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model0 Boiler temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_electricity_consumption_this_week', + 'entity_id': 'sensor.model0_boiler_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.829', + 'state': '63', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_year-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_hours-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -652,8 +661,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_electricity_consumption_this_year', + 'entity_category': , + 'entity_id': 'sensor.model0_burner_hours', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -662,45 +671,41 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Electricity consumption this year', + 'original_name': 'Burner hours', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'power_consumption_this_year', - 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this year', - 'unit_of_measurement': , + 'translation_key': 'burner_hours', + 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_hours-0', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_year-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_hours-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Electricity consumption this year', + 'friendly_name': 'model0 Burner hours', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_electricity_consumption_this_year', + 'entity_id': 'sensor.model0_burner_hours', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '207.106', + 'state': '18726.3', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_today-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_modulation-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -709,7 +714,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_electricity_consumption_today', + 'entity_id': 'sensor.model0_burner_modulation', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -718,39 +723,35 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Electricity consumption today', + 'original_name': 'Burner modulation', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'power_consumption_today', - 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption today', - 'unit_of_measurement': , + 'translation_key': 'burner_modulation', + 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_modulation-0', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_today-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_modulation-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Electricity consumption today', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'model0 Burner modulation', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_electricity_consumption_today', + 'entity_id': 'sensor.model0_burner_modulation', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.219', + 'state': '0', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_energy-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_starts-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -764,8 +765,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_energy', + 'entity_category': , + 'entity_id': 'sensor.model0_burner_starts', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -774,39 +775,34 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Energy', + 'original_name': 'Burner starts', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'power consumption this month', - 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this month', - 'unit_of_measurement': , + 'translation_key': 'burner_starts', + 'unique_id': 'gateway0_deviceSerialVitodens300W-burner_starts-0', + 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_energy-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_burner_starts-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Energy', + 'friendly_name': 'model0 Burner starts', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_energy', + 'entity_id': 'sensor.model0_burner_starts', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '7.843', + 'state': '14315', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_month-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_month-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -821,7 +817,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_gas_consumption_this_month', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_month', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -833,31 +829,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Heating gas consumption this month', + 'original_name': 'DHW gas consumption this month', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'gas_consumption_heating_this_month', - 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_month', + 'translation_key': 'hotwater_gas_consumption_heating_this_month', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_month', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_month-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_month-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating gas consumption this month', + 'friendly_name': 'model0 DHW gas consumption this month', 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_heating_gas_consumption_this_month', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_month', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '805', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_week-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_week-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -872,7 +868,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_gas_consumption_this_week', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_week', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -884,31 +880,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Heating gas consumption this week', + 'original_name': 'DHW gas consumption this week', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'gas_consumption_heating_this_week', - 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_week', + 'translation_key': 'hotwater_gas_consumption_heating_this_week', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_week', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_week-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_week-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating gas consumption this week', + 'friendly_name': 'model0 DHW gas consumption this week', 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_heating_gas_consumption_this_week', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_week', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '84', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_year-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_year-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -923,7 +919,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_gas_consumption_this_year', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_year', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -935,31 +931,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Heating gas consumption this year', + 'original_name': 'DHW gas consumption this year', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'gas_consumption_heating_this_year', - 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_year', + 'translation_key': 'hotwater_gas_consumption_heating_this_year', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_heating_this_year', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_year-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_this_year-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating gas consumption this year', + 'friendly_name': 'model0 DHW gas consumption this year', 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_heating_gas_consumption_this_year', + 'entity_id': 'sensor.model0_dhw_gas_consumption_this_year', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '30946', + 'state': '8203', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_today-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_today-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -974,7 +970,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_gas_consumption_today', + 'entity_id': 'sensor.model0_dhw_gas_consumption_today', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -986,31 +982,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Heating gas consumption today', + 'original_name': 'DHW gas consumption today', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'gas_consumption_heating_today', - 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_today', + 'translation_key': 'hotwater_gas_consumption_today', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_gas_consumption_today', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_today-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_gas_consumption_today-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating gas consumption today', + 'friendly_name': 'model0 DHW gas consumption today', 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_heating_gas_consumption_today', + 'entity_id': 'sensor.model0_dhw_gas_consumption_today', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '22', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_outside_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_max_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1025,7 +1021,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_outside_temperature', + 'entity_id': 'sensor.model0_dhw_max_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1040,33 +1036,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Outside temperature', + 'original_name': 'DHW max temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'outside_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-outside_temperature', + 'translation_key': 'hotwater_max_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_max_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_outside_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_max_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 Outside temperature', + 'friendly_name': 'model0 DHW max temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_outside_temperature', + 'entity_id': 'sensor.model0_dhw_max_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '20.8', + 'state': '60', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_min_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1081,7 +1077,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_supply_temperature', + 'entity_id': 'sensor.model0_dhw_min_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1096,39 +1092,39 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Supply temperature', + 'original_name': 'DHW min temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-supply_temperature-0', + 'translation_key': 'hotwater_min_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-hotwater_min_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_dhw_min_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 Supply temperature', + 'friendly_name': 'model0 DHW min temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_supply_temperature', + 'entity_id': 'sensor.model0_dhw_min_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '63', + 'state': '10', }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature_2-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_week-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1137,7 +1133,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_supply_temperature_2', + 'entity_id': 'sensor.model0_electricity_consumption_this_week', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1147,38 +1143,38 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 1, + 'suggested_display_precision': 2, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Supply temperature', + 'original_name': 'Electricity consumption this week', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitodens300W-supply_temperature-1', - 'unit_of_measurement': , + 'translation_key': 'power_consumption_this_week', + 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this week', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature_2-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_week-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Supply temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'energy', + 'friendly_name': 'model0 Electricity consumption this week', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_supply_temperature_2', + 'entity_id': 'sensor.model0_electricity_consumption_this_week', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '25.5', + 'state': '0.829', }) # --- -# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model0_battery_charge_total-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_year-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1193,7 +1189,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_battery_charge_total', + 'entity_id': 'sensor.model0_electricity_consumption_this_year', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1203,44 +1199,44 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 0, + 'suggested_display_precision': 2, }), }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Battery charge total', + 'original_name': 'Electricity consumption this year', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'ess_charge_total', - 'unique_id': 'gateway0_deviceId0-ess_charge_total', - 'unit_of_measurement': , + 'translation_key': 'power_consumption_this_year', + 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this year', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model0_battery_charge_total-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_this_year-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'energy', - 'friendly_name': 'model0 Battery charge total', + 'friendly_name': 'model0 Electricity consumption this year', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_battery_charge_total', + 'entity_id': 'sensor.model0_electricity_consumption_this_year', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1879163', + 'state': '207.106', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_boiler_supply_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_today-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1249,7 +1245,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_boiler_supply_temperature', + 'entity_id': 'sensor.model0_electricity_consumption_today', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1259,44 +1255,44 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 1, + 'suggested_display_precision': 2, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Boiler supply temperature', + 'original_name': 'Electricity consumption today', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'boiler_supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-boiler_supply_temperature', - 'unit_of_measurement': , + 'translation_key': 'power_consumption_today', + 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption today', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_boiler_supply_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_electricity_consumption_today-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Boiler supply temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'energy', + 'friendly_name': 'model0 Electricity consumption today', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_boiler_supply_temperature', + 'entity_id': 'sensor.model0_electricity_consumption_today', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '44.6', + 'state': '0.219', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_buffer_main_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1305,7 +1301,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_buffer_main_temperature', + 'entity_id': 'sensor.model0_energy', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1315,38 +1311,38 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 1, + 'suggested_display_precision': 2, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Buffer main temperature', + 'original_name': 'Energy', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'buffer_main_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-buffer main temperature', - 'unit_of_measurement': , + 'translation_key': 'power consumption this month', + 'unique_id': 'gateway0_deviceSerialVitodens300W-power consumption this month', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_buffer_main_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_energy-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Buffer main temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'energy', + 'friendly_name': 'model0 Energy', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_buffer_main_temperature', + 'entity_id': 'sensor.model0_energy', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '35.3', + 'state': '7.843', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_hours-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_month-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1360,8 +1356,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_compressor_hours', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_gas_consumption_this_month', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1373,45 +1369,46 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Compressor hours', + 'original_name': 'Heating gas consumption this month', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'compressor_hours', - 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_hours-0', - 'unit_of_measurement': , + 'translation_key': 'gas_consumption_heating_this_month', + 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_month', + 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_hours-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_month-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Compressor hours', + 'friendly_name': 'model0 Heating gas consumption this month', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_compressor_hours', + 'entity_id': 'sensor.model0_heating_gas_consumption_this_month', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '71', + 'state': '0', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_phase-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_week-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), '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.model0_compressor_phase', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_gas_consumption_this_week', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1423,30 +1420,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Compressor phase', + 'original_name': 'Heating gas consumption this week', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'compressor_phase', - 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_phase-0', + 'translation_key': 'gas_consumption_heating_this_week', + 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_week', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_phase-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_week-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Compressor phase', + 'friendly_name': 'model0 Heating gas consumption this week', + 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_compressor_phase', + 'entity_id': 'sensor.model0_heating_gas_consumption_this_week', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'ready', + 'state': '0', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_starts-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_year-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1460,8 +1458,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_compressor_starts', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_gas_consumption_this_year', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1473,31 +1471,31 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Compressor starts', + 'original_name': 'Heating gas consumption this year', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'compressor_starts', - 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_starts-0', + 'translation_key': 'gas_consumption_heating_this_year', + 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_this_year', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_starts-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_this_year-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Compressor starts', + 'friendly_name': 'model0 Heating gas consumption this year', 'state_class': , }), 'context': , - 'entity_id': 'sensor.model0_compressor_starts', + 'entity_id': 'sensor.model0_heating_gas_consumption_this_year', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '121', + 'state': '30946', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_last_seven_days-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_today-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1512,7 +1510,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_electricity_consumption_last_seven_days', + 'entity_id': 'sensor.model0_heating_gas_consumption_today', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1521,45 +1519,40 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'DHW electricity consumption last seven days', + 'original_name': 'Heating gas consumption today', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_summary_dhw_consumption_heating_lastsevendays', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_dhw_consumption_heating_lastsevendays', - 'unit_of_measurement': , + 'translation_key': 'gas_consumption_heating_today', + 'unique_id': 'gateway0_deviceSerialVitodens300W-gas_consumption_heating_today', + 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_last_seven_days-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_heating_gas_consumption_today-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 DHW electricity consumption last seven days', + 'friendly_name': 'model0 Heating gas consumption today', 'state_class': , - 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_electricity_consumption_last_seven_days', + 'entity_id': 'sensor.model0_heating_gas_consumption_today', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '28.3', + 'state': '0', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_month-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_outside_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1568,7 +1561,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_month', + 'entity_id': 'sensor.model0_outside_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1578,44 +1571,44 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW electricity consumption this month', + 'original_name': 'Outside temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_dhw_summary_consumption_heating_currentmonth', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentmonth', - 'unit_of_measurement': , + 'translation_key': 'outside_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-outside_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_month-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_outside_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 DHW electricity consumption this month', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model0 Outside temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_month', + 'entity_id': 'sensor.model0_outside_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '7.6', + 'state': '20.8', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_year-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1624,7 +1617,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_year', + 'entity_id': 'sensor.model0_supply_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1634,44 +1627,44 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW electricity consumption this year', + 'original_name': 'Supply temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_dhw_summary_consumption_heating_currentyear', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentyear', - 'unit_of_measurement': , + 'translation_key': 'supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-supply_temperature-0', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_year-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 DHW electricity consumption this year', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model0 Supply temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_year', + 'entity_id': 'sensor.model0_supply_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '143', + 'state': '63', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_today-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature_2-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1680,7 +1673,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_electricity_consumption_today', + 'entity_id': 'sensor.model0_supply_temperature_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1690,38 +1683,91 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW electricity consumption today', + 'original_name': 'Supply temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_dhw_summary_consumption_heating_currentday', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentday', - 'unit_of_measurement': , + 'translation_key': 'supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitodens300W-supply_temperature-1', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_today-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model0_supply_temperature_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 DHW electricity consumption today', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model0 Supply temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_electricity_consumption_today', + 'entity_id': 'sensor.model0_supply_temperature_2', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '7.6', + 'state': '25.5', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_max_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model1_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-battery_level', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'model1 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model1_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '89', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1736,7 +1782,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_max_temperature', + 'entity_id': 'sensor.model1_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1745,39 +1791,36 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW max temperature', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_max_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-hotwater_max_temperature', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_max_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 DHW max temperature', + 'device_class': 'humidity', + 'friendly_name': 'model1 Humidity', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_dhw_max_temperature', + 'entity_id': 'sensor.model1_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '60', + 'state': '53', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_min_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1792,7 +1835,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_min_temperature', + 'entity_id': 'sensor.model1_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1807,33 +1850,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW min temperature', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'hotwater_min_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-hotwater_min_temperature', + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_min_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model1_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 DHW min temperature', + 'friendly_name': 'model1 Temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_min_temperature', + 'entity_id': 'sensor.model1_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '10', + 'state': '17.5', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_storage_temperature-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model2_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -1848,7 +1891,60 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_dhw_storage_temperature', + 'entity_id': 'sensor.model2_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_humidity', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model2_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'model2 Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model2_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '52', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model2_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model2_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1863,39 +1959,39 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'DHW storage temperature', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'dhw_storage_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-dhw_storage_temperature', + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_storage_temperature-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model2_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 DHW storage temperature', + 'friendly_name': 'model2 Temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_dhw_storage_temperature', + 'entity_id': 'sensor.model2_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '58.8', + 'state': '16.9', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_electricity_consumption_today-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1903,8 +1999,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_electricity_consumption_today', + 'entity_category': , + 'entity_id': 'sensor.model3_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1913,45 +2009,94 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Electricity consumption today', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'power_consumption_today', - 'unique_id': 'gateway0_deviceSerialVitocal250A-power consumption today', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_electricity_consumption_today-state] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Electricity consumption today', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'battery', + 'friendly_name': 'model3 Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_electricity_consumption_today', + 'entity_id': 'sensor.model3_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '24', + 'state': '36', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_last_seven_days-entry] +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model3_signal_strength', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Signal strength', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway3_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_signal_strength-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model3 Signal strength', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model3_signal_strength', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '90', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -1960,7 +2105,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_electricity_consumption_last_seven_days', + 'entity_id': 'sensor.model3_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1970,44 +2115,2319 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating electricity consumption last seven days', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_summary_consumption_heating_lastsevendays', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_lastsevendays', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-room_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model3 Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model3_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '21.5', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_valve_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model3_valve_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Valve position', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'valve_position', + 'unique_id': 'gateway3_zigbee_################-valve_position', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model3_valve_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model3 Valve position', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model3_valve_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model4_signal_strength-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model4_signal_strength', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Signal strength', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway4_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:boiler-vicare/Vitodens300W.json][sensor.model4_signal_strength-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model4 Signal strength', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model4_signal_strength', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '46', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model0_battery_charge_total-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_battery_charge_total', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery charge total', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'ess_charge_total', + 'unique_id': 'gateway0_deviceId0-ess_charge_total', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model0_battery_charge_total-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Battery charge total', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_battery_charge_total', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1879163', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model1_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-battery_level', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'model1 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model1_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '89', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_humidity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model1_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_humidity', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'model1 Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model1_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '53', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model1_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model1_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model1 Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model1_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '17.5', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model2_humidity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model2_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_humidity', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model2_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'model2 Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model2_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '52', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model2_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model2_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model2_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model2 Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.9', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model3_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-battery_level', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'model3 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model3_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '36', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_signal_strength-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model3_signal_strength', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Signal strength', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway3_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_signal_strength-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model3 Signal strength', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model3_signal_strength', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '90', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model3_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-room_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model3 Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model3_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '21.5', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_valve_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model3_valve_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Valve position', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'valve_position', + 'unique_id': 'gateway3_zigbee_################-valve_position', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model3_valve_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model3 Valve position', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model3_valve_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model4_signal_strength-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model4_signal_strength', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Signal strength', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway4_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[type:ess-vicare/VitoChargeVX3.json][sensor.model4_signal_strength-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model4 Signal strength', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.model4_signal_strength', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '46', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_boiler_supply_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_boiler_supply_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Boiler supply temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'boiler_supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-boiler_supply_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_boiler_supply_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Boiler supply temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_boiler_supply_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '44.6', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_buffer_main_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_buffer_main_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Buffer main temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'buffer_main_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-buffer main temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_buffer_main_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Buffer main temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_buffer_main_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '35.3', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_hours-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_compressor_hours', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours', + 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_hours-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_hours-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Compressor hours', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_compressor_hours', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '71', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_phase-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_compressor_phase', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor phase', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_phase', + 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_phase-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_phase-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Compressor phase', + }), + 'context': , + 'entity_id': 'sensor.model0_compressor_phase', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'ready', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_starts-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_compressor_starts', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor starts', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_starts', + 'unique_id': 'gateway0_deviceSerialVitocal250A-compressor_starts-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_compressor_starts-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Compressor starts', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.model0_compressor_starts', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '121', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_last_seven_days-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_electricity_consumption_last_seven_days', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW electricity consumption last seven days', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_summary_dhw_consumption_heating_lastsevendays', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_dhw_consumption_heating_lastsevendays', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_last_seven_days-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 DHW electricity consumption last seven days', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_electricity_consumption_last_seven_days', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '28.3', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_month-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_month', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW electricity consumption this month', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_dhw_summary_consumption_heating_currentmonth', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentmonth', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_month-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 DHW electricity consumption this month', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_month', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '7.6', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_year-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_year', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW electricity consumption this year', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_dhw_summary_consumption_heating_currentyear', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentyear', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_this_year-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 DHW electricity consumption this year', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_electricity_consumption_this_year', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '143', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_today-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_electricity_consumption_today', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW electricity consumption today', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_dhw_summary_consumption_heating_currentday', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_dhw_summary_consumption_heating_currentday', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_electricity_consumption_today-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 DHW electricity consumption today', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_electricity_consumption_today', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '7.6', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_max_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_max_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW max temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hotwater_max_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-hotwater_max_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_max_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 DHW max temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_max_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '60', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_min_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_min_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW min temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'hotwater_min_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-hotwater_min_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_min_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 DHW min temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_min_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '10', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_storage_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_dhw_storage_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'DHW storage temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'dhw_storage_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-dhw_storage_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_dhw_storage_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 DHW storage temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_dhw_storage_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '58.8', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_electricity_consumption_today-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_electricity_consumption_today', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumption today', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'power_consumption_today', + 'unique_id': 'gateway0_deviceSerialVitocal250A-power consumption today', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_electricity_consumption_today-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Electricity consumption today', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_electricity_consumption_today', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '24', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_last_seven_days-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_electricity_consumption_last_seven_days', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Heating electricity consumption last seven days', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_summary_consumption_heating_lastsevendays', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_lastsevendays', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_last_seven_days-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Heating electricity consumption last seven days', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_electricity_consumption_last_seven_days', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '47.6', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_month-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_electricity_consumption_this_month', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Heating electricity consumption this month', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_summary_consumption_heating_currentmonth', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentmonth', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_month-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Heating electricity consumption this month', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_electricity_consumption_this_month', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.4', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_year-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_electricity_consumption_this_year', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Heating electricity consumption this year', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_summary_consumption_heating_currentyear', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentyear', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_year-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Heating electricity consumption this year', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_electricity_consumption_this_year', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '55.2', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_today-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_heating_electricity_consumption_today', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Heating electricity consumption today', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'energy_summary_consumption_heating_currentday', + 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentday', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_today-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model0 Heating electricity consumption today', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_electricity_consumption_today', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.4', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_hours-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_heating_rod_hours', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Heating rod hours', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'heating_rod_hours', + 'unique_id': 'gateway0_deviceSerialVitocal250A-heating_rod_hours', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_hours-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Heating rod hours', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_rod_hours', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_starts-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_heating_rod_starts', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Heating rod starts', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'heating_rod_starts', + 'unique_id': 'gateway0_deviceSerialVitocal250A-heating_rod_starts', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_starts-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Heating rod starts', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.model0_heating_rod_starts', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_outside_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_outside_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Outside temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'outside_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-outside_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_outside_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Outside temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_outside_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '14.3', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_primary_circuit_supply_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_primary_circuit_supply_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Primary circuit supply temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'primary_circuit_supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-primary_circuit_supply_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_primary_circuit_supply_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Primary circuit supply temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_primary_circuit_supply_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '12.8', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_return_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_return_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Return temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'return_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-return_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_return_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Return temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_return_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '35.3', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_seasonal_performance_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Seasonal performance factor', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'spf_total', + 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_total', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Seasonal performance factor', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.model0_seasonal_performance_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.9', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_domestic_hot_water-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_seasonal_performance_factor_domestic_hot_water', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Seasonal performance factor - domestic hot water', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'spf_dhw', + 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_dhw', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_domestic_hot_water-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Seasonal performance factor - domestic hot water', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.model0_seasonal_performance_factor_domestic_hot_water', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '4.1', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_heating-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_seasonal_performance_factor_heating', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Seasonal performance factor - heating', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'spf_heating', + 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_heating', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_heating-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model0 Seasonal performance factor - heating', + 'state_class': , + }), + 'context': , + 'entity_id': 'sensor.model0_seasonal_performance_factor_heating', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.2', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_secondary_circuit_supply_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_secondary_circuit_supply_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Secondary circuit supply temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'secondary_circuit_supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-secondary_circuit_supply_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_secondary_circuit_supply_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Secondary circuit supply temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_secondary_circuit_supply_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '45.1', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_pressure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_supply_pressure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Supply pressure', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'supply_pressure', + 'unique_id': 'gateway0_deviceSerialVitocal250A-supply_pressure', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_pressure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'pressure', + 'friendly_name': 'model0 Supply pressure', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_supply_pressure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.1', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model0_supply_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Supply temperature', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'supply_temperature', + 'unique_id': 'gateway0_deviceSerialVitocal250A-supply_temperature-1', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'model0 Supply temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model0_supply_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '39', + }) +# --- +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_volumetric_flow-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model0_volumetric_flow', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Volumetric flow', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'volumetric_flow', + 'unique_id': 'gateway0_deviceSerialVitocal250A-volumetric_flow', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_last_seven_days-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_volumetric_flow-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Heating electricity consumption last seven days', - 'state_class': , - 'unit_of_measurement': , + 'friendly_name': 'model0 Volumetric flow', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_heating_electricity_consumption_last_seven_days', + 'entity_id': 'sensor.model0_volumetric_flow', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '47.6', + 'state': '1.015', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_month-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2015,8 +4435,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_heating_electricity_consumption_this_month', + 'entity_category': , + 'entity_id': 'sensor.model1_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2025,45 +4445,42 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating electricity consumption this month', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_summary_consumption_heating_currentmonth', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentmonth', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_month-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Heating electricity consumption this month', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'battery', + 'friendly_name': 'model1 Battery', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_heating_electricity_consumption_this_month', + 'entity_id': 'sensor.model1_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '16.4', + 'state': '89', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_year-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2072,7 +4489,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_electricity_consumption_this_year', + 'entity_id': 'sensor.model1_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2081,45 +4498,42 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating electricity consumption this year', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_summary_consumption_heating_currentyear', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentyear', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_this_year-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Heating electricity consumption this year', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'humidity', + 'friendly_name': 'model1 Humidity', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_heating_electricity_consumption_this_year', + 'entity_id': 'sensor.model1_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '55.2', + 'state': '53', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_today-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2128,7 +4542,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_heating_electricity_consumption_today', + 'entity_id': 'sensor.model1_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2138,44 +4552,44 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 2, + 'suggested_display_precision': 1, }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating electricity consumption today', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'energy_summary_consumption_heating_currentday', - 'unique_id': 'gateway0_deviceSerialVitocal250A-energy_summary_consumption_heating_currentday', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_electricity_consumption_today-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model1_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'energy', - 'friendly_name': 'model0 Heating electricity consumption today', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'temperature', + 'friendly_name': 'model1 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_heating_electricity_consumption_today', + 'entity_id': 'sensor.model1_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '16.4', + 'state': '17.5', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_hours-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model2_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2183,8 +4597,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_heating_rod_hours', + 'entity_category': None, + 'entity_id': 'sensor.model2_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2194,40 +4608,41 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating rod hours', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'heating_rod_hours', - 'unique_id': 'gateway0_deviceSerialVitocal250A-heating_rod_hours', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_hours-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model2_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating rod hours', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'humidity', + 'friendly_name': 'model2 Humidity', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_heating_rod_hours', + 'entity_id': 'sensor.model2_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '52', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_starts-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model2_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2235,8 +4650,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_heating_rod_starts', + 'entity_category': None, + 'entity_id': 'sensor.model2_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2245,34 +4660,39 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Heating rod starts', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'heating_rod_starts', - 'unique_id': 'gateway0_deviceSerialVitocal250A-heating_rod_starts', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_heating_rod_starts-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model2_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Heating rod starts', - 'state_class': , + 'device_class': 'temperature', + 'friendly_name': 'model2 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_heating_rod_starts', + 'entity_id': 'sensor.model2_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '16.9', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_outside_temperature-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2286,8 +4706,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_outside_temperature', + 'entity_category': , + 'entity_id': 'sensor.model3_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2296,39 +4716,36 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Outside temperature', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'outside_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-outside_temperature', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_outside_temperature-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Outside temperature', + 'device_class': 'battery', + 'friendly_name': 'model3 Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_outside_temperature', + 'entity_id': 'sensor.model3_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '14.3', + 'state': '36', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_primary_circuit_supply_temperature-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2342,8 +4759,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_primary_circuit_supply_temperature', + 'entity_category': , + 'entity_id': 'sensor.model3_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2352,39 +4769,35 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Primary circuit supply temperature', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'primary_circuit_supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-primary_circuit_supply_temperature', - 'unit_of_measurement': , + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway3_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_primary_circuit_supply_temperature-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Primary circuit supply temperature', + 'friendly_name': 'model3 Signal strength', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_primary_circuit_supply_temperature', + 'entity_id': 'sensor.model3_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '12.8', + 'state': '90', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_return_temperature-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2399,7 +4812,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_return_temperature', + 'entity_id': 'sensor.model3_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2414,33 +4827,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Return temperature', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'return_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-return_temperature', + 'translation_key': None, + 'unique_id': 'gateway3_zigbee_################-room_temperature', 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_return_temperature-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 Return temperature', + 'friendly_name': 'model3 Temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_return_temperature', + 'entity_id': 'sensor.model3_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '35.3', + 'state': '21.5', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_valve_position-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2454,8 +4867,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_seasonal_performance_factor', + 'entity_category': None, + 'entity_id': 'sensor.model3_valve_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2467,31 +4880,32 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Seasonal performance factor', + 'original_name': 'Valve position', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'spf_total', - 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_total', - 'unit_of_measurement': None, + 'translation_key': 'valve_position', + 'unique_id': 'gateway3_zigbee_################-valve_position', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model3_valve_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Seasonal performance factor', + 'friendly_name': 'model3 Valve position', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_seasonal_performance_factor', + 'entity_id': 'sensor.model3_valve_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.9', + 'state': '2', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_domestic_hot_water-entry] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model4_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2506,7 +4920,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.model0_seasonal_performance_factor_domestic_hot_water', + 'entity_id': 'sensor.model4_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2518,37 +4932,44 @@ }), 'original_device_class': None, 'original_icon': None, - 'original_name': 'Seasonal performance factor - domestic hot water', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'spf_dhw', - 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_dhw', - 'unit_of_measurement': None, + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway4_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_domestic_hot_water-state] +# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model4_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Seasonal performance factor - domestic hot water', + 'friendly_name': 'model4 Signal strength', 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_seasonal_performance_factor_domestic_hot_water', + 'entity_id': 'sensor.model4_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '4.1', + 'state': '46', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_heating-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_level-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'standby', + 'levelone', + 'leveltwo', + 'levelthree', + 'levelfour', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -2556,8 +4977,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_seasonal_performance_factor_heating', + 'entity_category': None, + 'entity_id': 'sensor.model0_ventilation_level', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2567,39 +4988,53 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Seasonal performance factor - heating', + 'original_name': 'Ventilation level', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'spf_heating', - 'unique_id': 'gateway0_deviceSerialVitocal250A-spf_heating', + 'translation_key': 'ventilation_level', + 'unique_id': 'gateway0_deviceSerialViAir300F-ventilation_level', 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_seasonal_performance_factor_heating-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_level-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Seasonal performance factor - heating', - 'state_class': , + 'device_class': 'enum', + 'friendly_name': 'model0 Ventilation level', + 'options': list([ + 'standby', + 'levelone', + 'leveltwo', + 'levelthree', + 'levelfour', + ]), }), 'context': , - 'entity_id': 'sensor.model0_seasonal_performance_factor_heating', + 'entity_id': 'sensor.model0_ventilation_level', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '3.2', + 'state': 'levelone', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_secondary_circuit_supply_temperature-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_reason-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'state_class': , + 'options': list([ + 'standby', + 'permanent', + 'schedule', + 'sensordriven', + 'silent', + 'forcedlevelfour', + ]), }), 'config_entry_id': , 'config_subentry_id': , @@ -2607,8 +5042,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_secondary_circuit_supply_temperature', + 'entity_category': , + 'entity_id': 'sensor.model0_ventilation_reason', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2617,39 +5052,42 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Secondary circuit supply temperature', + 'original_name': 'Ventilation reason', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'secondary_circuit_supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-secondary_circuit_supply_temperature', - 'unit_of_measurement': , + 'translation_key': 'ventilation_reason', + 'unique_id': 'gateway0_deviceSerialViAir300F-ventilation_reason', + 'unit_of_measurement': None, }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_secondary_circuit_supply_temperature-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_reason-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Secondary circuit supply temperature', - 'state_class': , - 'unit_of_measurement': , + 'device_class': 'enum', + 'friendly_name': 'model0 Ventilation reason', + 'options': list([ + 'standby', + 'permanent', + 'schedule', + 'sensordriven', + 'silent', + 'forcedlevelfour', + ]), }), 'context': , - 'entity_id': 'sensor.model0_secondary_circuit_supply_temperature', + 'entity_id': 'sensor.model0_ventilation_reason', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '45.1', + 'state': 'permanent', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_pressure-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2664,7 +5102,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.model0_supply_pressure', + 'entity_id': 'sensor.model1_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2673,39 +5111,36 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 2, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Supply pressure', + 'original_name': 'Battery', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'supply_pressure', - 'unique_id': 'gateway0_deviceSerialVitocal250A-supply_pressure', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-battery_level', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_pressure-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'pressure', - 'friendly_name': 'model0 Supply pressure', + 'device_class': 'battery', + 'friendly_name': 'model1 Battery', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_supply_pressure', + 'entity_id': 'sensor.model1_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '2.1', + 'state': '89', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_temperature-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2720,7 +5155,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_supply_temperature', + 'entity_id': 'sensor.model1_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2729,39 +5164,36 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Supply temperature', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'supply_temperature', - 'unique_id': 'gateway0_deviceSerialVitocal250A-supply_temperature-1', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_supply_temperature-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model0 Supply temperature', + 'device_class': 'humidity', + 'friendly_name': 'model1 Humidity', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_supply_temperature', + 'entity_id': 'sensor.model1_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '39', + 'state': '53', }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_volumetric_flow-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2775,8 +5207,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_volumetric_flow', + 'entity_category': None, + 'entity_id': 'sensor.model1_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2785,47 +5217,45 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, - 'original_name': 'Volumetric flow', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'volumetric_flow', - 'unique_id': 'gateway0_deviceSerialVitocal250A-volumetric_flow', - 'unit_of_measurement': , + 'translation_key': None, + 'unique_id': 'gateway1_zigbee_d87a3bfffe5d844a-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:heatpump-vicare/Vitocal250A.json][sensor.model0_volumetric_flow-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model1_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'friendly_name': 'model0 Volumetric flow', + 'device_class': 'temperature', + 'friendly_name': 'model1 Temperature', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_volumetric_flow', + 'entity_id': 'sensor.model1_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '1.015', + 'state': '17.5', }) # --- -# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_level-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model2_humidity-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'standby', - 'levelone', - 'leveltwo', - 'levelthree', - 'levelfour', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2834,7 +5264,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_ventilation_level', + 'entity_id': 'sensor.model2_humidity', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2844,53 +5274,41 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Ventilation level', + 'original_name': 'Humidity', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'ventilation_level', - 'unique_id': 'gateway0_deviceSerialViAir300F-ventilation_level', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_humidity', + 'unit_of_measurement': '%', }) # --- -# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_level-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model2_humidity-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'model0 Ventilation level', - 'options': list([ - 'standby', - 'levelone', - 'leveltwo', - 'levelthree', - 'levelfour', - ]), + 'device_class': 'humidity', + 'friendly_name': 'model2 Humidity', + 'state_class': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_ventilation_level', + 'entity_id': 'sensor.model2_humidity', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'levelone', + 'state': '52', }) # --- -# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_reason-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model2_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), 'area_id': None, 'capabilities': dict({ - 'options': list([ - 'standby', - 'permanent', - 'schedule', - 'sensordriven', - 'silent', - 'forcedlevelfour', - ]), + 'state_class': , }), 'config_entry_id': , 'config_subentry_id': , @@ -2898,8 +5316,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , - 'entity_id': 'sensor.model0_ventilation_reason', + 'entity_category': None, + 'entity_id': 'sensor.model2_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2908,42 +5326,39 @@ }), 'name': None, 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Ventilation reason', + 'original_name': 'Temperature', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'ventilation_reason', - 'unique_id': 'gateway0_deviceSerialViAir300F-ventilation_reason', - 'unit_of_measurement': None, + 'translation_key': None, + 'unique_id': 'gateway2_zigbee_5cc7c1fffea33a3b-room_temperature', + 'unit_of_measurement': , }) # --- -# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model0_ventilation_reason-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model2_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'enum', - 'friendly_name': 'model0 Ventilation reason', - 'options': list([ - 'standby', - 'permanent', - 'schedule', - 'sensordriven', - 'silent', - 'forcedlevelfour', - ]), + 'device_class': 'temperature', + 'friendly_name': 'model2 Temperature', + 'state_class': , + 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_ventilation_reason', + 'entity_id': 'sensor.model2_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'permanent', + 'state': '16.9', }) # --- -# name: test_room_sensors[sensor.model0_battery-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -2958,7 +5373,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': , - 'entity_id': 'sensor.model0_battery', + 'entity_id': 'sensor.model3_battery', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2976,27 +5391,27 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': 'gateway0_zigbee_d87a3bfffe5d844a-battery_level', + 'unique_id': 'gateway3_zigbee_################-battery_level', 'unit_of_measurement': '%', }) # --- -# name: test_room_sensors[sensor.model0_battery-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_battery-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'battery', - 'friendly_name': 'model0 Battery', + 'friendly_name': 'model3 Battery', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_battery', + 'entity_id': 'sensor.model3_battery', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '89', + 'state': '36', }) # --- -# name: test_room_sensors[sensor.model0_humidity-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -3010,8 +5425,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model0_humidity', + 'entity_category': , + 'entity_id': 'sensor.model3_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3021,35 +5436,34 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'gateway0_zigbee_d87a3bfffe5d844a-room_humidity', + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway3_zigbee_################-zigbee_signal_strength', 'unit_of_measurement': '%', }) # --- -# name: test_room_sensors[sensor.model0_humidity-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'model0 Humidity', + 'friendly_name': 'model3 Signal strength', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model0_humidity', + 'entity_id': 'sensor.model3_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '53', + 'state': '90', }) # --- -# name: test_room_sensors[sensor.model0_temperature-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -3064,7 +5478,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model0_temperature', + 'entity_id': 'sensor.model3_temperature', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3085,27 +5499,27 @@ 'suggested_object_id': None, 'supported_features': 0, 'translation_key': None, - 'unique_id': 'gateway0_zigbee_d87a3bfffe5d844a-room_temperature', + 'unique_id': 'gateway3_zigbee_################-room_temperature', 'unit_of_measurement': , }) # --- -# name: test_room_sensors[sensor.model0_temperature-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_temperature-state] StateSnapshot({ 'attributes': ReadOnlyDict({ 'device_class': 'temperature', - 'friendly_name': 'model0 Temperature', + 'friendly_name': 'model3 Temperature', 'state_class': , 'unit_of_measurement': , }), 'context': , - 'entity_id': 'sensor.model0_temperature', + 'entity_id': 'sensor.model3_temperature', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '17.5', + 'state': '21.5', }) # --- -# name: test_room_sensors[sensor.model1_humidity-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_valve_position-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -3120,7 +5534,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.model1_humidity', + 'entity_id': 'sensor.model3_valve_position', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3130,35 +5544,34 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Humidity', + 'original_name': 'Valve position', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'gateway1_zigbee_5cc7c1fffea33a3b-room_humidity', + 'translation_key': 'valve_position', + 'unique_id': 'gateway3_zigbee_################-valve_position', 'unit_of_measurement': '%', }) # --- -# name: test_room_sensors[sensor.model1_humidity-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model3_valve_position-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'humidity', - 'friendly_name': 'model1 Humidity', + 'friendly_name': 'model3 Valve position', 'state_class': , 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model1_humidity', + 'entity_id': 'sensor.model3_valve_position', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '52', + 'state': '2', }) # --- -# name: test_room_sensors[sensor.model1_temperature-entry] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model4_signal_strength-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -3172,8 +5585,8 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': None, - 'entity_id': 'sensor.model1_temperature', + 'entity_category': , + 'entity_id': 'sensor.model4_signal_strength', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -3182,35 +5595,31 @@ }), 'name': None, 'options': dict({ - 'sensor': dict({ - 'suggested_display_precision': 1, - }), }), - 'original_device_class': , + 'original_device_class': None, 'original_icon': None, - 'original_name': 'Temperature', + 'original_name': 'Signal strength', 'platform': 'vicare', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'gateway1_zigbee_5cc7c1fffea33a3b-room_temperature', - 'unit_of_measurement': , + 'translation_key': 'zigbee_signal_strength', + 'unique_id': 'gateway4_zigbee_################-zigbee_signal_strength', + 'unit_of_measurement': '%', }) # --- -# name: test_room_sensors[sensor.model1_temperature-state] +# name: test_all_entities[type:ventilation-vicare/ViAir300F.json][sensor.model4_signal_strength-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'temperature', - 'friendly_name': 'model1 Temperature', + 'friendly_name': 'model4 Signal strength', 'state_class': , - 'unit_of_measurement': , + 'unit_of_measurement': '%', }), 'context': , - 'entity_id': 'sensor.model1_temperature', + 'entity_id': 'sensor.model4_signal_strength', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '16.9', + 'state': '46', }) # --- diff --git a/tests/components/vicare/test_binary_sensor.py b/tests/components/vicare/test_binary_sensor.py index 44612673a11607..f3fba147c7e355 100644 --- a/tests/components/vicare/test_binary_sensor.py +++ b/tests/components/vicare/test_binary_sensor.py @@ -41,7 +41,11 @@ async def test_all_entities( entity_registry: er.EntityRegistry, ) -> None: """Test all entities.""" - fixtures: list[Fixture] = [Fixture({"type:boiler"}, "vicare/Vitodens300W.json")] + fixtures: list[Fixture] = [ + Fixture({"type:boiler"}, "vicare/Vitodens300W.json"), + Fixture({"type:radiator"}, "vicare/ZigbeeTRV.json"), + Fixture({"type:repeater"}, "vicare/ZigbeeRepeater.json"), + ] with ( patch(f"{MODULE}.login", return_value=MockPyViCare(fixtures)), patch(f"{MODULE}.PLATFORMS", [Platform.BINARY_SENSOR]), diff --git a/tests/components/vicare/test_sensor.py b/tests/components/vicare/test_sensor.py index ce286212093910..a0300754425f7f 100644 --- a/tests/components/vicare/test_sensor.py +++ b/tests/components/vicare/test_sensor.py @@ -37,27 +37,10 @@ async def test_all_entities( """Test all entities.""" fixtures: list[Fixture] = [ Fixture({fixture_type}, fixture_data), - ] - with ( - patch(f"{MODULE}.login", return_value=MockPyViCare(fixtures)), - patch(f"{MODULE}.PLATFORMS", [Platform.SENSOR]), - ): - await setup_integration(hass, mock_config_entry) - - await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) - - -@pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_room_sensors( - hass: HomeAssistant, - snapshot: SnapshotAssertion, - mock_config_entry: MockConfigEntry, - entity_registry: er.EntityRegistry, -) -> None: - """Test all entities.""" - fixtures: list[Fixture] = [ Fixture({"type:climateSensor"}, "vicare/RoomSensor1.json"), Fixture({"type:climateSensor"}, "vicare/RoomSensor2.json"), + Fixture({"type:radiator"}, "vicare/ZigbeeTRV.json"), + Fixture({"type:repeater"}, "vicare/ZigbeeRepeater.json"), ] with ( patch(f"{MODULE}.login", return_value=MockPyViCare(fixtures)), diff --git a/tests/components/waqi/conftest.py b/tests/components/waqi/conftest.py index bb64fdef097cf8..fa4c3b50e8dc39 100644 --- a/tests/components/waqi/conftest.py +++ b/tests/components/waqi/conftest.py @@ -7,6 +7,7 @@ import pytest from homeassistant.components.waqi.const import CONF_STATION_NUMBER, DOMAIN +from homeassistant.config_entries import ConfigSubentryData from homeassistant.const import CONF_API_KEY from homeassistant.core import HomeAssistant @@ -27,9 +28,18 @@ def mock_config_entry() -> MockConfigEntry: """Mock config entry.""" return MockConfigEntry( domain=DOMAIN, - unique_id="4584", - title="de Jongweg, Utrecht", - data={CONF_API_KEY: "asd", CONF_STATION_NUMBER: 4584}, + title="WAQI", + data={CONF_API_KEY: "asd"}, + version=2, + subentries_data=[ + ConfigSubentryData( + data={CONF_STATION_NUMBER: 4585}, + subentry_id="ABCDEF", + subentry_type="station", + title="de Jongweg, Utrecht", + unique_id="4585", + ) + ], ) diff --git a/tests/components/waqi/test_config_flow.py b/tests/components/waqi/test_config_flow.py index 03759f96ff5b3c..80a992adb9762e 100644 --- a/tests/components/waqi/test_config_flow.py +++ b/tests/components/waqi/test_config_flow.py @@ -1,211 +1,381 @@ """Test the World Air Quality Index (WAQI) config flow.""" -from typing import Any from unittest.mock import AsyncMock from aiowaqi import WAQIAuthenticationError, WAQIConnectionError import pytest -from homeassistant.components.waqi.config_flow import CONF_MAP from homeassistant.components.waqi.const import CONF_STATION_NUMBER, DOMAIN -from homeassistant.config_entries import SOURCE_USER +from homeassistant.config_entries import SOURCE_USER, ConfigSubentryData from homeassistant.const import ( + ATTR_LATITUDE, + ATTR_LOCATION, + ATTR_LONGITUDE, CONF_API_KEY, - CONF_LATITUDE, - CONF_LOCATION, - CONF_LONGITUDE, - CONF_METHOD, ) from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType +from tests.common import MockConfigEntry + + +@pytest.fixture +def second_mock_config_entry() -> MockConfigEntry: + """Mock config entry.""" + return MockConfigEntry( + domain=DOMAIN, + title="WAQI", + data={CONF_API_KEY: "asdf"}, + version=2, + subentries_data=[ + ConfigSubentryData( + data={CONF_STATION_NUMBER: 4584}, + subentry_id="ABCDEF", + subentry_type="station", + title="de Jongweg, Utrecht", + unique_id="4584", + ) + ], + ) + + +async def test_full_flow( + hass: HomeAssistant, mock_setup_entry: AsyncMock, mock_waqi: AsyncMock +) -> None: + """Test full 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" + assert not result["errors"] + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], {CONF_API_KEY: "asd"} + ) + + assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["title"] == "World Air Quality Index" + assert result["data"] == {CONF_API_KEY: "asd"} + assert len(mock_setup_entry.mock_calls) == 1 + @pytest.mark.parametrize( - ("method", "payload"), + ("exception", "error"), [ - ( - CONF_MAP, - { - CONF_LOCATION: {CONF_LATITUDE: 50.0, CONF_LONGITUDE: 10.0}, - }, - ), - ( - CONF_STATION_NUMBER, - { - CONF_STATION_NUMBER: 4584, - }, - ), + (WAQIAuthenticationError("Test error"), "invalid_auth"), + (WAQIConnectionError("Test error"), "cannot_connect"), + (Exception("Test error"), "unknown"), ], ) -async def test_full_map_flow( +async def test_entry_errors( hass: HomeAssistant, mock_setup_entry: AsyncMock, mock_waqi: AsyncMock, - method: str, - payload: dict[str, Any], + exception: Exception, + error: str, ) -> None: - """Test we get the form.""" + """Test full 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" + assert not result["errors"] + + mock_waqi.get_by_ip.side_effect = exception result = await hass.config_entries.flow.async_configure( - result["flow_id"], - {CONF_API_KEY: "asd", CONF_METHOD: method}, + result["flow_id"], {CONF_API_KEY: "asd"} ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == method + assert result["errors"] == {"base": error} + assert result["step_id"] == "user" + + mock_waqi.get_by_ip.side_effect = None result = await hass.config_entries.flow.async_configure( + result["flow_id"], {CONF_API_KEY: "asd"} + ) + + assert result["type"] is FlowResultType.CREATE_ENTRY + + +async def test_duplicate_entry( + hass: HomeAssistant, + mock_setup_entry: AsyncMock, + mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test duplicate entry handling.""" + mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.flow.async_init( + DOMAIN, context={"source": SOURCE_USER} + ) + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "user" + assert not result["errors"] + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], {CONF_API_KEY: "asd"} + ) + + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "already_configured" + + +async def test_full_map_flow( + hass: HomeAssistant, + mock_setup_entry: AsyncMock, + mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test we get the form.""" + mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, + ) + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" + + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - payload, + {"next_step_id": "map"}, + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "map" + assert not result["errors"] + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + { + ATTR_LOCATION: {ATTR_LATITUDE: 50.0, ATTR_LONGITUDE: 10.0}, + }, ) assert result["type"] is FlowResultType.CREATE_ENTRY assert result["title"] == "de Jongweg, Utrecht" - assert result["data"] == { - CONF_API_KEY: "asd", - CONF_STATION_NUMBER: 4584, - } - assert result["result"].unique_id == "4584" - assert len(mock_setup_entry.mock_calls) == 1 + assert result["data"] == {CONF_STATION_NUMBER: 4584} + assert list(mock_config_entry.subentries.values())[1].unique_id == "4584" @pytest.mark.parametrize( ("exception", "error"), [ - (WAQIAuthenticationError(), "invalid_auth"), - (WAQIConnectionError(), "cannot_connect"), - (Exception(), "unknown"), + (WAQIConnectionError("Test error"), "cannot_connect"), + (Exception("Test error"), "unknown"), ], ) -async def test_flow_errors( +async def test_map_flow_errors( hass: HomeAssistant, mock_setup_entry: AsyncMock, mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, exception: Exception, error: str, ) -> None: - """Test we handle errors during configuration.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": SOURCE_USER} + """Test we get the form.""" + mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, ) + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" - mock_waqi.get_by_ip.side_effect = exception + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {"next_step_id": "map"}, + ) - result = await hass.config_entries.flow.async_configure( + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "map" + assert not result["errors"] + + mock_waqi.get_by_coordinates.side_effect = exception + + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - {CONF_API_KEY: "asd", CONF_METHOD: CONF_MAP}, + { + ATTR_LOCATION: {ATTR_LATITUDE: 50.0, ATTR_LONGITUDE: 10.0}, + }, ) assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "map" assert result["errors"] == {"base": error} - mock_waqi.get_by_ip.side_effect = None + mock_waqi.get_by_coordinates.side_effect = None - result = await hass.config_entries.flow.async_configure( + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - {CONF_API_KEY: "asd", CONF_METHOD: CONF_MAP}, + { + ATTR_LOCATION: {ATTR_LATITUDE: 50.0, ATTR_LONGITUDE: 10.0}, + }, + ) + + assert result["type"] is FlowResultType.CREATE_ENTRY + + +async def test_map_duplicate( + hass: HomeAssistant, + mock_setup_entry: AsyncMock, + mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, + second_mock_config_entry: MockConfigEntry, +) -> None: + """Test duplicate location handling.""" + mock_config_entry.add_to_hass(hass) + second_mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, + ) + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {"next_step_id": "map"}, ) assert result["type"] is FlowResultType.FORM assert result["step_id"] == "map" + assert not result["errors"] - result = await hass.config_entries.flow.async_configure( + result = await hass.config_entries.subentries.async_configure( result["flow_id"], { - CONF_LOCATION: {CONF_LATITUDE: 50.0, CONF_LONGITUDE: 10.0}, + ATTR_LOCATION: {ATTR_LATITUDE: 50.0, ATTR_LONGITUDE: 10.0}, }, ) + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "already_configured" + + +async def test_full_station_number_flow( + hass: HomeAssistant, + mock_setup_entry: AsyncMock, + mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, +) -> None: + """Test the station number flow.""" + mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, + ) + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {"next_step_id": "station_number"}, + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "station_number" + assert not result["errors"] + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {CONF_STATION_NUMBER: 4584}, + ) + assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["title"] == "de Jongweg, Utrecht" + assert result["data"] == {CONF_STATION_NUMBER: 4584} + assert list(mock_config_entry.subentries.values())[1].unique_id == "4584" @pytest.mark.parametrize( - ("method", "payload", "exception", "error"), + ("exception", "error"), [ - ( - CONF_MAP, - { - CONF_LOCATION: {CONF_LATITUDE: 50.0, CONF_LONGITUDE: 10.0}, - }, - WAQIConnectionError(), - "cannot_connect", - ), - ( - CONF_MAP, - { - CONF_LOCATION: {CONF_LATITUDE: 50.0, CONF_LONGITUDE: 10.0}, - }, - Exception(), - "unknown", - ), - ( - CONF_STATION_NUMBER, - { - CONF_STATION_NUMBER: 4584, - }, - WAQIConnectionError(), - "cannot_connect", - ), - ( - CONF_STATION_NUMBER, - { - CONF_STATION_NUMBER: 4584, - }, - Exception(), - "unknown", - ), + (WAQIConnectionError("Test error"), "cannot_connect"), + (Exception("Test error"), "unknown"), ], ) -async def test_error_in_second_step( +async def test_station_number_flow_errors( hass: HomeAssistant, mock_setup_entry: AsyncMock, mock_waqi: AsyncMock, - method: str, - payload: dict[str, Any], + mock_config_entry: MockConfigEntry, exception: Exception, error: str, ) -> None: """Test we get the form.""" - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": SOURCE_USER} + mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, ) - assert result["type"] is FlowResultType.FORM + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" - result = await hass.config_entries.flow.async_configure( + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - {CONF_API_KEY: "asd", CONF_METHOD: method}, + {"next_step_id": "station_number"}, ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == method + assert result["step_id"] == "station_number" + assert not result["errors"] - mock_waqi.get_by_coordinates.side_effect = exception mock_waqi.get_by_station_number.side_effect = exception - result = await hass.config_entries.flow.async_configure( + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - payload, + {CONF_STATION_NUMBER: 4584}, ) assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "station_number" assert result["errors"] == {"base": error} - mock_waqi.get_by_coordinates.side_effect = None mock_waqi.get_by_station_number.side_effect = None - result = await hass.config_entries.flow.async_configure( + result = await hass.config_entries.subentries.async_configure( result["flow_id"], - payload, + {CONF_STATION_NUMBER: 4584}, ) assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["title"] == "de Jongweg, Utrecht" - assert result["data"] == { - CONF_API_KEY: "asd", - CONF_STATION_NUMBER: 4584, - } - assert len(mock_setup_entry.mock_calls) == 1 + + +async def test_station_number_duplicate( + hass: HomeAssistant, + mock_setup_entry: AsyncMock, + mock_waqi: AsyncMock, + mock_config_entry: MockConfigEntry, + second_mock_config_entry: MockConfigEntry, +) -> None: + """Test duplicate station number handling.""" + mock_config_entry.add_to_hass(hass) + second_mock_config_entry.add_to_hass(hass) + result = await hass.config_entries.subentries.async_init( + (mock_config_entry.entry_id, "station"), + context={"source": SOURCE_USER}, + ) + assert result["type"] is FlowResultType.MENU + assert result["step_id"] == "user" + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {"next_step_id": "station_number"}, + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "station_number" + assert not result["errors"] + + result = await hass.config_entries.subentries.async_configure( + result["flow_id"], + {CONF_STATION_NUMBER: 4584}, + ) + + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "already_configured" diff --git a/tests/components/waqi/test_init.py b/tests/components/waqi/test_init.py index 7e4487f8ad2b95..f4e27eee37cdc4 100644 --- a/tests/components/waqi/test_init.py +++ b/tests/components/waqi/test_init.py @@ -1,11 +1,19 @@ """Test the World Air Quality Index (WAQI) initialization.""" -from unittest.mock import AsyncMock +from typing import Any +from unittest.mock import AsyncMock, patch from aiowaqi import WAQIError +import pytest -from homeassistant.config_entries import ConfigEntryState +from homeassistant.components.waqi import DOMAIN +from homeassistant.components.waqi.const import CONF_STATION_NUMBER +from homeassistant.config_entries import ConfigEntryDisabler, ConfigEntryState +from homeassistant.const import CONF_API_KEY from homeassistant.core import HomeAssistant +from homeassistant.helpers import device_registry as dr, entity_registry as er +from homeassistant.helpers.device_registry import DeviceEntryDisabler +from homeassistant.helpers.entity_registry import RegistryEntryDisabler from . import setup_integration @@ -22,3 +30,297 @@ async def test_setup_failed( await setup_integration(hass, mock_config_entry) assert mock_config_entry.state is ConfigEntryState.SETUP_RETRY + + +async def test_migration_from_v1( + hass: HomeAssistant, + device_registry: dr.DeviceRegistry, + entity_registry: er.EntityRegistry, + mock_setup_entry: AsyncMock, +) -> None: + """Test migration from version 1 to version 2.""" + # Create a v1 config entry with conversation options and an entity + mock_config_entry = MockConfigEntry( + domain=DOMAIN, + data={CONF_API_KEY: "1234", CONF_STATION_NUMBER: 4584}, + version=1, + unique_id="4584", + title="de Jongweg, Utrecht", + ) + mock_config_entry.add_to_hass(hass) + mock_config_entry_2 = MockConfigEntry( + domain=DOMAIN, + data={CONF_API_KEY: "1234", CONF_STATION_NUMBER: 4585}, + version=1, + unique_id="4585", + title="Not de Jongweg, Utrecht", + ) + mock_config_entry_2.add_to_hass(hass) + + device_1 = device_registry.async_get_or_create( + config_entry_id=mock_config_entry.entry_id, + identifiers={(DOMAIN, "4584")}, + name="de Jongweg, Utrecht", + entry_type=dr.DeviceEntryType.SERVICE, + ) + entity_registry.async_get_or_create( + "sensor", + DOMAIN, + "4584_air_quality", + config_entry=mock_config_entry, + device_id=device_1.id, + suggested_object_id="de_jongweg_utrecht", + ) + + device_2 = device_registry.async_get_or_create( + config_entry_id=mock_config_entry_2.entry_id, + identifiers={(DOMAIN, "4585")}, + name="Not de Jongweg, Utrecht", + entry_type=dr.DeviceEntryType.SERVICE, + ) + entity_registry.async_get_or_create( + "sensor", + DOMAIN, + "4585_air_quality", + config_entry=mock_config_entry_2, + device_id=device_2.id, + suggested_object_id="not_de_jongweg_utrecht", + ) + + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() + + entries = hass.config_entries.async_entries(DOMAIN) + assert len(entries) == 1 + entry = entries[0] + assert entry.version == 2 + assert entry.minor_version == 1 + assert not entry.options + assert entry.title == "WAQI" + assert len(entry.subentries) == 2 + + subentry = list(entry.subentries.values())[0] + assert subentry.subentry_type == "station" + assert subentry.data[CONF_STATION_NUMBER] == 4584 + assert subentry.unique_id == "4584" + assert subentry.title == "de Jongweg, Utrecht" + + entity = entity_registry.async_get("sensor.de_jongweg_utrecht") + assert entity.unique_id == "4584_air_quality" + assert entity.config_subentry_id == subentry.subentry_id + assert entity.config_entry_id == entry.entry_id + + assert (device := device_registry.async_get_device(identifiers={(DOMAIN, "4584")})) + assert device.identifiers == {(DOMAIN, "4584")} + assert device.id == device_1.id + assert device.config_entries == {mock_config_entry.entry_id} + assert device.config_entries_subentries == { + mock_config_entry.entry_id: {subentry.subentry_id} + } + + subentry = list(entry.subentries.values())[1] + assert subentry.subentry_type == "station" + assert subentry.data[CONF_STATION_NUMBER] == 4585 + assert subentry.unique_id == "4585" + assert subentry.title == "Not de Jongweg, Utrecht" + + entity = entity_registry.async_get("sensor.not_de_jongweg_utrecht") + assert entity.unique_id == "4585_air_quality" + assert entity.config_subentry_id == subentry.subentry_id + assert entity.config_entry_id == entry.entry_id + assert (device := device_registry.async_get_device(identifiers={(DOMAIN, "4585")})) + assert device.identifiers == {(DOMAIN, "4585")} + assert device.id == device_2.id + assert device.config_entries == {mock_config_entry.entry_id} + assert device.config_entries_subentries == { + mock_config_entry.entry_id: {subentry.subentry_id} + } + + +@pytest.mark.parametrize( + ( + "config_entry_disabled_by", + "merged_config_entry_disabled_by", + "sensor_subentry_data", + "main_config_entry", + ), + [ + ( + [ConfigEntryDisabler.USER, None], + None, + [ + { + "sensor_entity_id": "sensor.not_de_jongweg_utrecht_air_quality_index", + "device_disabled_by": None, + "entity_disabled_by": None, + "device": 1, + }, + { + "sensor_entity_id": "sensor.de_jongweg_utrecht_air_quality_index", + "device_disabled_by": DeviceEntryDisabler.USER, + "entity_disabled_by": RegistryEntryDisabler.DEVICE, + "device": 0, + }, + ], + 1, + ), + ( + [None, ConfigEntryDisabler.USER], + None, + [ + { + "sensor_entity_id": "sensor.de_jongweg_utrecht_air_quality_index", + "device_disabled_by": DeviceEntryDisabler.USER, + "entity_disabled_by": RegistryEntryDisabler.DEVICE, + "device": 0, + }, + { + "sensor_entity_id": "sensor.not_de_jongweg_utrecht_air_quality_index", + "device_disabled_by": None, + "entity_disabled_by": None, + "device": 1, + }, + ], + 0, + ), + ( + [ConfigEntryDisabler.USER, ConfigEntryDisabler.USER], + ConfigEntryDisabler.USER, + [ + { + "sensor_entity_id": "sensor.de_jongweg_utrecht_air_quality_index", + "device_disabled_by": DeviceEntryDisabler.CONFIG_ENTRY, + "entity_disabled_by": RegistryEntryDisabler.CONFIG_ENTRY, + "device": 0, + }, + { + "sensor_entity_id": "sensor.not_de_jongweg_utrecht_air_quality_index", + "device_disabled_by": DeviceEntryDisabler.CONFIG_ENTRY, + "entity_disabled_by": None, + "device": 1, + }, + ], + 0, + ), + ], +) +async def test_migration_from_v1_disabled( + hass: HomeAssistant, + device_registry: dr.DeviceRegistry, + entity_registry: er.EntityRegistry, + config_entry_disabled_by: list[ConfigEntryDisabler | None], + merged_config_entry_disabled_by: ConfigEntryDisabler | None, + sensor_subentry_data: list[dict[str, Any]], + main_config_entry: int, +) -> None: + """Test migration where the config entries are disabled.""" + mock_config_entry = MockConfigEntry( + domain=DOMAIN, + data={CONF_API_KEY: "1234", CONF_STATION_NUMBER: 4584}, + version=1, + unique_id="4584", + title="de Jongweg, Utrecht", + disabled_by=config_entry_disabled_by[0], + ) + mock_config_entry.add_to_hass(hass) + mock_config_entry_2 = MockConfigEntry( + domain=DOMAIN, + data={CONF_API_KEY: "1234", CONF_STATION_NUMBER: 4585}, + version=1, + unique_id="4585", + title="Not de Jongweg, Utrecht", + disabled_by=config_entry_disabled_by[1], + ) + mock_config_entry_2.add_to_hass(hass) + mock_config_entries = [mock_config_entry, mock_config_entry_2] + + device_1 = device_registry.async_get_or_create( + config_entry_id=mock_config_entry.entry_id, + identifiers={(DOMAIN, mock_config_entry.unique_id)}, + name=mock_config_entry.title, + entry_type=dr.DeviceEntryType.SERVICE, + disabled_by=DeviceEntryDisabler.CONFIG_ENTRY, + ) + entity_registry.async_get_or_create( + "sensor", + DOMAIN, + mock_config_entry.unique_id, + config_entry=mock_config_entry, + device_id=device_1.id, + suggested_object_id="de_jongweg_utrecht_air_quality_index", + disabled_by=RegistryEntryDisabler.CONFIG_ENTRY, + ) + + device_2 = device_registry.async_get_or_create( + config_entry_id=mock_config_entry_2.entry_id, + identifiers={(DOMAIN, mock_config_entry_2.unique_id)}, + name=mock_config_entry_2.title, + entry_type=dr.DeviceEntryType.SERVICE, + ) + entity_registry.async_get_or_create( + "sensor", + DOMAIN, + mock_config_entry_2.unique_id, + config_entry=mock_config_entry_2, + device_id=device_2.id, + suggested_object_id="not_de_jongweg_utrecht_air_quality_index", + ) + + devices = [device_1, device_2] + + # Run migration + with patch( + "homeassistant.components.waqi.async_setup_entry", + return_value=True, + ): + await hass.config_entries.async_setup(mock_config_entry.entry_id) + await hass.async_block_till_done() + + entries = hass.config_entries.async_entries(DOMAIN) + assert len(entries) == 1 + entry = entries[0] + assert entry.disabled_by is merged_config_entry_disabled_by + assert entry.version == 2 + assert entry.minor_version == 1 + assert not entry.options + assert entry.title == "WAQI" + assert len(entry.subentries) == 2 + station_subentries = [ + subentry + for subentry in entry.subentries.values() + if subentry.subentry_type == "station" + ] + assert len(station_subentries) == 2 + for subentry in station_subentries: + assert subentry.data == {CONF_STATION_NUMBER: int(subentry.unique_id)} + assert "de Jongweg" in subentry.title + + assert not device_registry.async_get_device( + identifiers={(DOMAIN, mock_config_entry.entry_id)} + ) + assert not device_registry.async_get_device( + identifiers={(DOMAIN, mock_config_entry_2.entry_id)} + ) + + for idx, subentry in enumerate(station_subentries): + subentry_data = sensor_subentry_data[idx] + entity = entity_registry.async_get(subentry_data["sensor_entity_id"]) + assert entity.unique_id == subentry.unique_id + assert entity.config_subentry_id == subentry.subentry_id + assert entity.config_entry_id == entry.entry_id + assert entity.disabled_by is subentry_data["entity_disabled_by"] + + assert ( + device := device_registry.async_get_device( + identifiers={(DOMAIN, subentry.unique_id)} + ) + ) + assert device.identifiers == {(DOMAIN, subentry.unique_id)} + assert device.id == devices[subentry_data["device"]].id + assert device.config_entries == { + mock_config_entries[main_config_entry].entry_id + } + assert device.config_entries_subentries == { + mock_config_entries[main_config_entry].entry_id: {subentry.subentry_id} + } + assert device.disabled_by is subentry_data["device_disabled_by"] diff --git a/tests/components/wyoming/test_devices.py b/tests/components/wyoming/test_devices.py index d03f2622c71560..299f5f57216882 100644 --- a/tests/components/wyoming/test_devices.py +++ b/tests/components/wyoming/test_devices.py @@ -2,7 +2,7 @@ from __future__ import annotations -from homeassistant.components.assist_pipeline.select import OPTION_PREFERRED +from homeassistant.components.assist_pipeline import OPTION_PREFERRED from homeassistant.components.wyoming import DOMAIN from homeassistant.components.wyoming.devices import SatelliteDevice from homeassistant.config_entries import ConfigEntry diff --git a/tests/components/wyoming/test_select.py b/tests/components/wyoming/test_select.py index 2438d25b838c26..e929f92f652d30 100644 --- a/tests/components/wyoming/test_select.py +++ b/tests/components/wyoming/test_select.py @@ -3,9 +3,10 @@ from unittest.mock import Mock, patch from homeassistant.components import assist_pipeline -from homeassistant.components.assist_pipeline.pipeline import PipelineData -from homeassistant.components.assist_pipeline.select import OPTION_PREFERRED -from homeassistant.components.assist_pipeline.vad import VadSensitivity +from homeassistant.components.assist_pipeline import OPTION_PREFERRED, VadSensitivity +from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import + PipelineData, +) from homeassistant.components.wyoming.devices import SatelliteDevice from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant diff --git a/tests/helpers/test_trigger_template_entity.py b/tests/helpers/test_trigger_template_entity.py index fcfdd249d75e1b..08f6c7de8197e0 100644 --- a/tests/helpers/test_trigger_template_entity.py +++ b/tests/helpers/test_trigger_template_entity.py @@ -5,7 +5,9 @@ import pytest from homeassistant.components.sensor import SensorDeviceClass -from homeassistant.components.sensor.helpers import async_parse_date_datetime +from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import + async_parse_date_datetime, +) from homeassistant.const import ( CONF_DEVICE_CLASS, CONF_ICON,