mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 06:27:01 +01:00
Add navNext, navPrev for hardware button navigation #749
This commit is contained in:
@@ -290,6 +290,14 @@ class LuiController(object):
|
|||||||
else:
|
else:
|
||||||
self._current_card = self._config.get_default_card()
|
self._current_card = self._config.get_default_card()
|
||||||
self._pages_gen.render_card(self._current_card)
|
self._pages_gen.render_card(self._current_card)
|
||||||
|
if entity_id.startswith('navPrev'):
|
||||||
|
if self._current_card.uuid_prev:
|
||||||
|
self._current_card = self._config.get_card_by_uuid(self._current_card.uuid_prev)
|
||||||
|
self._pages_gen.render_card(self._current_card)
|
||||||
|
if entity_id.startswith('navNext'):
|
||||||
|
if self._current_card.uuid_next:
|
||||||
|
self._current_card = self._config.get_card_by_uuid(self._current_card.uuid_next)
|
||||||
|
self._pages_gen.render_card(self._current_card)
|
||||||
elif entity_id.startswith('scene'):
|
elif entity_id.startswith('scene'):
|
||||||
apis.ha_api.get_entity(entity_id).call_service("turn_on")
|
apis.ha_api.get_entity(entity_id).call_service("turn_on")
|
||||||
elif entity_id.startswith('script'):
|
elif entity_id.startswith('script'):
|
||||||
|
|||||||
Reference in New Issue
Block a user