Move entity variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page
This commit is contained in:
Edward Firmo
2023-06-23 01:26:35 +02:00
committed by GitHub
parent c211d3f435
commit 2f44dd1d7c
11 changed files with 95 additions and 74 deletions

View File

@@ -300,8 +300,7 @@ api:
- wait_until:
binary_sensor.is_on: nextion_init
- lambda: |-
std::string entity_component = page.c_str() + std::string(".entity");
id(disp1).set_component_text_printf(entity_component.c_str(), "%s", entity.c_str());
id(disp1).set_component_text_printf("home.entity", "%s", entity.c_str());
std::string cmd_page = std::string("page ") + page.c_str();
id(disp1).send_command_printf(cmd_page.c_str());
id(disp1).set_component_text_printf("page_label", "%s", page_label.c_str());