Skip to content

Commit

Permalink
fix for #535
Browse files Browse the repository at this point in the history
  • Loading branch information
joBr99 committed Oct 24, 2022
1 parent 30177a5 commit 3d38065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/nspanel-lovelace-ui/luibackend/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def button_press(self, entity_id, button_type, value):
if button_type == "bExit":
self._pages_gen.render_card(self._current_card)
if button_type == "bUp":
self._current_card = self._previous_cards.pop()
if self._previous_cards:
self._current_card = self._previous_cards.pop()
else:
self._current_card = self._config.getCard(0)
self._pages_gen.render_card(self._current_card)

if button_type == "bNext":
Expand Down

0 comments on commit 3d38065

Please sign in to comment.