Fix url thing
This commit is contained in:
parent
b1d583f024
commit
44284426c0
2 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
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}
|
||||
slug: screenshotter
|
||||
description: Screenshot images for E-Paper pricetags
|
||||
|
|
|
@ -18,7 +18,6 @@ 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")
|
||||
|
||||
|
@ -75,7 +74,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: '{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"]}')
|
||||
else:
|
||||
driver.get(task["url"])
|
||||
|
|
Loading…
Reference in a new issue