Compare commits
No commits in common. "73268b80c1edabb9e7a37440a9690daa802e89a5" and "b1d583f02413cc059881e3fc995ce7315047bf0f" have entirely different histories.
73268b80c1
...
b1d583f024
2 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
name: E-Paper Screenshotter
|
||||
version: 1.0.1.30
|
||||
version: 1.0.1.29
|
||||
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
|
||||
slug: screenshotter
|
||||
description: Screenshot images for E-Paper pricetags
|
||||
|
@ -19,6 +19,7 @@ options:
|
|||
height: 128
|
||||
rotate: 270
|
||||
wait_seconds: 5
|
||||
ha_url: https://homeassistant.local:8123
|
||||
ha_token: 123aaa
|
||||
ha_language: en
|
||||
schema:
|
||||
|
@ -28,6 +29,7 @@ schema:
|
|||
height: int
|
||||
rotate: int
|
||||
wait_seconds: int
|
||||
ha_url: str
|
||||
ha_token: str
|
||||
ha_language: str
|
||||
stage: experimental
|
||||
|
|
|
@ -18,6 +18,7 @@ width = os.environ.get("SCREEN_WIDTH", default="640")
|
|||
height = os.environ.get("SCREEN_HEIGHT", default="480")
|
||||
rotate = os.environ.get("SCREEN_ROTATE", default="0")
|
||||
wait = os.environ.get("SCREEN_WAIT", default="5")
|
||||
ha_url = os.environ.get("SCREEN_HA_URL", default="")
|
||||
ha_token = os.environ.get("SCREEN_HA_TOKEN", default="")
|
||||
ha_language = os.environ.get("SCREEN_HA_LANGUAGE", default="en")
|
||||
|
||||
|
@ -74,7 +75,7 @@ while True:
|
|||
driver.get(INTERNAL_HA_URL)
|
||||
time.sleep(int(wait))
|
||||
logging.info("Doing HA Auth")
|
||||
driver.execute_script(f"window.localStorage.setItem('hassTokens', JSON.stringify({{hassUrl: '{INTERNAL_HA_URL}', access_token: '{ha_token}', token_type: 'Bearer'}}));")
|
||||
driver.execute_script(f"window.localStorage.setItem('hassTokens', JSON.stringify({{hassUrl: '{ha_url}', access_token: '{ha_token}', token_type: 'Bearer'}}));")
|
||||
driver.get(f'{INTERNAL_HA_URL}/{task["dashboard"]}')
|
||||
else:
|
||||
driver.get(task["url"])
|
||||
|
|
Loading…
Reference in a new issue