mirror of
https://github.com/home-assistant/core.git
synced 2025-06-01 03:37:08 +00:00
Return a 0 temperature value when none is found (#8518)
* Return a 0 temperature value when none is found It's well documented that these TRVs will only return the current temperature for a short time after the actuator has moved. This means that, usually, they will not return the current temperature. Setting a non-value here causes errors in the logs and for the TRV to not show on the dashboard at all * Fix lint issue
This commit is contained in:
parent
fde4a7d029
commit
dcd6f7a29e
@ -10,7 +10,6 @@ import logging
|
||||
from homeassistant.components.climate import ClimateDevice, STATE_AUTO
|
||||
from homeassistant.components.maxcube import MAXCUBE_HANDLE
|
||||
from homeassistant.const import TEMP_CELSIUS, ATTR_TEMPERATURE
|
||||
from homeassistant.const import STATE_UNKNOWN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -140,7 +139,7 @@ class MaxCubeClimate(ClimateDevice):
|
||||
def map_temperature_max_hass(temperature):
|
||||
"""Map Temperature from MAX! to HASS."""
|
||||
if temperature is None:
|
||||
return STATE_UNKNOWN
|
||||
return 0.0
|
||||
|
||||
return temperature
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user