ha-dual-smart-thermostat icon indicating copy to clipboard operation
ha-dual-smart-thermostat copied to clipboard

[bug] Temperature value null in some edge cases

Open swingerman opened this issue 7 months ago • 0 comments

          > Thanks for sharing this. I am looking into it.

btw

  File "/config/custom_components/dual_smart_thermostat/climate.py", line 949, in _async_control_climate
    await self._async_control_cooling(time, force)
  File "/config/custom_components/dual_smart_thermostat/climate.py", line 1133, in _async_control_cooling
    too_cold = self._is_too_cold()
               ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dual_smart_thermostat/climate.py", line 1470, in _is_too_cold
    return target_temp >= self._cur_temp + self._cold_tolerance
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'NoneType' and 'float'

Originally posted by @10der in https://github.com/swingerman/ha-dual-smart-thermostat/issues/210#issuecomment-2207187511

Also here: https://github.com/swingerman/ha-dual-smart-thermostat/pull/210#issuecomment-2143971749

swingerman avatar Jul 04 '24 09:07 swingerman