mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in moehlenhoff_alpha2 (#196015)
This commit is contained in:
@@ -5,10 +5,11 @@ from typing import Any, override
|
||||
from homeassistant.components.climate import (
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
ClimateServiceArgument,
|
||||
HVACAction,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
|
||||
from homeassistant.const import UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
@@ -106,7 +107,9 @@ class Alpha2Climate(CoordinatorEntity[Alpha2BaseCoordinator], ClimateEntity):
|
||||
@override
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperatures."""
|
||||
if (target_temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
|
||||
if (
|
||||
target_temperature := kwargs.get(ClimateServiceArgument.TEMPERATURE)
|
||||
) is None:
|
||||
return
|
||||
|
||||
await self.coordinator.async_set_target_temperature(
|
||||
|
||||
Reference in New Issue
Block a user