Compare commits

..

13 Commits

Author SHA1 Message Date
epenet
3a79fb273e Merge branch 'dev' into block_pyserial_asyncio 2025-10-16 12:08:06 +02:00
J. Nick Koston
162c27b92c Merge branch 'dev' into block_pyserial_asyncio 2025-05-26 10:40:34 -05:00
J. Nick Koston
e7e42dc318 Merge branch 'dev' into block_pyserial_asyncio 2024-08-16 17:48:47 -05:00
J. Nick Koston
9aa288ed44 Merge branch 'dev' into block_pyserial_asyncio 2024-06-22 16:36:10 -05:00
J. Nick Koston
5aacb6e1b8 Merge branch 'dev' into block_pyserial_asyncio 2024-06-22 15:18:40 -05:00
J. Nick Koston
1428ce4084 Merge branch 'dev' into block_pyserial_asyncio 2024-05-05 10:06:24 -05:00
J. Nick Koston
dba07ac90d Merge branch 'dev' into block_pyserial_asyncio 2024-05-03 02:12:40 -05:00
J. Nick Koston
264df97069 Merge branch 'dev' into block_pyserial_asyncio 2024-05-02 16:37:09 -05:00
J. Nick Koston
c3f493394a Merge branch 'drop_pyserial_zha' into block_pyserial_asyncio 2024-05-02 11:10:42 -05:00
J. Nick Koston
7e3e82746f Drop pyserial-asyncio from zha
This may not be possible yet, but the long term goal is to get
rid of pyserial-asyncio everywhere so we can prevent future
integrations from using it and than we have to go though the
effort of getting them to replace it with pyserial-asyncio-fast
to avoid the event loop being blocked

needed for https://github.com/home-assistant/core/pull/116635
2024-05-02 11:09:43 -05:00
J. Nick Koston
33724240d7 Merge branch 'serial' into block_pyserial_asyncio 2024-05-02 11:06:25 -05:00
J. Nick Koston
998a4eab9e Replace pyserial-asyncio with pyserial-asyncio-fast in serial
pyserial-asyncio is unmantained and does blocking I/O in the event loop
2024-05-02 11:04:45 -05:00
J. Nick Koston
9985262a53 Block pyserial-asyncio in favor of pyserial-asyncio-fast
pyserial-asyncio does blocking I/O in asyncio loop and is not maintained
2024-05-02 11:00:12 -05:00
70 changed files with 281 additions and 7826 deletions

View File

@@ -41,8 +41,6 @@ from .pipeline import (
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__ = (
@@ -53,14 +51,11 @@ __all__ = (
"SAMPLE_CHANNELS",
"SAMPLE_RATE",
"SAMPLE_WIDTH",
"AssistPipelineSelect",
"AudioSettings",
"Pipeline",
"PipelineEvent",
"PipelineEventType",
"PipelineNotFound",
"VadSensitivity",
"VadSensitivitySelect",
"WakeWordSettings",
"async_create_default_pipeline",
"async_get_pipelines",

View File

@@ -13,6 +13,6 @@
"integration_type": "system",
"iot_class": "cloud_push",
"loggers": ["acme", "hass_nabucasa", "snitun"],
"requirements": ["hass-nabucasa==1.4.0"],
"requirements": ["hass-nabucasa==1.3.0"],
"single_config_entry": true
}

View File

@@ -8,11 +8,8 @@ from eheimdigital.classic_vario import EheimDigitalClassicVario
from eheimdigital.device import EheimDigitalDevice
from eheimdigital.types import FilterErrorCode
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
)
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.components.sensor.const import SensorDeviceClass
from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
import asyncio
from collections import Counter
from collections.abc import Awaitable, Callable
from typing import Literal, NotRequired, TypedDict
from typing import Literal, TypedDict
import voluptuous as vol
@@ -29,7 +29,7 @@ async def async_get_manager(hass: HomeAssistant) -> EnergyManager:
class FlowFromGridSourceType(TypedDict):
"""Dictionary describing the 'from' stat for the grid source."""
# statistic_id of an energy meter (kWh)
# statistic_id of a an energy meter (kWh)
stat_energy_from: str
# statistic_id of costs ($) incurred from the energy meter
@@ -58,14 +58,6 @@ class FlowToGridSourceType(TypedDict):
number_energy_price: float | None # Price for energy ($/kWh)
class GridPowerSourceType(TypedDict):
"""Dictionary holding the source of grid power consumption."""
# statistic_id of a power meter (kW)
# negative values indicate grid return
stat_power: str
class GridSourceType(TypedDict):
"""Dictionary holding the source of grid energy consumption."""
@@ -73,7 +65,6 @@ class GridSourceType(TypedDict):
flow_from: list[FlowFromGridSourceType]
flow_to: list[FlowToGridSourceType]
power: NotRequired[list[GridPowerSourceType]]
cost_adjustment_day: float
@@ -84,7 +75,6 @@ class SolarSourceType(TypedDict):
type: Literal["solar"]
stat_energy_from: str
stat_power: NotRequired[str]
config_entry_solar_forecast: list[str] | None
@@ -95,8 +85,6 @@ class BatterySourceType(TypedDict):
stat_energy_from: str
stat_energy_to: str
# positive when discharging, negative when charging
stat_power: NotRequired[str]
class GasSourceType(TypedDict):
@@ -148,15 +136,12 @@ class DeviceConsumption(TypedDict):
# This is an ever increasing value
stat_consumption: str
# optional power meter
stat_power: NotRequired[str]
# An optional custom name for display in energy graphs
name: str | None
# An optional statistic_id identifying a device
# that includes this device's consumption in its total
included_in_stat: NotRequired[str]
included_in_stat: str | None
class EnergyPreferences(TypedDict):
@@ -209,12 +194,6 @@ FLOW_TO_GRID_SOURCE_SCHEMA = vol.Schema(
}
)
GRID_POWER_SOURCE_SCHEMA = vol.Schema(
{
vol.Required("stat_power"): str,
}
)
def _generate_unique_value_validator(key: str) -> Callable[[list[dict]], list[dict]]:
"""Generate a validator that ensures a value is only used once."""
@@ -245,10 +224,6 @@ GRID_SOURCE_SCHEMA = vol.Schema(
[FLOW_TO_GRID_SOURCE_SCHEMA],
_generate_unique_value_validator("stat_energy_to"),
),
vol.Optional("power"): vol.All(
[GRID_POWER_SOURCE_SCHEMA],
_generate_unique_value_validator("stat_power"),
),
vol.Required("cost_adjustment_day"): vol.Coerce(float),
}
)
@@ -256,7 +231,6 @@ SOLAR_SOURCE_SCHEMA = vol.Schema(
{
vol.Required("type"): "solar",
vol.Required("stat_energy_from"): str,
vol.Optional("stat_power"): str,
vol.Optional("config_entry_solar_forecast"): vol.Any([str], None),
}
)
@@ -265,7 +239,6 @@ BATTERY_SOURCE_SCHEMA = vol.Schema(
vol.Required("type"): "battery",
vol.Required("stat_energy_from"): str,
vol.Required("stat_energy_to"): str,
vol.Optional("stat_power"): str,
}
)
GAS_SOURCE_SCHEMA = vol.Schema(
@@ -321,7 +294,6 @@ ENERGY_SOURCE_SCHEMA = vol.All(
DEVICE_CONSUMPTION_SCHEMA = vol.Schema(
{
vol.Required("stat_consumption"): str,
vol.Optional("stat_power"): str,
vol.Optional("name"): str,
vol.Optional("included_in_stat"): str,
}

View File

@@ -16,9 +16,7 @@ from homeassistant.components.sensor import (
SensorEntity,
SensorStateClass,
)
from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import
reset_detected,
)
from homeassistant.components.sensor.recorder import reset_detected
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, UnitOfEnergy, UnitOfVolume
from homeassistant.core import (
HomeAssistant,

View File

@@ -12,7 +12,6 @@ from homeassistant.const import (
STATE_UNAVAILABLE,
STATE_UNKNOWN,
UnitOfEnergy,
UnitOfPower,
UnitOfVolume,
)
from homeassistant.core import HomeAssistant, callback, valid_entity_id
@@ -24,17 +23,12 @@ ENERGY_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.ENERGY,)
ENERGY_USAGE_UNITS: dict[str, tuple[UnitOfEnergy, ...]] = {
sensor.SensorDeviceClass.ENERGY: tuple(UnitOfEnergy)
}
POWER_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.POWER,)
POWER_USAGE_UNITS: dict[str, tuple[UnitOfPower, ...]] = {
sensor.SensorDeviceClass.POWER: tuple(UnitOfPower)
}
ENERGY_PRICE_UNITS = tuple(
f"/{unit}" for units in ENERGY_USAGE_UNITS.values() for unit in units
)
ENERGY_UNIT_ERROR = "entity_unexpected_unit_energy"
ENERGY_PRICE_UNIT_ERROR = "entity_unexpected_unit_energy_price"
POWER_UNIT_ERROR = "entity_unexpected_unit_power"
GAS_USAGE_DEVICE_CLASSES = (
sensor.SensorDeviceClass.ENERGY,
sensor.SensorDeviceClass.GAS,
@@ -88,10 +82,6 @@ def _get_placeholders(hass: HomeAssistant, issue_type: str) -> dict[str, str] |
f"{currency}{unit}" for unit in ENERGY_PRICE_UNITS
),
}
if issue_type == POWER_UNIT_ERROR:
return {
"power_units": ", ".join(POWER_USAGE_UNITS[sensor.SensorDeviceClass.POWER]),
}
if issue_type == GAS_UNIT_ERROR:
return {
"energy_units": ", ".join(GAS_USAGE_UNITS[sensor.SensorDeviceClass.ENERGY]),
@@ -169,7 +159,7 @@ class EnergyPreferencesValidation:
@callback
def _async_validate_stat_common(
def _async_validate_usage_stat(
hass: HomeAssistant,
metadata: dict[str, tuple[int, recorder.models.StatisticMetaData]],
stat_id: str,
@@ -177,41 +167,37 @@ def _async_validate_stat_common(
allowed_units: Mapping[str, Sequence[str]],
unit_error: str,
issues: ValidationIssues,
check_negative: bool = False,
) -> str | None:
"""Validate common aspects of a statistic.
Returns the entity_id if validation succeeds, None otherwise.
"""
) -> None:
"""Validate a statistic."""
if stat_id not in metadata:
issues.add_issue(hass, "statistics_not_defined", stat_id)
has_entity_source = valid_entity_id(stat_id)
if not has_entity_source:
return None
return
entity_id = stat_id
if not recorder.is_entity_recorded(hass, entity_id):
issues.add_issue(hass, "recorder_untracked", entity_id)
return None
return
if (state := hass.states.get(entity_id)) is None:
issues.add_issue(hass, "entity_not_defined", entity_id)
return None
return
if state.state in (STATE_UNAVAILABLE, STATE_UNKNOWN):
issues.add_issue(hass, "entity_unavailable", entity_id, state.state)
return None
return
try:
current_value: float | None = float(state.state)
except ValueError:
issues.add_issue(hass, "entity_state_non_numeric", entity_id, state.state)
return None
return
if check_negative and current_value is not None and current_value < 0:
if current_value is not None and current_value < 0:
issues.add_issue(hass, "entity_negative_state", entity_id, current_value)
device_class = state.attributes.get(ATTR_DEVICE_CLASS)
@@ -225,36 +211,6 @@ def _async_validate_stat_common(
if device_class and unit not in allowed_units.get(device_class, []):
issues.add_issue(hass, unit_error, entity_id, unit)
return entity_id
@callback
def _async_validate_usage_stat(
hass: HomeAssistant,
metadata: dict[str, tuple[int, recorder.models.StatisticMetaData]],
stat_id: str,
allowed_device_classes: Sequence[str],
allowed_units: Mapping[str, Sequence[str]],
unit_error: str,
issues: ValidationIssues,
) -> None:
"""Validate a statistic."""
entity_id = _async_validate_stat_common(
hass,
metadata,
stat_id,
allowed_device_classes,
allowed_units,
unit_error,
issues,
check_negative=True,
)
if entity_id is None:
return
state = hass.states.get(entity_id)
assert state is not None
state_class = state.attributes.get(sensor.ATTR_STATE_CLASS)
allowed_state_classes = [
@@ -299,39 +255,6 @@ def _async_validate_price_entity(
issues.add_issue(hass, unit_error, entity_id, unit)
@callback
def _async_validate_power_stat(
hass: HomeAssistant,
metadata: dict[str, tuple[int, recorder.models.StatisticMetaData]],
stat_id: str,
allowed_device_classes: Sequence[str],
allowed_units: Mapping[str, Sequence[str]],
unit_error: str,
issues: ValidationIssues,
) -> None:
"""Validate a power statistic."""
entity_id = _async_validate_stat_common(
hass,
metadata,
stat_id,
allowed_device_classes,
allowed_units,
unit_error,
issues,
check_negative=False,
)
if entity_id is None:
return
state = hass.states.get(entity_id)
assert state is not None
state_class = state.attributes.get(sensor.ATTR_STATE_CLASS)
if state_class != sensor.SensorStateClass.MEASUREMENT:
issues.add_issue(hass, "entity_unexpected_state_class", entity_id, state_class)
@callback
def _async_validate_cost_stat(
hass: HomeAssistant,
@@ -511,21 +434,6 @@ async def async_validate(hass: HomeAssistant) -> EnergyPreferencesValidation:
)
)
for power_stat in source.get("power", []):
wanted_statistics_metadata.add(power_stat["stat_power"])
validate_calls.append(
functools.partial(
_async_validate_power_stat,
hass,
statistics_metadata,
power_stat["stat_power"],
POWER_USAGE_DEVICE_CLASSES,
POWER_USAGE_UNITS,
POWER_UNIT_ERROR,
source_result,
)
)
elif source["type"] == "gas":
wanted_statistics_metadata.add(source["stat_energy_from"])
validate_calls.append(

View File

@@ -10,8 +10,8 @@ from homeassistant.components.sensor import (
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

View File

@@ -6,7 +6,7 @@ from dataclasses import replace
from aioesphomeapi import EntityInfo, SelectInfo, SelectState
from homeassistant.components.assist_pipeline import (
from homeassistant.components.assist_pipeline.select import (
AssistPipelineSelect,
VadSensitivitySelect,
)

View File

@@ -4,12 +4,8 @@ from __future__ import annotations
from pyfirefly.models import Account, Category
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorStateClass,
StateType,
)
from homeassistant.components.sensor import SensorEntity, SensorStateClass, StateType
from homeassistant.components.sensor.const import SensorDeviceClass
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

View File

@@ -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): cv.small_float,
vol.Optional(ATTR_SPEED, default=0.5): cv.small_float,
vol.Optional(ATTR_MOVE_MODE, default=RELATIVE_MOVE): vol.In(
[
CONTINUOUS_MOVE,
@@ -210,10 +210,10 @@ class ONVIFCameraEntity(ONVIFBaseEntity, Camera):
async def async_perform_ptz(
self,
distance,
speed,
move_mode,
continuous_duration,
preset,
speed=None,
pan=None,
tilt=None,
zoom=None,

View File

@@ -602,11 +602,10 @@ class ONVIFDevice:
return
req.PresetToken = preset_val
if speed_val is not None:
req.Speed = {
"PanTilt": {"x": speed_val, "y": speed_val},
"Zoom": {"x": speed_val},
}
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)

View File

@@ -30,6 +30,7 @@ ptz:
max: 1
step: 0.01
speed:
default: 0.5
selector:
number:
min: 0

View File

@@ -59,8 +59,8 @@ from .coordinator import (
)
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_deprecated_firmware_issue(hass, entry)
async_manage_wall_display_firmware_unsupported_issue(hass, entry)
async_manage_ble_scanner_firmware_unsupported_issue(
hass,
entry,

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
from enum import StrEnum
from logging import Logger, getLogger
import re
from typing import Final, TypedDict
from typing import Final
from aioshelly.const import (
MODEL_BULB,
@@ -232,6 +232,7 @@ 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}"
@@ -244,28 +245,9 @@ BLE_SCANNER_FIRMWARE_UNSUPPORTED_ISSUE_ID = "ble_scanner_firmware_unsupported_{u
OUTBOUND_WEBSOCKET_INCORRECTLY_ENABLED_ISSUE_ID = (
"outbound_websocket_incorrectly_enabled_{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] = {}
WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID = (
"wall_display_firmware_unsupported_{unique}"
)
GAS_VALVE_OPEN_STATES = ("opening", "opened")

View File

@@ -4,7 +4,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from aioshelly.const import MODEL_OUT_PLUG_S_G3, MODEL_PLUG_S_G3
from aioshelly.const import MODEL_OUT_PLUG_S_G3, MODEL_PLUG_S_G3, MODEL_WALL_DISPLAY
from aioshelly.exceptions import DeviceConnectionError, RpcCallError
from aioshelly.rpc_device import RpcDevice
from awesomeversion import AwesomeVersion
@@ -19,10 +19,10 @@ from .const import (
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,25 +70,21 @@ def async_manage_ble_scanner_firmware_unsupported_issue(
@callback
def async_manage_deprecated_firmware_issue(
def async_manage_wall_display_firmware_unsupported_issue(
hass: HomeAssistant,
entry: ShellyConfigEntry,
) -> None:
"""Manage deprecated firmware issue."""
issue_id = DEPRECATED_FIRMWARE_ISSUE_ID.format(unique=entry.unique_id)
"""Manage the Wall Display firmware unsupported issue."""
issue_id = WALL_DISPLAY_FIRMWARE_UNSUPPORTED_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 < min_firmware:
if firmware < WALL_DISPLAY_MIN_FIRMWARE:
ir.async_create_issue(
hass,
DOMAIN,
@@ -96,12 +92,11 @@ def async_manage_deprecated_firmware_issue(
is_fixable=True,
is_persistent=True,
severity=ir.IssueSeverity.WARNING,
translation_key="deprecated_firmware",
translation_key="wall_display_firmware_unsupported",
translation_placeholders={
"device_name": device.name,
"ip_address": device.ip_address,
"firmware": firmware,
"ha_version": ha_version,
},
data={"entry_id": entry.entry_id},
)
@@ -246,7 +241,7 @@ async def async_create_fix_flow(
if (
"ble_scanner_firmware_unsupported" in issue_id
or "deprecated_firmware" in issue_id
or "wall_display_firmware_unsupported" in issue_id
):
return FirmwareUpdateFlow(device)

View File

@@ -312,13 +312,13 @@
}
}
},
"deprecated_firmware": {
"wall_display_firmware_unsupported": {
"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 {ha_version}.\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 2025.11.0.\n\nSelect **Submit** button to start the OTA update to the latest stable firmware version."
}
},
"abort": {

View File

@@ -21,9 +21,7 @@ from homeassistant.components.sensor import (
SensorEntity,
SensorStateClass,
)
from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import
async_parse_date_datetime,
)
from homeassistant.components.sensor.helpers import async_parse_date_datetime
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_ENTITY_ID,

View File

@@ -20,9 +20,7 @@ from homeassistant.components.sensor import (
SensorExtraStoredData,
SensorStateClass,
)
from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import
_suggest_report_issue,
)
from homeassistant.components.sensor.recorder import _suggest_report_issue
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_DEVICE_CLASS,

View File

@@ -24,7 +24,6 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -118,32 +117,6 @@ GLOBAL_SENSORS: tuple[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(),
),
)

View File

@@ -21,15 +21,6 @@
},
"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": {
@@ -99,12 +90,6 @@
},
"ventilation_level": {
"default": "mdi:fan"
},
"zigbee_signal_strength": {
"default": "mdi:wifi"
},
"valve_position": {
"default": "mdi:pipe-valve"
}
}
},

View File

@@ -943,23 +943,6 @@ GLOBAL_SENSORS: tuple[ViCareSensorEntityDescription, ...] = (
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",

View File

@@ -66,18 +66,6 @@
},
"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": {
@@ -514,12 +502,6 @@
},
"fuel_need": {
"name": "Fuel need"
},
"zigbee_signal_strength": {
"name": "[%key:component::sensor::entity_component::signal_strength::name%]"
},
"valve_position": {
"name": "Valve position"
}
},
"water_heater": {

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from homeassistant.components.assist_pipeline.repair_flows import ( # pylint: disable=hass-component-root-import
from homeassistant.components.assist_pipeline.repair_flows import (
AssistInProgressDeprecatedRepairFlow,
)
from homeassistant.components.repairs import RepairsFlow

View File

@@ -4,7 +4,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from homeassistant.components.assist_pipeline import (
from homeassistant.components.assist_pipeline.select import (
AssistPipelineSelect,
VadSensitivitySelect,
)

View File

@@ -8,6 +8,6 @@
"integration_type": "device",
"iot_class": "cloud_polling",
"loggers": ["volvocarsapi"],
"quality_scale": "platinum",
"quality_scale": "silver",
"requirements": ["volvocarsapi==0.4.3"]
}

View File

@@ -42,7 +42,7 @@ rules:
# Gold
devices: done
diagnostics: done
diagnostics: todo
discovery-update-info:
status: exempt
comment: |
@@ -52,12 +52,12 @@ rules:
comment: |
No discovery possible.
docs-data-update: done
docs-examples: done
docs-examples: todo
docs-known-limitations: done
docs-supported-devices: done
docs-supported-functions: done
docs-troubleshooting: done
docs-use-cases: done
docs-use-cases: todo
dynamic-devices:
status: exempt
comment: |
@@ -70,10 +70,7 @@ rules:
exception-translations: done
icon-translations: done
reconfiguration-flow: done
repair-issues:
status: exempt
comment: |
This integration doesn't have any cases where raising an issue is needed.
repair-issues: todo
stale-devices:
status: exempt
comment: |

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from homeassistant.components.assist_pipeline import VadSensitivity
from homeassistant.components.assist_pipeline.vad import VadSensitivity
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_registry as er

View File

@@ -4,11 +4,11 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Final
from homeassistant.components.assist_pipeline import (
from homeassistant.components.assist_pipeline.select 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

View File

@@ -16,9 +16,7 @@ from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
)
from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import
async_parse_date_datetime,
)
from homeassistant.components.sensor.helpers import async_parse_date_datetime
from homeassistant.const import (
ATTR_ENTITY_PICTURE,
ATTR_FRIENDLY_NAME,

View File

@@ -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.4.0
hass-nabucasa==1.3.0
hassil==3.2.0
home-assistant-bluetooth==1.13.1
home-assistant-frontend==20251001.4
@@ -190,6 +190,10 @@ scapy>=2.6.1
# https://github.com/theupdateframework/python-tuf/releases/tag/v4.0.0
tuf>=4.0.0
# pyserial-asyncio does blocking I/O in asyncio loop, use pyserial-asyncio-fast
# instead as pyserial-asyncio is not maintained
pyserial-asyncio==1000000000.0.0
# https://github.com/jd/tenacity/issues/471
tenacity!=8.4.0

View File

@@ -126,6 +126,7 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
}
_IGNORE_ROOT_IMPORT = (
"assist_pipeline",
"automation",
"bluetooth",
"camera",
@@ -143,6 +144,7 @@ _IGNORE_ROOT_IMPORT = (
"recorder",
"rest",
"script",
"sensor",
"stream",
)

View File

@@ -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.4.0",
"hass-nabucasa==1.3.0",
# When bumping httpx, please check the version pins of
# httpcore, anyio, and h11 in gen_requirements_all
"httpx==0.28.1",

2
requirements.txt generated
View File

@@ -22,7 +22,7 @@ certifi>=2021.5.30
ciso8601==2.3.3
cronsim==2.6
fnv-hash-fast==1.6.0
hass-nabucasa==1.4.0
hass-nabucasa==1.3.0
httpx==0.28.1
home-assistant-bluetooth==1.13.1
ifaddr==0.2.0

2
requirements_all.txt generated
View File

@@ -1154,7 +1154,7 @@ habiticalib==0.4.5
habluetooth==5.7.0
# homeassistant.components.cloud
hass-nabucasa==1.4.0
hass-nabucasa==1.3.0
# homeassistant.components.splunk
hass-splunk==0.1.1

View File

@@ -1015,7 +1015,7 @@ habiticalib==0.4.5
habluetooth==5.7.0
# homeassistant.components.cloud
hass-nabucasa==1.4.0
hass-nabucasa==1.3.0
# homeassistant.components.assist_satellite
# homeassistant.components.conversation

View File

@@ -215,6 +215,10 @@ scapy>=2.6.1
# https://github.com/theupdateframework/python-tuf/releases/tag/v4.0.0
tuf>=4.0.0
# pyserial-asyncio does blocking I/O in asyncio loop, use pyserial-asyncio-fast
# instead as pyserial-asyncio is not maintained
pyserial-asyncio==1000000000.0.0
# https://github.com/jd/tenacity/issues/471
tenacity!=8.4.0

View File

@@ -28,9 +28,7 @@ from homeassistant.components.alexa import errors as alexa_errors
# pylint: disable-next=hass-component-root-import
from homeassistant.components.alexa.entities import LightCapabilities
from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import
STORAGE_KEY,
)
from homeassistant.components.assist_pipeline.pipeline 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

View File

@@ -9,9 +9,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
from hass_nabucasa.voice import STTResponse, VoiceError
import pytest
from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import
STORAGE_KEY,
)
from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY
from homeassistant.components.cloud.const import DOMAIN
from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN
from homeassistant.core import HomeAssistant

View File

@@ -13,9 +13,7 @@ from hass_nabucasa.voice_data import TTS_VOICES
import pytest
import voluptuous as vol
from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import
STORAGE_KEY,
)
from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY
from homeassistant.components.cloud.const import DEFAULT_TTS_DEFAULT_VOICE, DOMAIN
from homeassistant.components.cloud.tts import (
DEFAULT_VOICES,

View File

@@ -3,7 +3,7 @@
from unittest.mock import patch
from homeassistant.components.cups import CONF_PRINTERS, DOMAIN
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.components.sensor.const 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

View File

@@ -1,56 +0,0 @@
"""Fixtures for energy component tests."""
from unittest.mock import patch
import pytest
from homeassistant.components.energy import async_get_manager
from homeassistant.components.energy.data import EnergyManager
from homeassistant.components.recorder import Recorder
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
@pytest.fixture
def mock_is_entity_recorded():
"""Mock recorder.is_entity_recorded."""
mocks = {}
with patch(
"homeassistant.components.recorder.is_entity_recorded",
side_effect=lambda hass, entity_id: mocks.get(entity_id, True),
):
yield mocks
@pytest.fixture
def mock_get_metadata():
"""Mock recorder.statistics.get_metadata."""
mocks = {}
def _get_metadata(_hass, *, statistic_ids):
result = {}
for statistic_id in statistic_ids:
if statistic_id in mocks:
if mocks[statistic_id] is not None:
result[statistic_id] = mocks[statistic_id]
else:
result[statistic_id] = (1, {})
return result
with patch(
"homeassistant.components.recorder.statistics.get_metadata",
wraps=_get_metadata,
):
yield mocks
@pytest.fixture
async def mock_energy_manager(
recorder_mock: Recorder, hass: HomeAssistant
) -> EnergyManager:
"""Set up energy."""
assert await async_setup_component(hass, "energy", {"energy": {}})
manager = await async_get_manager(hass)
manager.data = manager.default_preferences()
return manager

View File

@@ -17,9 +17,7 @@ from homeassistant.components.sensor import (
SensorDeviceClass,
SensorStateClass,
)
from homeassistant.components.sensor.recorder import ( # pylint: disable=hass-component-root-import
compile_statistics,
)
from homeassistant.components.sensor.recorder import compile_statistics
from homeassistant.const import (
ATTR_DEVICE_CLASS,
ATTR_UNIT_OF_MEASUREMENT,

View File

@@ -1,24 +1,65 @@
"""Test that validation works."""
from unittest.mock import patch
import pytest
from homeassistant.components.energy import validate
from homeassistant.components.energy import async_get_manager, validate
from homeassistant.components.energy.data import EnergyManager
from homeassistant.components.recorder import Recorder
from homeassistant.const import UnitOfEnergy
from homeassistant.core import HomeAssistant
from homeassistant.helpers.json import JSON_DUMP
from homeassistant.setup import async_setup_component
ENERGY_UNITS_STRING = ", ".join(tuple(UnitOfEnergy))
ENERGY_PRICE_UNITS_STRING = ", ".join(f"EUR/{unit}" for unit in tuple(UnitOfEnergy))
@pytest.fixture
def mock_is_entity_recorded():
"""Mock recorder.is_entity_recorded."""
mocks = {}
with patch(
"homeassistant.components.recorder.is_entity_recorded",
side_effect=lambda hass, entity_id: mocks.get(entity_id, True),
):
yield mocks
@pytest.fixture
def mock_get_metadata():
"""Mock recorder.statistics.get_metadata."""
mocks = {}
def _get_metadata(_hass, *, statistic_ids):
result = {}
for statistic_id in statistic_ids:
if statistic_id in mocks:
if mocks[statistic_id] is not None:
result[statistic_id] = mocks[statistic_id]
else:
result[statistic_id] = (1, {})
return result
with patch(
"homeassistant.components.recorder.statistics.get_metadata",
wraps=_get_metadata,
):
yield mocks
@pytest.fixture(autouse=True)
async def setup_energy_for_validation(
mock_energy_manager: EnergyManager,
async def mock_energy_manager(
recorder_mock: Recorder, hass: HomeAssistant
) -> EnergyManager:
"""Ensure energy manager is set up for validation tests."""
return mock_energy_manager
"""Set up energy."""
assert await async_setup_component(hass, "energy", {"energy": {}})
manager = await async_get_manager(hass)
manager.data = manager.default_preferences()
return manager
async def test_validation_empty_config(hass: HomeAssistant) -> None:
@@ -372,7 +413,6 @@ async def test_validation_grid(
"stat_compensation": "sensor.grid_compensation_1",
}
],
"power": [],
}
]
}
@@ -464,7 +504,6 @@ async def test_validation_grid_external_cost_compensation(
"stat_compensation": "external:grid_compensation_1",
}
],
"power": [],
}
]
}
@@ -703,7 +742,6 @@ async def test_validation_grid_price_errors(
}
],
"flow_to": [],
"power": [],
}
]
}
@@ -909,7 +947,6 @@ async def test_validation_grid_no_costs_tracking(
"number_energy_price": None,
},
],
"power": [],
"cost_adjustment_day": 0.0,
}
]

View File

@@ -1,450 +0,0 @@
"""Test power stat validation."""
import pytest
from homeassistant.components.energy import validate
from homeassistant.components.energy.data import EnergyManager
from homeassistant.const import UnitOfPower
from homeassistant.core import HomeAssistant
POWER_UNITS_STRING = ", ".join(tuple(UnitOfPower))
@pytest.fixture(autouse=True)
async def setup_energy_for_validation(
mock_energy_manager: EnergyManager,
) -> EnergyManager:
"""Ensure energy manager is set up for validation tests."""
return mock_energy_manager
async def test_validation_grid_power_valid(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with valid power sensor."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.grid_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.grid_power",
"1.5",
{
"device_class": "power",
"unit_of_measurement": UnitOfPower.KILO_WATT,
"state_class": "measurement",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [[]],
"device_consumption": [],
}
async def test_validation_grid_power_wrong_unit(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with power sensor having wrong unit."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.grid_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.grid_power",
"1.5",
{
"device_class": "power",
"unit_of_measurement": "beers",
"state_class": "measurement",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "entity_unexpected_unit_power",
"affected_entities": {("sensor.grid_power", "beers")},
"translation_placeholders": {"power_units": POWER_UNITS_STRING},
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_wrong_state_class(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with power sensor having wrong state class."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.grid_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.grid_power",
"1.5",
{
"device_class": "power",
"unit_of_measurement": UnitOfPower.KILO_WATT,
"state_class": "total_increasing",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "entity_unexpected_state_class",
"affected_entities": {("sensor.grid_power", "total_increasing")},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_entity_missing(
hass: HomeAssistant, mock_energy_manager
) -> None:
"""Test validating grid with missing power sensor."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.missing_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "statistics_not_defined",
"affected_entities": {("sensor.missing_power", None)},
"translation_placeholders": None,
},
{
"type": "entity_not_defined",
"affected_entities": {("sensor.missing_power", None)},
"translation_placeholders": None,
},
]
],
"device_consumption": [],
}
async def test_validation_grid_power_entity_unavailable(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with unavailable power sensor."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.unavailable_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set("sensor.unavailable_power", "unavailable", {})
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "entity_unavailable",
"affected_entities": {("sensor.unavailable_power", "unavailable")},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_entity_non_numeric(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with non-numeric power sensor."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.non_numeric_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.non_numeric_power",
"not_a_number",
{
"device_class": "power",
"unit_of_measurement": UnitOfPower.KILO_WATT,
"state_class": "measurement",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "entity_state_non_numeric",
"affected_entities": {("sensor.non_numeric_power", "not_a_number")},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_wrong_device_class(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with power sensor having wrong device class."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.wrong_device_class_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.wrong_device_class_power",
"1.5",
{
"device_class": "energy",
"unit_of_measurement": "kWh",
"state_class": "measurement",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "entity_unexpected_device_class",
"affected_entities": {
("sensor.wrong_device_class_power", "energy")
},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_different_units(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with power sensors using different valid units."""
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.power_watt",
},
{
"stat_power": "sensor.power_milliwatt",
},
],
"cost_adjustment_day": 0.0,
}
]
}
)
hass.states.async_set(
"sensor.power_watt",
"1500",
{
"device_class": "power",
"unit_of_measurement": UnitOfPower.WATT,
"state_class": "measurement",
},
)
hass.states.async_set(
"sensor.power_milliwatt",
"1500000",
{
"device_class": "power",
"unit_of_measurement": UnitOfPower.MILLIWATT,
"state_class": "measurement",
},
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [[]],
"device_consumption": [],
}
async def test_validation_grid_power_external_statistics(
hass: HomeAssistant, mock_energy_manager, mock_get_metadata
) -> None:
"""Test validating grid with external power statistics (non-entity)."""
mock_get_metadata["external:power_stat"] = None
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "external:power_stat",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "statistics_not_defined",
"affected_entities": {("external:power_stat", None)},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}
async def test_validation_grid_power_recorder_untracked(
hass: HomeAssistant, mock_energy_manager, mock_is_entity_recorded, mock_get_metadata
) -> None:
"""Test validating grid with power sensor not tracked by recorder."""
mock_is_entity_recorded["sensor.untracked_power"] = False
await mock_energy_manager.async_update(
{
"energy_sources": [
{
"type": "grid",
"flow_from": [],
"flow_to": [],
"power": [
{
"stat_power": "sensor.untracked_power",
}
],
"cost_adjustment_day": 0.0,
}
]
}
)
result = await validate.async_validate(hass)
assert result.as_dict() == {
"energy_sources": [
[
{
"type": "recorder_untracked",
"affected_entities": {("sensor.untracked_power", None)},
"translation_placeholders": None,
}
]
],
"device_consumption": [],
}

View File

@@ -137,24 +137,17 @@ async def test_save_preferences(
"number_energy_price": 0.20,
},
],
"power": [
{
"stat_power": "sensor.grid_power",
}
],
"cost_adjustment_day": 1.2,
},
{
"type": "solar",
"stat_energy_from": "my_solar_production",
"stat_power": "my_solar_power",
"config_entry_solar_forecast": ["predicted_config_entry"],
},
{
"type": "battery",
"stat_energy_from": "my_battery_draining",
"stat_energy_to": "my_battery_charging",
"stat_power": "my_battery_power",
},
],
"device_consumption": [
@@ -162,7 +155,6 @@ async def test_save_preferences(
"stat_consumption": "some_device_usage",
"name": "My Device",
"included_in_stat": "sensor.some_other_device",
"stat_power": "sensor.some_device_power",
}
],
}
@@ -261,7 +253,6 @@ async def test_handle_duplicate_from_stat(
},
],
"flow_to": [],
"power": [],
"cost_adjustment_day": 0,
},
],

View File

@@ -28,9 +28,7 @@ from homeassistant.components import (
tts,
)
from homeassistant.components.assist_pipeline import PipelineEvent, PipelineEventType
from homeassistant.components.assist_pipeline.pipeline import ( # pylint: disable=hass-component-root-import
KEY_ASSIST_PIPELINE,
)
from homeassistant.components.assist_pipeline.pipeline import KEY_ASSIST_PIPELINE
from homeassistant.components.assist_satellite import (
AssistSatelliteConfiguration,
AssistSatelliteEntityFeature,

View File

@@ -86,7 +86,6 @@ 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",

View File

@@ -389,104 +389,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'button.eve_energy_20ecn4101_identify_1',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <ButtonDeviceClass.IDENTIFY: 'identify'>,
'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': <ANY>,
'entity_id': 'button.eve_energy_20ecn4101_identify_1',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'button.eve_energy_20ecn4101_identify_2',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <ButtonDeviceClass.IDENTIFY: 'identify'>,
'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': <ANY>,
'entity_id': 'button.eve_energy_20ecn4101_identify_2',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[eve_energy_plug][button.eve_energy_plug_identify-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -682,128 +682,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_1',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_1',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_2',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.eve_energy_20ecn4101_power_on_behavior_on_startup_2',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'previous',
})
# ---
# name: test_selects[eve_energy_plug][select.eve_energy_plug_power_on_behavior_on_startup-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -2323,230 +2323,6 @@
'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': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.eve_energy_20ecn4101_current',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.CURRENT: 'current'>,
'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': <UnitOfElectricCurrent.AMPERE: 'A'>,
})
# ---
# 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': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfElectricCurrent.AMPERE: 'A'>,
}),
'context': <ANY>,
'entity_id': 'sensor.eve_energy_20ecn4101_current',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.eve_energy_20ecn4101_energy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 3,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# 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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.eve_energy_20ecn4101_energy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.eve_energy_20ecn4101_power',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.POWER: 'power'>,
'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': <UnitOfPower.WATT: 'W'>,
})
# ---
# 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': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfPower.WATT: 'W'>,
}),
'context': <ANY>,
'entity_id': 'sensor.eve_energy_20ecn4101_power',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.eve_energy_20ecn4101_voltage',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 0,
}),
}),
'original_device_class': <SensorDeviceClass.VOLTAGE: 'voltage'>,
'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': <UnitOfElectricPotential.VOLT: 'V'>,
})
# ---
# 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': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
}),
'context': <ANY>,
'entity_id': 'sensor.eve_energy_20ecn4101_voltage',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '123.099998474121',
})
# ---
# name: test_sensors[eve_energy_plug][sensor.eve_energy_plug_current-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -291,104 +291,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>,
'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': <ANY>,
'entity_id': 'switch.eve_energy_20ecn4101_switch_1',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>,
'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': <ANY>,
'entity_id': 'switch.eve_energy_20ecn4101_switch_2',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_switches[eve_energy_plug][switch.eve_energy_plug-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -1,6 +1,6 @@
"""Test repairs handling for Shelly."""
from unittest.mock import Mock, patch
from unittest.mock import Mock
from aioshelly.const import MODEL_WALL_DISPLAY
from aioshelly.exceptions import DeviceConnectionError, RpcCallError
@@ -9,11 +9,10 @@ import pytest
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
@@ -216,25 +215,17 @@ async def test_outbound_websocket_incorrectly_enabled_issue_exc(
assert len(issue_registry.issues) == 1
async def test_deprecated_firmware_issue(
async def test_wall_display_unsupported_firmware_issue(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
mock_rpc_device: Mock,
issue_registry: ir.IssueRegistry,
) -> None:
"""Test repair issues handling deprecated firmware."""
issue_id = DEPRECATED_FIRMWARE_ISSUE_ID.format(unique=MOCK_MAC)
"""Test repair issues handling for Wall Display with unsupported firmware."""
issue_id = WALL_DISPLAY_FIRMWARE_UNSUPPORTED_ISSUE_ID.format(unique=MOCK_MAC)
assert await async_setup_component(hass, "repairs", {})
await hass.async_block_till_done()
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)
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)

View File

@@ -126,7 +126,6 @@ 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",

View File

@@ -1,233 +0,0 @@
{
"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": {}
}

View File

@@ -2040,199 +2040,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.trockner_child_lock',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.POWER: 'power'>,
'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': <ANY>,
'entity_id': 'binary_sensor.trockner_power',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.trockner_remote_control',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.trockner_wrinkle_prevent_active',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.trockner_wrinkle_prevent_active',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_wm_wm_000001][binary_sensor.washer_child_lock-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -1087,37 +1087,6 @@
'via_device_id': None,
})
# ---
# name: test_devices[da_wm_wd_01011]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': 'https://account.smartthings.com',
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': 'Realtek',
'id': <ANY>,
'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': <ANY>,
'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',

View File

@@ -465,65 +465,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': None,
'entity_id': 'select.trockner',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.trockner',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'stop',
})
# ---
# name: test_all_entities[da_wm_wm_000001][select.washer-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -10962,481 +10962,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_completion_time',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'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': <ANY>,
'entity_id': 'sensor.trockner_completion_time',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_energy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# name: test_all_entities[da_wm_wd_01011][sensor.trockner_energy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Trockner Energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.trockner_energy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_energy_difference',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# 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': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.trockner_energy_difference',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_energy_saved',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# 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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.trockner_energy_saved',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_job_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'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': <ANY>,
'entity_id': 'sensor.trockner_job_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_machine_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'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': <ANY>,
'entity_id': 'sensor.trockner_machine_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'stop',
})
# ---
# name: test_all_entities[da_wm_wd_01011][sensor.trockner_power-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_power',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.POWER: 'power'>,
'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': <UnitOfPower.WATT: 'W'>,
})
# ---
# 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': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfPower.WATT: 'W'>,
}),
'context': <ANY>,
'entity_id': 'sensor.trockner_power',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.trockner_power_energy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# 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': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.trockner_power_energy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '0.0',
})
# ---
# name: test_all_entities[da_wm_wm_000001][sensor.washer_completion_time-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -1055,54 +1055,6 @@
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.trockner_wrinkle_prevent',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'switch.trockner_wrinkle_prevent',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_wm_wm_000001_1][switch.washing_machine_bubble_soak-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -1,143 +0,0 @@
{
"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"
}
]
}

View File

@@ -1,327 +0,0 @@
{
"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"
}
]
}

View File

@@ -438,247 +438,6 @@
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model1_child_safety_lock-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.model1_child_safety_lock',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model1_identification_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.model1_identification_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.model1_identification_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model1_mounting_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.model1_mounting_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.model1_mounting_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model1_valve-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.DOOR: 'door'>,
'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': <ANY>,
'entity_id': 'binary_sensor.model1_valve',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model2_identification_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.model2_identification_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'binary_sensor.model2_identification_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_binary_sensors[burner]
StateSnapshot({
'attributes': ReadOnlyDict({

File diff suppressed because it is too large Load Diff

View File

@@ -41,11 +41,7 @@ async def test_all_entities(
entity_registry: er.EntityRegistry,
) -> None:
"""Test all entities."""
fixtures: list[Fixture] = [
Fixture({"type:boiler"}, "vicare/Vitodens300W.json"),
Fixture({"type:radiator"}, "vicare/ZigbeeTRV.json"),
Fixture({"type:repeater"}, "vicare/ZigbeeRepeater.json"),
]
fixtures: list[Fixture] = [Fixture({"type:boiler"}, "vicare/Vitodens300W.json")]
with (
patch(f"{MODULE}.login", return_value=MockPyViCare(fixtures)),
patch(f"{MODULE}.PLATFORMS", [Platform.BINARY_SENSOR]),

View File

@@ -37,10 +37,27 @@ async def test_all_entities(
"""Test all entities."""
fixtures: list[Fixture] = [
Fixture({fixture_type}, fixture_data),
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)),
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"),
]
with (
patch(f"{MODULE}.login", return_value=MockPyViCare(fixtures)),

View File

@@ -2,7 +2,7 @@
from __future__ import annotations
from homeassistant.components.assist_pipeline import OPTION_PREFERRED
from homeassistant.components.assist_pipeline.select import OPTION_PREFERRED
from homeassistant.components.wyoming import DOMAIN
from homeassistant.components.wyoming.devices import SatelliteDevice
from homeassistant.config_entries import ConfigEntry

View File

@@ -3,10 +3,9 @@
from unittest.mock import Mock, patch
from homeassistant.components import assist_pipeline
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.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.wyoming.devices import SatelliteDevice
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant

View File

@@ -5,9 +5,7 @@ from typing import Any
import pytest
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.sensor.helpers import ( # pylint: disable=hass-component-root-import
async_parse_date_datetime,
)
from homeassistant.components.sensor.helpers import async_parse_date_datetime
from homeassistant.const import (
CONF_DEVICE_CLASS,
CONF_ICON,