sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Dark mode #93

Closed dmutpuul closed 5 months ago

dmutpuul commented 7 months ago

Hello. Thank you very much for great addon. I am using it to generate screenshot of some cards and send to telegram. Is it possible to add dark mode to browser setting or some arguments for browser ? Find something about that, but i don't where to change that on my server)

async function renderUrlToImageAsync(browser, pageConfig, url, path) { let page; try { page = await browser.newPage(); await page.emulateMediaFeatures([ { name: "prefers-color-scheme", value: "light" } ]);

deenter commented 7 months ago

@dmutpuul please check the latest version, the dark mode feature is now available via #97

dmutpuul commented 7 months ago

@deenter Hello! Have no updates so i reinstalled addon. I have preferred color option in config, but it doesn't work( still no dark screenshots... P.s. add render delay 5000 but no effect.

deenter commented 7 months ago

Seems to be an issue when using it directly as an addon via HACS, using the latest docker image everything works as expected for me.

dmutpuul commented 7 months ago

@deenter no hacs) just added custom repository to addon store.

deenter commented 7 months ago

Ah yes sorry, was talking about the custom repository via addon store, my bad.