Looking at the previous code I had which somewhat worked, there was also no tap_action. But again, this code didn’t seem to handle colours correct which is why I’m using your code.
The code for the light images is correct without tab_action. Its just the color of the light if its on.
For the icon switch you have to edit the other code, where you have the icon and the color wheel for hold_action. There you have to insert the tab_action.
I believe this has to do with the hue-rotate code. If my colored lights are not rendere as red, the colors in HA will not show correctly. Perhaps you’re not affected by this, have you tried the same code with a light rendered as white instead of red?
I got a white and a red rendered image.
This is the actual selected light color.
And its not only if i select a red light color (wich is obviously not red its white) even all other colors are slightly off. Just a white color shows correctly.
EDIT: With a light bulb it works great with all colors just on a lightstrip it doesn’t.
Have also just tried this config on another hue colour light with all the images rendered for white and red & it still doesn’t work. So I must be doing something wrong/have broken config somewhere.
Annoying how it somewhat works on the old code but doesn’t work at all on this new code. But I need this new code haha
This looks like a decluttering card or button card.
You have to have inside your visual.yaml also a code witch shows the light icon on your desk.
I can show you my code but I do not use icons. With my code you have to click on an area. (dont like icons on the light floormap ) This code is with the light wheel etc. if you hold.
If you need a icon you have to look at CDRX code. In my case there is no icon and you have to play around with the position of the area:
Hmmm I’m just spitballing here, but where did you put the new code? The order of the code inside the yaml file is important, since the engine will render from the top down. That means your base image (floorplan at night) should be at the very top of your code, followed by the day image with the sun attributes. Since the engine renders from top down, your night image will be the image all the way at the back of your view, with all images coming after it rendering on top of it.