-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
card_mod CSS values not consistently rendering #85
Comments
For what it's worth, even using this yaml instead doesn't product consistent results (without using card_mod specifically): style: | Here are two examples of different renders. Nothing has changed between them, I just waited a bit and refreshed my homeassistant:5000 image pull from my web browser. The kindle reflects this image exactly. The image with the bold lines/text is what it should look like based on my style. Without the bolds, it's harder to read the text on the Kindle. |
Any chance someone can take a look and let me know if I'm doing something wrong? |
I can recommend setting |
I did try that unfortunately with varying levels of delay. The screenshots above came after using a setting of 20000, which I believe should be 20 seconds. I started much smaller, then kept moving up. Sometimes, only part of the screenshot is wrong (e.g. the forecast section will be bold, but the other ones won't be. It's a real head scratcher for me. |
I have the same issue as gdst4rp. |
Same here. I have tried delays up to 60 seconds. Works really inconsitently. I am wondering if Puppeteer is having issues with card-mod. Frustrating things that it works some of the time. I even tried access the Puppeteer instance and changing the user agent, but that didn't improve results. |
I suspect it is a caching issue inside docker. In general the first run works and then it is inconsisent. |
Just a quick question before I will debug this further: did you all install lovelace-card-mod via |
I use the performance improvement via extra_module_url.
|
Same I think off the top of my head but can confirm later. frontend: |
It seems there are problems in card_mod: |
I have tried very simple cards, with a single weather element and a delay of 50 seconds and I still get inconsistency. The page will render in Chromium Canary on my macbook in under a second. I think get a correct render of the page 1 in 20 times (but not properly tested), but I can do if it is helpful? |
Did any of you figure this out? 👀 |
this fixed this issue for me: If you've installed card-mod via HACS, try adding the module directly to the frontend in your
|
@avhm That looks like it works for me. Thanks for chasing this down. |
@avhm I changed the path to card-mod.js like you suggested. Now it works for me, too. |
My dashboard uses code like the following, but the output rendered image will randomly vary from using the CSS elements (bold, font size, and borders), or completely ignoring them. If I view the dashboard from my browser, everything works just fine. Checking the native image itself, I see that the render is also not consistent which rules out the Kindle device. I have tried different rendering_delay values as well
I'm guessing it's something to do with how the page is rendered.
card_mod:
style: |
ha-card {
border: 2px solid black;
font-weight: bold;
}
.forecast {
font-size: 20px;
}
The text was updated successfully, but these errors were encountered: