Fix reference to NextionComponent

This commit is contained in:
Edward Firmo
2024-02-23 12:19:20 +01:00
parent b3043facad
commit e8d127681c
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ namespace nspanel_ha_blueprint {
* @param defaultPage The default page name to use if the input string does not specify a page.
* @return A NextionComponent struct containing the extracted or default page name, the component ID, and a flag indicating if it's the current page.
*/
NextionComponent extractPageAndComponent(const std::string& input, const std::string& defaultPage) {
NextionComponent extractNextionComponent(const std::string& input, const std::string& defaultPage) {
size_t dotPos = input.find(".");
NextionComponent result;

View File

@@ -3173,9 +3173,9 @@ script:
nspanel_ha_blueprint::NextionComponent component = nspanel_ha_blueprint::extractNextionComponent(component_id, current_page->state);
if (component.is_current_page) {
if (show)
disp1->show_component(component.component_id);
disp1->show_component(component.component_id.c_str());
else
disp1->hide_component(component.component_id);
disp1->hide_component(component.component_id.c_str());
}
- id: setup_sequence