diff --git a/screenshotter/config.yaml b/screenshotter/config.yaml index 8725a43..31e817e 100644 --- a/screenshotter/config.yaml +++ b/screenshotter/config.yaml @@ -1,6 +1,6 @@ --- name: Screenshotter -version: 1.0.1 +version: 1.0.1.1 #image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch} slug: screenshotter description: Screenshot images for E-Paper pricetags diff --git a/screenshotter/rootfs/app/app.py b/screenshotter/rootfs/app/app.py index dfe4072..12cbc10 100644 --- a/screenshotter/rootfs/app/app.py +++ b/screenshotter/rootfs/app/app.py @@ -41,11 +41,12 @@ while True: for task in tasks: if task["next_execution"] > now: continue + print(f"Running {task['name']}") driver = webdriver.Chrome(options=chrome_options, desired_capabilities=d) driver.implicitly_wait(10) driver.get(task["url"]) # pause 3 second to let page loads - time.sleep(wait) + time.sleep(int(wait)) # save screenshot file_name = f'/tmp/{task["name"]}.png' driver.save_screenshot(file_name)