implement subpages

This commit is contained in:
Johannes
2022-04-02 17:34:34 +02:00
parent f15e508626
commit 4c6f9cdfd6
5 changed files with 23 additions and 21 deletions

View File

@@ -142,7 +142,7 @@ class LuiController(object):
self._pages_gen.generate_screensaver_page()
return
if button_type == "bExit":
if button_type in ["bExit", "bUp"]:
self._pages_gen.render_card(self._current_card)
if button_type == "bNext":
@@ -181,8 +181,7 @@ class LuiController(object):
if button_type == "button":
if entity_id.startswith('navigate'):
# internal for navigation to nested pages
self._current_card = self._config.searchCard(entity_id)
self._pages_gen.render_card(self._current_card)
self._pages_gen.render_card(self._config.searchCard(entity_id))
elif entity_id.startswith('scene'):
self._ha_api.get_entity(entity_id).call_service("turn_on")
elif entity_id.startswith('script'):