Migrate climate entity attributes to StrEnum (#174528)

This commit is contained in:
epenet
2026-06-23 16:48:38 +02:00
committed by GitHub
parent d966f71832
commit 22a583c83f
69 changed files with 3274 additions and 3228 deletions
@@ -6,19 +6,19 @@
]),
'area_id': None,
'capabilities': dict({
'fan_modes': list([
<ClimateEntityCapabilityAttribute.FAN_MODES: 'fan_modes'>: list([
'auto',
'on',
'circulate',
]),
'hvac_modes': list([
<ClimateEntityCapabilityAttribute.HVAC_MODES: 'hvac_modes'>: list([
<HVACMode.OFF: 'off'>,
<HVACMode.HEAT: 'heat'>,
<HVACMode.COOL: 'cool'>,
<HVACMode.HEAT_COOL: 'heat_cool'>,
]),
'max_temp': 95,
'min_temp': 45,
<ClimateEntityCapabilityAttribute.MAX_TEMP: 'max_temp'>: 95,
<ClimateEntityCapabilityAttribute.MIN_TEMP: 'min_temp'>: 45,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@@ -53,28 +53,28 @@
# name: test_climate_entities[climate.test_controller_residential_thermostat_v2-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_humidity': 45,
'current_temperature': 72,
'fan_mode': 'auto',
'fan_modes': list([
<ClimateEntityStateAttribute.CURRENT_HUMIDITY: 'current_humidity'>: 45,
<ClimateEntityStateAttribute.CURRENT_TEMPERATURE: 'current_temperature'>: 72,
<ClimateEntityStateAttribute.FAN_MODE: 'fan_mode'>: 'auto',
<ClimateEntityCapabilityAttribute.FAN_MODES: 'fan_modes'>: list([
'auto',
'on',
'circulate',
]),
'friendly_name': 'Test Controller Residential Thermostat V2',
'hvac_action': <HVACAction.OFF: 'off'>,
'hvac_modes': list([
<ClimateEntityStateAttribute.HVAC_ACTION: 'hvac_action'>: <HVACAction.OFF: 'off'>,
<ClimateEntityCapabilityAttribute.HVAC_MODES: 'hvac_modes'>: list([
<HVACMode.OFF: 'off'>,
<HVACMode.HEAT: 'heat'>,
<HVACMode.COOL: 'cool'>,
<HVACMode.HEAT_COOL: 'heat_cool'>,
]),
'max_temp': 95,
'min_temp': 45,
<ClimateEntityCapabilityAttribute.MAX_TEMP: 'max_temp'>: 95,
<ClimateEntityCapabilityAttribute.MIN_TEMP: 'min_temp'>: 45,
'supported_features': <ClimateEntityFeature: 395>,
'target_temp_high': None,
'target_temp_low': None,
'temperature': 68,
<ClimateEntityStateAttribute.TARGET_TEMP_HIGH: 'target_temp_high'>: None,
<ClimateEntityStateAttribute.TARGET_TEMP_LOW: 'target_temp_low'>: None,
<ClimateEntityStateAttribute.TEMPERATURE: 'temperature'>: 68,
}),
'context': <ANY>,
'entity_id': 'climate.test_controller_residential_thermostat_v2',