json
This commit is contained in:
parent
da8489446d
commit
af4f624a88
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
name: Screenshotter
|
||||
version: 1.0.1.8
|
||||
version: 1.0.1.9
|
||||
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
|
||||
slug: screenshotter
|
||||
description: Screenshot images for E-Paper pricetags
|
||||
|
|
|
@ -50,11 +50,11 @@ while True:
|
|||
|
||||
if task.get("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"return JSON.stringify(window.localStorage.getItem('hassTokens'));"))
|
||||
print(driver.execute_script(f"window.localStorage.setItem('hassTokens', JSON.stringify({{hassUrl: '{ha_url}', access_token: '{ha_token}', token_type: 'Bearer'}}));"))
|
||||
print(driver.execute_script(f"return window.localStorage.getItem('hassTokens');"))
|
||||
driver.get(task["url"])
|
||||
time.sleep(int(wait))
|
||||
print(driver.execute_script(f"return JSON.stringify(window.localStorage.getItem('hassTokens'));"))
|
||||
print(driver.execute_script(f"return window.localStorage.getItem('hassTokens');"))
|
||||
|
||||
print("Making screenshot")
|
||||
|
||||
|
|
Loading…
Reference in a new issue