added script as item

This commit is contained in:
joBr99
2022-03-29 20:16:35 +02:00
parent 811cb50f01
commit a026453290
9 changed files with 32 additions and 2 deletions

View File

@@ -178,6 +178,8 @@ class LuiController(object):
self._pages_gen.render_page(self._current_page)
elif entity_id.startswith('scene'):
self._ha_api.get_entity(entity_id).call_service("turn_on")
elif entity_id.startswith('script'):
self._ha_api.get_entity(entity_id).call_service("turn_on")
elif entity_id.startswith('light') or entity_id.startswith('switch') or entity_id.startswith('input_boolean'):
self._ha_api.get_entity(entity_id).call_service("toggle")
else: