mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in nuheat (#196052)
This commit is contained in:
@@ -12,13 +12,13 @@ from nuheat.util import (
|
||||
)
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ATTR_HVAC_MODE,
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
ClimateServiceArgument,
|
||||
HVACAction,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
|
||||
from homeassistant.const import UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import event as event_helper
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
@@ -187,7 +187,8 @@ class NuHeatThermostat(CoordinatorEntity[NuHeatCoordinator], ClimateEntity):
|
||||
def set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set a new target temperature."""
|
||||
self._set_temperature_and_mode(
|
||||
kwargs.get(ATTR_TEMPERATURE), hvac_mode=kwargs.get(ATTR_HVAC_MODE)
|
||||
kwargs.get(ClimateServiceArgument.TEMPERATURE),
|
||||
hvac_mode=kwargs.get(ClimateServiceArgument.HVAC_MODE),
|
||||
)
|
||||
|
||||
def _set_temperature_and_mode(self, temperature, hvac_mode=None, preset_mode=None):
|
||||
|
||||
Reference in New Issue
Block a user