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