stringify
This commit is contained in:
parent
7e20d88f1a
commit
da8489446d
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: Screenshotter
|
name: Screenshotter
|
||||||
version: 1.0.1.7
|
version: 1.0.1.8
|
||||||
#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
|
||||||
|
|
|
@ -51,10 +51,10 @@ while True:
|
||||||
if task.get("ha_auth"):
|
if task.get("ha_auth"):
|
||||||
print("Doing HA Auth")
|
print("Doing HA Auth")
|
||||||
print(driver.execute_script(f"window.localStorage.setItem('hassTokens', {{hassUrl: '{ha_url}', access_token: '{ha_token}', token_type: 'Bearer'}});"))
|
print(driver.execute_script(f"window.localStorage.setItem('hassTokens', {{hassUrl: '{ha_url}', access_token: '{ha_token}', token_type: 'Bearer'}});"))
|
||||||
print(driver.execute_script(f"return window.localStorage.getItem('hassTokens');"))
|
print(driver.execute_script(f"return JSON.stringify(window.localStorage.getItem('hassTokens'));"))
|
||||||
driver.get(task["url"])
|
driver.get(task["url"])
|
||||||
time.sleep(int(wait))
|
time.sleep(int(wait))
|
||||||
print(driver.execute_script(f"return window.localStorage.getItem('hassTokens');"))
|
print(driver.execute_script(f"return JSON.stringify(window.localStorage.getItem('hassTokens'));"))
|
||||||
|
|
||||||
print("Making screenshot")
|
print("Making screenshot")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue