fix ha url fetch

This commit is contained in:
Jan-Henrik 2023-02-17 21:22:04 +01:00
parent 95314e4135
commit b1d583f024
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
--- ---
name: E-Paper Screenshotter name: E-Paper Screenshotter
version: 1.0.1.28 version: 1.0.1.29
#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

View file

@ -76,7 +76,7 @@ while True:
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: '{ha_url}', access_token: '{ha_token}', token_type: 'Bearer'}}));")
driver.get(task["dashboard"]) driver.get(f'{INTERNAL_HA_URL}/{task["dashboard"]}')
else: else:
driver.get(task["url"]) driver.get(task["url"])