ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
336 stars 48 forks source link

PID mode initially set to off on existing thermostats, and not updating when set to auto by the service #117

Closed Motik68 closed 1 year ago

Motik68 commented 1 year ago

Describe the bug On reboot, existing thermostats have pid_mode set to off and actually work in on/off mode.

Calling the smart_thermostat.set_pid_mode service with mode: auto correctly puts the thermostat on PID mode (confirmed by observing the PID values). However, the pid_mode attribute keeps returning off instead of auto.

To Reproduce Update to 2023.1.0

Expected behavior

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context N/A

bigbread59 commented 1 year ago

Bug confirmed.

Additional question: Is it possible to set the pid_mode via yaml file like pid_mode: "auto"

If I try, I get this message:

Invalid config for [climate.smart_thermostat]: [pid_mode] is an invalid option for [climate.smart_thermostat]. Check: climate.smart_thermostat->pid_mode. (See ?, line ?).

Motik68 commented 1 year ago

I confirm the fix in 2023.1.1 is working, although on first restart pid_mode was still off. Once changed to auto by manually calling the service, everything is ok.

ScratMan commented 1 year ago

Yes, pid_mode is part of the restored parameters, so unfortunately we need to set it back to auto manually after fixing the bug.