mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Deprecate SmartThings water heater sensors (#145060)
This commit is contained in:
parent
9d2302f2f5
commit
757c66613d
@ -149,7 +149,7 @@ class SmartThingsSensorEntityDescription(SensorEntityDescription):
|
||||
component_fn: Callable[[str], bool] | None = None
|
||||
exists_fn: Callable[[Status], bool] | None = None
|
||||
use_temperature_unit: bool = False
|
||||
deprecated: Callable[[ComponentStatus], str | None] | None = None
|
||||
deprecated: Callable[[ComponentStatus], tuple[str, str] | None] | None = None
|
||||
|
||||
|
||||
CAPABILITY_TO_SENSORS: dict[
|
||||
@ -207,7 +207,7 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
translation_key="audio_volume",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
deprecated=(
|
||||
lambda status: "media_player"
|
||||
lambda status: ("2025.10.0", "media_player")
|
||||
if Capability.AUDIO_MUTE in status
|
||||
else None
|
||||
),
|
||||
@ -519,7 +519,7 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options_attribute=Attribute.SUPPORTED_INPUT_SOURCES,
|
||||
value_fn=lambda value: value.lower() if value else None,
|
||||
deprecated=lambda _: "media_player",
|
||||
deprecated=lambda _: ("2025.10.0", "media_player"),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -528,7 +528,7 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
SmartThingsSensorEntityDescription(
|
||||
key=Attribute.PLAYBACK_REPEAT_MODE,
|
||||
translation_key="media_playback_repeat",
|
||||
deprecated=lambda _: "media_player",
|
||||
deprecated=lambda _: ("2025.10.0", "media_player"),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -537,7 +537,7 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
SmartThingsSensorEntityDescription(
|
||||
key=Attribute.PLAYBACK_SHUFFLE,
|
||||
translation_key="media_playback_shuffle",
|
||||
deprecated=lambda _: "media_player",
|
||||
deprecated=lambda _: ("2025.10.0", "media_player"),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -556,7 +556,7 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
],
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
value_fn=lambda value: MEDIA_PLAYBACK_STATE_MAP.get(value, value),
|
||||
deprecated=lambda _: "media_player",
|
||||
deprecated=lambda _: ("2025.10.0", "media_player"),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -837,6 +837,11 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
key=Attribute.TEMPERATURE,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
deprecated=(
|
||||
lambda status: ("2025.12.0", "dhw")
|
||||
if Capability.CUSTOM_OUTING_MODE in status
|
||||
else None
|
||||
),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -854,6 +859,11 @@ CAPABILITY_TO_SENSORS: dict[
|
||||
},
|
||||
THERMOSTAT_CAPABILITIES,
|
||||
],
|
||||
deprecated=(
|
||||
lambda status: ("2025.12.0", "dhw")
|
||||
if Capability.CUSTOM_OUTING_MODE in status
|
||||
else None
|
||||
),
|
||||
)
|
||||
]
|
||||
},
|
||||
@ -1109,18 +1119,20 @@ async def async_setup_entry(
|
||||
if (
|
||||
description.deprecated
|
||||
and (
|
||||
reason := description.deprecated(
|
||||
deprecation_info := description.deprecated(
|
||||
device.status[MAIN]
|
||||
)
|
||||
)
|
||||
is not None
|
||||
):
|
||||
version, reason = deprecation_info
|
||||
if deprecate_entity(
|
||||
hass,
|
||||
entity_registry,
|
||||
SENSOR_DOMAIN,
|
||||
f"{device.device.device_id}_{MAIN}_{capability}_{attribute}_{description.key}",
|
||||
f"deprecated_{reason}",
|
||||
version,
|
||||
):
|
||||
entities.append(
|
||||
SmartThingsSensor(
|
||||
|
@ -603,6 +603,14 @@
|
||||
"deprecated_media_player_scripts": {
|
||||
"title": "Deprecated sensor detected in some automations or scripts",
|
||||
"description": "The sensor {entity_name} (`{entity_id}`) is deprecated because it has been replaced with a media player entity.\n\nThe sensor was used in the following automations or scripts:\n{items}\n\nPlease update the above automations or scripts to use the new media player entity and disable the sensor to fix this issue."
|
||||
},
|
||||
"deprecated_dhw": {
|
||||
"title": "Water heater sensors deprecated",
|
||||
"description": "The sensor {entity_name} (`{entity_id}`) is deprecated because it has been replaced with a water heater entity.\n\nPlease update your dashboards and templates to use the new water heater entity and disable the sensor to fix this issue."
|
||||
},
|
||||
"deprecated_dhw_scripts": {
|
||||
"title": "[%key:component::smartthings::issues::deprecated_dhw::title%]",
|
||||
"description": "The sensor {entity_name} (`{entity_id}`) is deprecated because it has been replaced with a water heater entity.\n\nThe sensor was used in the following automations or scripts:\n{items}\n\nPlease update the above automations or scripts to use the new water heater entity and disable the sensor to fix this issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1084,55 +1084,6 @@
|
||||
'state': '23.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_ehs_01001][sensor.heat_pump_cooling_set_point-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.heat_pump_cooling_set_point',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Cooling set point',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'thermostat_cooling_setpoint',
|
||||
'unique_id': '4165c51e-bf6b-c5b6-fd53-127d6248754b_main_thermostatCoolingSetpoint_coolingSetpoint_coolingSetpoint',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_ehs_01001][sensor.heat_pump_cooling_set_point-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Heat pump Cooling set point',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.heat_pump_cooling_set_point',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '56',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_ehs_01001][sensor.heat_pump_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -1410,58 +1361,6 @@
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_ehs_01001][sensor.heat_pump_temperature-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.heat_pump_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Temperature',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'unique_id': '4165c51e-bf6b-c5b6-fd53-127d6248754b_main_temperatureMeasurement_temperature_temperature',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_ehs_01001][sensor.heat_pump_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Heat pump Temperature',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.heat_pump_temperature',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '57',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_ac_rac_000001][sensor.ac_office_granit_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -5769,55 +5668,6 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_cooling_set_point-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.eco_heating_system_cooling_set_point',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Cooling set point',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'thermostat_cooling_setpoint',
|
||||
'unique_id': '1f98ebd0-ac48-d802-7f62-000001200100_main_thermostatCoolingSetpoint_coolingSetpoint_coolingSetpoint',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_cooling_set_point-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Eco Heating System Cooling set point',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eco_heating_system_cooling_set_point',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '48',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -6095,106 +5945,6 @@
|
||||
'state': '1.08249458332857e-05',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_temperature-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.eco_heating_system_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Temperature',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'unique_id': '1f98ebd0-ac48-d802-7f62-000001200100_main_temperatureMeasurement_temperature_temperature',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Eco Heating System Temperature',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eco_heating_system_temperature',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '40.8',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_cooling_set_point-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.heat_pump_main_cooling_set_point',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Cooling set point',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'thermostat_cooling_setpoint',
|
||||
'unique_id': '6a7d5349-0a66-0277-058d-000001200101_main_thermostatCoolingSetpoint_coolingSetpoint_coolingSetpoint',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_cooling_set_point-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Heat Pump Main Cooling set point',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.heat_pump_main_cooling_set_point',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'unknown',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -6472,106 +6222,6 @@
|
||||
'state': '4.50185416638851e-06',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_temperature-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.heat_pump_main_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Temperature',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'unique_id': '6a7d5349-0a66-0277-058d-000001200101_main_temperatureMeasurement_temperature_temperature',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Heat Pump Main Temperature',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.heat_pump_main_temperature',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'unknown',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_cooling_set_point-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.warmepumpe_cooling_set_point',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Cooling set point',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'thermostat_cooling_setpoint',
|
||||
'unique_id': '3810e5ad-5351-d9f9-12ff-000001200000_main_thermostatCoolingSetpoint_coolingSetpoint_coolingSetpoint',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_cooling_set_point-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Wärmepumpe Cooling set point',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.warmepumpe_cooling_set_point',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '52',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -6849,58 +6499,6 @@
|
||||
'state': '0.000222076093320449',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_temperature-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.warmepumpe_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Temperature',
|
||||
'platform': 'smartthings',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'unique_id': '3810e5ad-5351-d9f9-12ff-000001200000_main_temperatureMeasurement_temperature_temperature',
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Wärmepumpe Temperature',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.warmepumpe_temperature',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '49.6',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[da_wm_dw_000001][sensor.dishwasher_completion_time-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
@ -71,6 +71,7 @@ async def test_state_update(
|
||||
"issue_string",
|
||||
"entity_id",
|
||||
"expected_state",
|
||||
"version",
|
||||
),
|
||||
[
|
||||
(
|
||||
@ -80,6 +81,7 @@ async def test_state_update(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_media_playback_status",
|
||||
STATE_UNKNOWN,
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"vd_stv_2017_k",
|
||||
@ -88,6 +90,7 @@ async def test_state_update(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_volume",
|
||||
"13",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"vd_stv_2017_k",
|
||||
@ -96,6 +99,7 @@ async def test_state_update(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_media_input_source",
|
||||
"hdmi1",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"im_speaker_ai_0001",
|
||||
@ -104,6 +108,7 @@ async def test_state_update(
|
||||
"media_player",
|
||||
"sensor.galaxy_home_mini_media_playback_repeat",
|
||||
"off",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"im_speaker_ai_0001",
|
||||
@ -112,6 +117,25 @@ async def test_state_update(
|
||||
"media_player",
|
||||
"sensor.galaxy_home_mini_media_playback_shuffle",
|
||||
"disabled",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"da_ac_ehs_01001",
|
||||
f"4165c51e-bf6b-c5b6-fd53-127d6248754b_{MAIN}_{Capability.TEMPERATURE_MEASUREMENT}_{Attribute.TEMPERATURE}_{Attribute.TEMPERATURE}",
|
||||
"temperature",
|
||||
"dhw",
|
||||
"sensor.temperature",
|
||||
"57",
|
||||
"2025.12.0",
|
||||
),
|
||||
(
|
||||
"da_ac_ehs_01001",
|
||||
f"4165c51e-bf6b-c5b6-fd53-127d6248754b_{MAIN}_{Capability.THERMOSTAT_COOLING_SETPOINT}_{Attribute.COOLING_SETPOINT}_{Attribute.COOLING_SETPOINT}",
|
||||
"cooling_setpoint",
|
||||
"dhw",
|
||||
"sensor.cooling_setpoint",
|
||||
"56",
|
||||
"2025.12.0",
|
||||
),
|
||||
],
|
||||
)
|
||||
@ -126,6 +150,7 @@ async def test_create_issue_with_items(
|
||||
issue_string: str,
|
||||
entity_id: str,
|
||||
expected_state: str,
|
||||
version: str,
|
||||
) -> None:
|
||||
"""Test we create an issue when an automation or script is using a deprecated entity."""
|
||||
issue_id = f"deprecated_{issue_string}_{entity_id}"
|
||||
@ -189,6 +214,7 @@ async def test_create_issue_with_items(
|
||||
"entity_name": suggested_object_id,
|
||||
"items": "- [test](/config/automation/edit/test)\n- [test](/config/script/edit/test)",
|
||||
}
|
||||
assert issue.breaks_in_ha_version == version
|
||||
|
||||
entity_registry.async_update_entity(
|
||||
entity_entry.entity_id,
|
||||
@ -211,6 +237,7 @@ async def test_create_issue_with_items(
|
||||
"issue_string",
|
||||
"entity_id",
|
||||
"expected_state",
|
||||
"version",
|
||||
),
|
||||
[
|
||||
(
|
||||
@ -220,6 +247,7 @@ async def test_create_issue_with_items(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_media_playback_status",
|
||||
STATE_UNKNOWN,
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"vd_stv_2017_k",
|
||||
@ -228,6 +256,7 @@ async def test_create_issue_with_items(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_volume",
|
||||
"13",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"vd_stv_2017_k",
|
||||
@ -236,6 +265,7 @@ async def test_create_issue_with_items(
|
||||
"media_player",
|
||||
"sensor.tv_samsung_8_series_49_media_input_source",
|
||||
"hdmi1",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"im_speaker_ai_0001",
|
||||
@ -244,6 +274,7 @@ async def test_create_issue_with_items(
|
||||
"media_player",
|
||||
"sensor.galaxy_home_mini_media_playback_repeat",
|
||||
"off",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"im_speaker_ai_0001",
|
||||
@ -252,6 +283,25 @@ async def test_create_issue_with_items(
|
||||
"media_player",
|
||||
"sensor.galaxy_home_mini_media_playback_shuffle",
|
||||
"disabled",
|
||||
"2025.10.0",
|
||||
),
|
||||
(
|
||||
"da_ac_ehs_01001",
|
||||
f"4165c51e-bf6b-c5b6-fd53-127d6248754b_{MAIN}_{Capability.TEMPERATURE_MEASUREMENT}_{Attribute.TEMPERATURE}_{Attribute.TEMPERATURE}",
|
||||
"temperature",
|
||||
"dhw",
|
||||
"sensor.temperature",
|
||||
"57",
|
||||
"2025.12.0",
|
||||
),
|
||||
(
|
||||
"da_ac_ehs_01001",
|
||||
f"4165c51e-bf6b-c5b6-fd53-127d6248754b_{MAIN}_{Capability.THERMOSTAT_COOLING_SETPOINT}_{Attribute.COOLING_SETPOINT}_{Attribute.COOLING_SETPOINT}",
|
||||
"cooling_setpoint",
|
||||
"dhw",
|
||||
"sensor.cooling_setpoint",
|
||||
"56",
|
||||
"2025.12.0",
|
||||
),
|
||||
],
|
||||
)
|
||||
@ -266,6 +316,7 @@ async def test_create_issue(
|
||||
issue_string: str,
|
||||
entity_id: str,
|
||||
expected_state: str,
|
||||
version: str,
|
||||
) -> None:
|
||||
"""Test we create an issue when an automation or script is using a deprecated entity."""
|
||||
issue_id = f"deprecated_{issue_string}_{entity_id}"
|
||||
@ -290,6 +341,7 @@ async def test_create_issue(
|
||||
"entity_id": entity_id,
|
||||
"entity_name": suggested_object_id,
|
||||
}
|
||||
assert issue.breaks_in_ha_version == version
|
||||
|
||||
entity_registry.async_update_entity(
|
||||
entity_entry.entity_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user