From 9563dba72238f9be2174d974da33c1ddaa9a0010 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:01:47 +0200 Subject: [PATCH] Display internal sensor value when wifi is out Before it was showing on home page only when API was out. This adds a test for WiFi. --- nspanel_esphome.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 87b972e..ad5228c 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -923,11 +923,13 @@ sensor: - lambda: return x + id(temperature_correction_global); on_value: then: - # Show panel's temperature if API is out + # Show panel's temperature if API or Wi-Fi are out - if: condition: - not: - api.connected: + - and: + - api.connected: + - wifi.connected: then: - lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state);