mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix nobo_hub presenting temperature in zone with one decimal (#79743)
Fix presenting temperature in zone with one decimal. Fix stepping the target temperatur without decimals.
This commit is contained in:
parent
394246abab
commit
b0ef1e3315
@ -1,7 +1,6 @@
|
|||||||
"""Python Control of Nobø Hub - Nobø Energy Control."""
|
"""Python Control of Nobø Hub - Nobø Energy Control."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from pynobo import nobo
|
from pynobo import nobo
|
||||||
@ -24,7 +23,7 @@ from homeassistant.const import (
|
|||||||
ATTR_NAME,
|
ATTR_NAME,
|
||||||
ATTR_SUGGESTED_AREA,
|
ATTR_SUGGESTED_AREA,
|
||||||
ATTR_VIA_DEVICE,
|
ATTR_VIA_DEVICE,
|
||||||
PRECISION_WHOLE,
|
PRECISION_TENTHS,
|
||||||
TEMP_CELSIUS,
|
TEMP_CELSIUS,
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -52,8 +51,6 @@ PRESET_MODES = [PRESET_NONE, PRESET_COMFORT, PRESET_ECO, PRESET_AWAY]
|
|||||||
MIN_TEMPERATURE = 7
|
MIN_TEMPERATURE = 7
|
||||||
MAX_TEMPERATURE = 40
|
MAX_TEMPERATURE = 40
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
@ -87,11 +84,12 @@ class NoboZone(ClimateEntity):
|
|||||||
|
|
||||||
_attr_max_temp = MAX_TEMPERATURE
|
_attr_max_temp = MAX_TEMPERATURE
|
||||||
_attr_min_temp = MIN_TEMPERATURE
|
_attr_min_temp = MIN_TEMPERATURE
|
||||||
_attr_precision = PRECISION_WHOLE
|
_attr_precision = PRECISION_TENTHS
|
||||||
_attr_preset_modes = PRESET_MODES
|
_attr_preset_modes = PRESET_MODES
|
||||||
# Need to poll to get preset change when in HVACMode.AUTO.
|
|
||||||
_attr_supported_features = SUPPORT_FLAGS
|
_attr_supported_features = SUPPORT_FLAGS
|
||||||
_attr_temperature_unit = TEMP_CELSIUS
|
_attr_temperature_unit = TEMP_CELSIUS
|
||||||
|
_attr_target_temperature_step = 1
|
||||||
|
# Need to poll to get preset change when in HVACMode.AUTO, so can't set _attr_should_poll = False
|
||||||
|
|
||||||
def __init__(self, zone_id, hub: nobo, override_type):
|
def __init__(self, zone_id, hub: nobo, override_type):
|
||||||
"""Initialize the climate device."""
|
"""Initialize the climate device."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user