Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in getting auto mode to work, seems to only work in either heat, or cool mode #31

Closed
stevenmcastano opened this issue Oct 18, 2022 · 5 comments

Comments

@stevenmcastano
Copy link

Anytime I try to set the thermostat to auto to control both my AC unit and my heater is throws out an error:

Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: #033[31m2022-10-17 22:08:44.566 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2625121392] '>=' not supported between instances of 'NoneType' and 'float'
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: Traceback (most recent call last):
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await hass.services.async_call(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     task.result()
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await service.entity_service_call(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     future.result()  # pop exception if have
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await coro
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await result
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 613, in async_service_temperature_set
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await entity.async_set_temperature(**kwargs)
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 589, in async_set_temperature
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await self._async_control_climate()
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 662, in _async_control_climate
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await self._async_control_heat_cool(time, force)
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 793, in _async_control_heat_cool
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     too_cold = self._is_too_cold("_target_temp_low")
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 988, in _is_too_cold
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     return target_temp >= self._cur_temp + self._cold_tolerance
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: TypeError: '>=' not supported between instances of 'NoneType' and 'float'#033[0m

And here is my config that I'm using to try to drive it:

climate:
  - platform: dual_smart_thermostat
    unique_id: "c135dffc-8fae-4ef0-b3f8-0aa2c1af8c2f"
    name: Bedroom Thermostat
    ac_mode: false
    cooler: input_boolean.input_boolean_bedroom_fan
    heater: input_boolean.input_boolean_bedroom_convector
    target_sensor: sensor.bedroom
    target_temp: 72
    initial_hvac_mode: "heat_cool"
    min_cycle_duration:
      seconds: 5
    cold_tolerance: 0.3
    hot_tolerance: 0.3
    min_temp: 40
    max_temp: 85
    comfort_temp: 72

Any help would be MUCH appreciated... this is exactly the dual mode type of thermostat I need with separate heating and cooling units!

@mat1990dj
Copy link

It also does not work on my side, and the representation is strange

@sebastian-steinmann
Copy link

Fixed by this perhaps? #35

@sebastian-steinmann
Copy link

Seems to work if you specify target_temp_low and target_temp_high

@linuxdaemon
Copy link

Did you set heat_cool_mode: true? I just realized I forgot to and it fixed my issues https://github.com/swingerman/ha-dual-smart-thermostat#heat_cool_mode

@swingerman
Copy link
Owner

swingerman commented Mar 17, 2024

For heat/cool mode, you need to set:

heat_cool_mode: true
target_temp_low: xx
target_tem_high: xx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants