mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
current temp could be none (#6759)
This commit is contained in:
committed by
Paulus Schoutsen
parent
0b7f873120
commit
82c599a749
@@ -112,8 +112,9 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice):
|
|||||||
_LOGGER.debug("Setpoint is 0, setting default to "
|
_LOGGER.debug("Setpoint is 0, setting default to "
|
||||||
"current_temperature=%s",
|
"current_temperature=%s",
|
||||||
self._current_temperature)
|
self._current_temperature)
|
||||||
self._target_temperature = (
|
if self._current_temperature is not None:
|
||||||
round((float(self._current_temperature)), 1))
|
self._target_temperature = (
|
||||||
|
round((float(self._current_temperature)), 1))
|
||||||
else:
|
else:
|
||||||
self._target_temperature = round(
|
self._target_temperature = round(
|
||||||
(float(self.values.primary.data)), 1)
|
(float(self.values.primary.data)), 1)
|
||||||
|
Reference in New Issue
Block a user