Hi, I am trying to setup picture-glance cards in my UI and so far I am successful. I set up a light switch with tap-action glance that should show an image to reflect if lights are on or off. It does everything I want/expect - except updating it’s image on tap.
Unless I F5 (or equivalent on mobile), it remains on the last state image since page refresh.
As said, it works. I get the image I expect to see. The thing is, I have to refresh the page in order for it to update. I am used to see my switches show their state in realtime (or close to rt).
That’s why my question: Is this a bug or did I miss something?
I’m guessing it has to do with the spacing issues you have in that configuration. You had an extra space in most of your config. ALso, you had an extra attribute that isn’t allowed, show_state. Not sure where that came from.
Hm, that spacing may be my bad. I did some free formating here to get the text sitting on the right (unlike in my yaml). It shouldn’t be (and isn’t) the issue in my yaml. Homeassistant would have complained if spacing was off - and I just checked it’s right too. (love notepad++ and it’s spacing markers!)
That “show state” was copied over from “picture-entity”, which I used as template to start with. My mistake. Fixed it. Didn’t help, sadly.
I am pretty sure there is nothing wrong with my yaml. I’m basicly just checking if I missed something or if it’s actualy HA who misses a line of code to update uppon tap-action.
I have placed scenes in the space for entities, so I can select them quickly.
My Picture-Glance works perfectly fine, except updating it’s state-image on toggle. It only updates on page refresh.
Here are two combined screenshots, showing that the image won’t update by itself. The two lamps beneath are turned on and once I hit F5, the image updates correctly.
Note: light.bedroom is the room itself, containing all lights within this room. This should allow for when turning on any light (while the other remains off), the state of the room turn on too. light.bedroom_light is the bulb on the ceiling while light.bedroom_ground_light is a LED-Strip on the ground.
I have just checked if in the “states”-screen (that “<>” icon on the front page) the entities update after switching on lights. And yes, all lights inkl. the room itself switch to “on” after clicking the picture. The image however remains gray - until F5.
On my PC Firefox.
On my mobile Safari, the html5 app (from placing the webpage to homescreen) and the dedicated app from app store.
Homeassistan is version 0.94.4.
Looks like it. I have not tested it with a single light, since my plan was to show (and toggle) the entire room.
It’s an interesting issue that it would update on a single entity, but not on a set that is defined as a single entity - as in it’s not group.lights, but light.lights. Also the actual entity state does update correctly in both cases.
Funny enough, the card light (like the two light bulbs with brightness slider for top and ground light in my screenshot) does work with the same setting. (It’s what gave me the idea to use the more beatiful picture-glance instead of that bulb that looks identical to the single lights)
I have tried to set my picture-glance to a single light, but it did not work out in the end, same issue as before.
I have decided to go a more long-road clean-result route instead.
I have switched my setup from picture-glance to picture-entity. This had one advantage and one disadvantage:
Pro is that it works out of the box like a charm. No bug, which is nice because the switch to picture-entity is very easy.
Cons is that I can not place my scenes in the card as before. They need a new one.
But actually that’s not that bad. You see, picture-glance allowes for entities to be listed within it’s status bar. But, at least for scenes, they do not work as “press to turn on”. It opens a second window to do that. So I happily switched them to a glance-card. Yes, it was a bit of a pain to make it properly work, but it was straight forward enough to get the result I want pretty fast. I’m happy with the new setup!
Thanks to all helping me out here. Especialy thanks to @Holdestmade for linking the bug report, it helped me to understand the problem and make a better decision!
show_state might not be allowed, but it’s documented (Picture Glance Card - Home Assistant). It doesn’t appear to work like it does with a picture-entity card.