mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in palazzetti (#196062)
This commit is contained in:
@@ -7,10 +7,11 @@ from pypalazzetti.exceptions import CommunicationError, ValidationError
|
||||
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.exceptions import HomeAssistantError, ServiceValidationError
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
@@ -109,7 +110,7 @@ class PalazzettiClimateEntity(PalazzettiEntity, ClimateEntity):
|
||||
@override
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new temperature."""
|
||||
temperature = int(kwargs[ATTR_TEMPERATURE])
|
||||
temperature = int(kwargs[ClimateServiceArgument.TEMPERATURE])
|
||||
try:
|
||||
await self.coordinator.client.set_target_temperature(temperature)
|
||||
except CommunicationError as err:
|
||||
|
||||
Reference in New Issue
Block a user