swingerman / ha-dual-smart-thermostat

The `dual_smart_thermostat` is an enhaced verion of generic thermostat implemented in Home Assistant. It uses several sensors and dedicated switches connected to a heater and air conditioning under the hood.
https://github.com/swingerman/ha-dual-thermostat
Apache License 2.0
128 stars 21 forks source link

[bug] Temperature value null in some edge cases #230

Closed swingerman closed 4 months ago

swingerman commented 4 months ago
          > 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 commented 4 months ago

closed by #242