From ffb917f538124d25e512b2ff712f9ef931dbabec Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Thu, 9 Feb 2023 20:31:32 +0100 Subject: [PATCH] Update controller.py --- apps/nspanel-lovelace-ui/luibackend/controller.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/controller.py b/apps/nspanel-lovelace-ui/luibackend/controller.py index 8d397a73..f4e2c1f8 100644 --- a/apps/nspanel-lovelace-ui/luibackend/controller.py +++ b/apps/nspanel-lovelace-ui/luibackend/controller.py @@ -194,9 +194,6 @@ class LuiController(object): def button_press(self, entity_id, button_type, value): apis.ha_api.log(f"Button Press Event; entity_id: {entity_id}; button_type: {button_type}; value: {value} ") - if entity_id.startswith('uuid'): - entity_config = self._config._config_entites_table.get(entity_id) - entity_id = entity_config.entityId # internal buttons if entity_id == "screensaver" and button_type == "bExit": # get default card if there is one @@ -270,6 +267,10 @@ class LuiController(object): if button_type == "button": + if entity_id.startswith('uuid'): + entity_config = self._config._config_entites_table.get(entity_id) + entity_id = entity_config.entityId + if entity_id.startswith('navigate'): # internal navigation for next/prev if entity_id.startswith('navigate.uuid'):