HA climate mode and icon check

This commit is contained in:
MichaelDvP
2026-01-29 09:53:20 +01:00
parent 4e194287c9
commit 8fc6752290
2 changed files with 21 additions and 22 deletions

View File

@@ -476,7 +476,8 @@ void Thermostat::add_ha_climate(std::shared_ptr<HeatingCircuit> hc) const {
return;
}
if (Helpers::hasValue(hc->selTemp) && is_readable(&hc->selTemp)) {
// create climate only if we have modes
if (Helpers::hasValue(hc->mode) && Helpers::hasValue(hc->selTemp) && is_readable(&hc->selTemp)) {
if (Helpers::hasValue(hc->roomTemp) && is_readable(&hc->roomTemp)) {
hc->climate = 1; // use roomTemp as we have a sensor
} else {