added double tap feature for screensaver

This commit is contained in:
joBr99
2022-03-27 20:26:06 +02:00
parent 279e652da2
commit 2eaa8b0502
5 changed files with 24 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -326,6 +326,7 @@ key | optional | type | default | description
`weatherOverrideForecast2` | True | string | `None` | sensor entity from home assistant here to override the second weather forecast item on the screensaver
`weatherOverrideForecast3` | True | string | `None` | sensor entity from home assistant here to override the third weather forecast item on the screensaver
`weatherOverrideForecast4` | True | string | `None` | sensor entity from home assistant here to override the forth weather forecast item on the screensaver
`doubleTapToUnlock` | True | boolean | `False` | requires to tap screensaver two times
`pages` | False | complex | | configuration for pages on panel
#### Schedule screensaver brightness
@@ -409,4 +410,23 @@ Reboot Tasmota and try to flash it a second time.
Please check your MQTT Topics in your apps.yaml and your mqtt configuration on tasmota.
### How to upgrade from a release to the current development version
1. Update App in HACS to main
Click redownload in the menu of the app in HACS.
Select main version.
![hacs-main](doc-pics/hacs-main.png)
**Wait for it to load, dropdown needs to be selectable again**
Click download.
2. Restart AppDaemon
3. Flash current Development Firmware in Tasmota Console.
`FlashNextion http://nspanel.pky.eu/lui.tft`

View File

@@ -126,8 +126,10 @@ class LuiController(object):
def button_press(self, entity_id, button_type, value):
LOGGER.info(f"Button Press Event; entity_id: {entity_id}; button_type: {button_type}; value: {value} ")
# internal buttons
if entity_id == "screensaver" and button_type == "enter":
if entity_id == "screensaver" and button_type == "bExit":
if self._config.get("doubleTapToUnlock") and int(value) >= 2:
self._pages_gen.render_page(self._current_page)
return
if button_type == "bExit":
self._pages_gen.render_page(self._current_page)

BIN
doc-pics/hacs-main.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB