Simplify climate show logic

Improves #2021
This commit is contained in:
Edward Firmo
2024-04-09 10:16:18 +02:00
parent cd4fef6870
commit 2f45083db5

View File

@@ -938,12 +938,10 @@ display:
switch (component_id) {
case 4: // indr_temp
case 27: // indr_temp_icon
if (!touch_event) { // Release
if (!id(embedded_indoor_temp) and !id(is_embedded_thermostat)) { // To do v4.4: Expand to not show when sensor is not climate
detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : "");
disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0);
goto_page->execute("climate");
}
if (id(is_embedded_thermostat) and !touch_event) { // Release
detailed_entity->publish_state("embedded_climate");
disp1->set_component_value("climate.embedded", 1);
goto_page->execute("climate");
}
break;
}