diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 70739db..c5dfc57 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -8254,7 +8254,7 @@ action: page: entitypage04 component: value08 - variables: - entity_page_index: '{{ (page.current[-2:] | int(-1)) - 1 }}' + entity_page_index: '{{ (nspanel_event.page[-2:] | int(-1)) - 1 }}' first_entity: '{{ entity_page_index * 8 }}' last_entity: '{{ first_entity + 8 }}' ##### Entity page - Label ##### diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 3ac5d1a..5f0ec12 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -395,15 +395,18 @@ api: ent_value_xcen: string then: - lambda: |- - ESP_LOGV("service.set_entity", "entity: %s", ent_id.c_str()); + ESP_LOGD("service.set_entity", "entity: %s", ent_id.c_str()); std::string enticon = ent_id.c_str() + std::string("_pic"); std::string entlabel = ent_id.c_str() + std::string("_label"); std::string entxcen = ent_id.c_str() + std::string(".xcen=") + ent_value_xcen.c_str(); id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str()); + ESP_LOGD("service.set_entity", "%s: %s", enticon.c_str(), ent_id.c_str()); if (strcmp(ent_icon.c_str(), "0") != 0) id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str()); id(disp1).set_component_text_printf(entlabel.c_str(), "%s", ent_label.c_str()); + ESP_LOGD("service.set_entity", "%s: %s", entlabel.c_str(), ent_label.c_str()); //id(display_wrapped_text).execute(entlabel.c_str(), ent_label.c_str(), id(display_mode) == 2 ? 16 : 20); id(disp1).set_component_text_printf(ent_id.c_str(), "%s", ent_value.c_str()); + ESP_LOGD("service.set_entity", "%s: %s", ent_id.c_str(), ent_value.c_str()); if (strcmp(ent_value_xcen.c_str(), "0") != 0) id(disp1).send_command_printf("%s", entxcen.c_str()); ##### Service for transferring global settings from the blueprint to ESPHome #####