mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 22:47:01 +01:00
implement doubletaptounlock
This commit is contained in:
@@ -124,13 +124,14 @@ class LovelaceUIPanel:
|
|||||||
entity_id = msg[2]
|
entity_id = msg[2]
|
||||||
btype = msg[3]
|
btype = msg[3]
|
||||||
value = msg[4] if len(msg) > 4 else None
|
value = msg[4] if len(msg) > 4 else None
|
||||||
|
|
||||||
if btype == "bExit":
|
if btype == "bExit":
|
||||||
# TODO: Impelement default card
|
if entity_id=="screensaver" and self.settings.get("screensaver").get("doubleTapToUnlock") and value == "1":
|
||||||
|
return
|
||||||
|
|
||||||
# in case privious_cards is empty add a default card
|
# in case privious_cards is empty add a default card
|
||||||
if len(self.privious_cards) == 0:
|
if len(self.privious_cards) == 0:
|
||||||
self.privious_cards.append(
|
self.privious_cards.append(
|
||||||
list(self.cards.values())[0])
|
list(self.cards.values())[0]) # TODO: Impelement default card config
|
||||||
self.current_card = self.privious_cards.pop()
|
self.current_card = self.privious_cards.pop()
|
||||||
libs.panel_cmd.page_type(self.sendTopic, self.current_card.type)
|
libs.panel_cmd.page_type(self.sendTopic, self.current_card.type)
|
||||||
libs.panel_cmd.entityUpd(self.sendTopic, self.current_card.render())
|
libs.panel_cmd.entityUpd(self.sendTopic, self.current_card.render())
|
||||||
|
|||||||
Reference in New Issue
Block a user