diff --git a/nspanel_esphome_core.yaml b/nspanel_esphome_core.yaml index 08fcbac..d704da4 100644 --- a/nspanel_esphome_core.yaml +++ b/nspanel_esphome_core.yaml @@ -572,13 +572,13 @@ api: // QRCode button ESP_LOGV(TAG, "Set QRCode button"); - disp1->send_command_printf("is_qrcode=%i", (qrcode) ? 1 : 0); + disp1->send_command_printf("is_qrcode=%i", qrcode ? 1 : 0); disp1->set_component_text_printf("home.bt_qrcode", "%s", qrcode_icon.c_str()); set_component_color->execute("home.bt_qrcode", qrcode_icon_color, {}); // Entities pages button ESP_LOGV(TAG, "Set Entities button"); - disp1->send_command_printf("is_entities=%i", (entities_pages) ? 1 : 0); + disp1->send_command_printf("is_entities=%i", entities_pages ? 1 : 0); disp1->set_component_text_printf("home.bt_entities", "%s", entities_pages_icon.c_str()); //set_component_color->execute("home.bt_entities", entities_pages_icon_color, {}); set_component_color->execute("home.bt_entities", entities_pages_icon_color, {}); @@ -661,7 +661,7 @@ api: //if (supported_features & 4096 and (state == "playing" or state == "paused")) disp1->show_component("bt_stop"); else disp1->hide_component("bt_stop"); // mute/unmute button - VOLUME_MUTE - disp1->set_component_value("is_muted", (is_volume_muted) ? 1 : 0); + disp1->set_component_value("is_muted", is_volume_muted ? 1 : 0); if (supported_features & 8 and is_volume_muted) // unmute { disp1->set_component_text_printf("bt_mute", "%s", "\uEE07"); // mdi:volume-variant-off @@ -872,6 +872,40 @@ globals: restore_value: false initial_value: '' + - id: page_names + type: std::vector + restore_value: no + initial_value: + '{ + "home", + "weather01", + "weather02", + "weather03", + "weather04", + "weather05", + "climate", + "settings", + "boot", + "screensaver", + "light", + "cover", + "buttonpage01", + "buttonpage02", + "buttonpage03", + "buttonpage04", + "notification", + "qrcode", + "entitypage01", + "entitypage02", + "entitypage03", + "entitypage04", + "fan", + "alarm", + "keyb_num", + "media_player", + "confirm" + }' + ##### START - BINARY SENSOR CONFIGURATION ##### binary_sensor: @@ -1443,7 +1477,7 @@ text_sensor: if (page == "home" and component == "climate") { detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : ""); - disp1->set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0); + disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0); } disp1->goto_page("climate"); } @@ -2616,7 +2650,7 @@ script: # Reserved for Add-on Climate - lambda: |- ESP_LOGV("script.addon_climate_set_climate", "Check for addon_climate"); - ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %i", (embedded_climate) ? 1 : 0); + ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %s", embedded_climate ? "True" : "False"); - id: addon_climate_update_page_climate mode: restart then: