diff --git a/advanced/esphome/nspanel_esphome_addon_climate_base.yaml b/advanced/esphome/nspanel_esphome_addon_climate_base.yaml index c5729f3..64a4ec1 100644 --- a/advanced/esphome/nspanel_esphome_addon_climate_base.yaml +++ b/advanced/esphome/nspanel_esphome_addon_climate_base.yaml @@ -161,3 +161,48 @@ script: - lambda: |- if (current_page->state == "climate") id(is_addon_climate_visible) = embedded_climate; + + - id: !extend watchdog + then: + - lambda: |- + static const char *const TAG = "script.watchdog (add-on climate)"; + bool addon_climate_cool = ${addon_climate_cool}; + bool addon_climate_heat = ${addon_climate_heat}; + bool addon_climate_dual = ${addon_climate_dual}; + uint cooler_relay = ${cooler_relay}; + uint heater_relay = ${heater_relay}; + ESP_LOGD(TAG, "Add-on climate:"); + if (addon_climate_cool) { + ESP_LOGD(TAG, " Cool: %s", addon_climate_cool ? "Enabled" : "Disabled"); + if (cooler_relay == 1 or cooler_relay == 2) + ESP_LOGD(TAG, " Relay: %i", cooler_relay); + else + ESP_LOGE(TAG, " Relay: %i", cooler_relay); + } + if (addon_climate_heat) { + ESP_LOGD(TAG, " Heat: %s", addon_climate_heat ? "Enabled" : "Disabled"); + if (heater_relay == 1 or heater_relay == 2) + ESP_LOGD(TAG, " Relay: %i", heater_relay); + else + ESP_LOGE(TAG, " Relay: %i", heater_relay); + } + if (addon_climate_dual) { + ESP_LOGD(TAG, " Dual: %s", addon_climate_dual ? "Enabled" : "Disabled"); + if (cooler_relay == 1 or cooler_relay == 2) + ESP_LOGD(TAG, " Relay (cooler): %i", cooler_relay); + else + ESP_LOGE(TAG, " Relay (cooler): %i", cooler_relay); + if (heater_relay == 1 or heater_relay == 2) + ESP_LOGD(TAG, " Relay (heater): %i", heater_relay); + else + ESP_LOGE(TAG, " Relay (heater): %i", heater_relay); + if (cooler_relay == heater_relay) + ESP_LOGE(TAG, " Double relay assignment"); + } + + if ((addon_climate_cool && addon_climate_heat) || + (addon_climate_cool && addon_climate_dual) || + (addon_climate_heat && addon_climate_dual) || + (!addon_climate_cool && !addon_climate_heat && !addon_climate_dual)) { + ESP_LOGE(TAG, "Invalid settings for add-on Climate"); + } \ No newline at end of file diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index db7f558..9fc5809 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -2915,7 +2915,7 @@ script: // report Wi-Fi status bool wifi_connected = wifi_component->is_connected(); if (wifi_connected) - ESP_LOGD(TAG, "Wi-Fi: %.0fdB", wifi_rssi->state); + ESP_LOGD(TAG, "Wi-Fi: %.0f dBm", wifi_rssi->state); else ESP_LOGW(TAG, "Wi-Fi: DISCONNECTED");