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
103 stars 18 forks source link

Invalid HVAC mode: None #187

Closed T3chArmy closed 1 month ago

T3chArmy commented 1 month ago

When HA starts up this error is constantly thrown until hvac_mode is manually set.

This error originated from a custom integration.

Logger: custom_components.dual_smart_thermostat.hvac_device.cooler_fan_device
Source: custom_components/dual_smart_thermostat/hvac_device/cooler_fan_device.py:163
integration: dual_smart_thermostat (documentation, issues)
First occurred: 11:59:53 (173 occurrences)
Last logged: 13:23:42

Invalid HVAC mode: None
swingerman commented 1 month ago

Will be included in the next release

T3chArmy commented 1 month ago

@swingerman There unfortunately still seems to be an issue. Thermostat does not seem to be working still at HA startup until hvac_mode is manually changed.

swingerman commented 1 month ago

Do you have the initial_hvac_mode set in your config?

T3chArmy commented 1 month ago

@swingerman I have tried it both defined and undefined. Neither one seems to work. It appears to restore the state correctly when undefined as expected with latest beta. However, it appears to never activate the switches until after the hvac_mode is changed. I wonder if this could possibly be due to the thermostat initializing before the Zigbee switches become available? I'm not sure.

I have also noticed the hvac_action_reason doesn't get set either until I change the hvac_mode. Figured if it was a switch issue it would show malfunction or misconfiguration.

T3chArmy commented 1 month ago

I turned on debug logging. Hope this provides some better insight to my issue. Restarted HA, restored previous mode, but not temp, so I lowered temp to below current temp, waited, it never turned on. Changed hvac_mode and it kicked in instantly.

error_log-2.txt

swingerman commented 1 month ago

I managed to reproduce this and also managed to ensure the climate devices gets controlled on startup

swingerman commented 1 month ago

Please check with v0.9.6.beta-10

T3chArmy commented 1 month ago

@swingerman 🎉 Excellent! Looks like it's working now! Thanks for getting this resolved! I think this fixes all the issues I have been experiencing! :)