mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in nobo_hub (#196050)
This commit is contained in:
@@ -5,14 +5,13 @@ from typing import Any, override
|
||||
from pynobo import PynoboError, nobo
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ATTR_TARGET_TEMP_HIGH,
|
||||
ATTR_TARGET_TEMP_LOW,
|
||||
PRESET_AWAY,
|
||||
PRESET_COMFORT,
|
||||
PRESET_ECO,
|
||||
PRESET_NONE,
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
ClimateServiceArgument,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import PRECISION_TENTHS, PRECISION_WHOLE, UnitOfTemperature
|
||||
@@ -156,9 +155,9 @@ class NoboZone(NoboBaseEntity, ClimateEntity):
|
||||
@override
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
if ATTR_TARGET_TEMP_LOW in kwargs:
|
||||
low = round(kwargs[ATTR_TARGET_TEMP_LOW])
|
||||
high = round(kwargs[ATTR_TARGET_TEMP_HIGH])
|
||||
if ClimateServiceArgument.TARGET_TEMP_LOW in kwargs:
|
||||
low = round(kwargs[ClimateServiceArgument.TARGET_TEMP_LOW])
|
||||
high = round(kwargs[ClimateServiceArgument.TARGET_TEMP_HIGH])
|
||||
try:
|
||||
await self._nobo.async_update_zone(
|
||||
self._id, temp_comfort_c=high, temp_eco_c=low
|
||||
|
||||
Reference in New Issue
Block a user