-
I wish to overlay a light map on my floorplan, I have added the light map to my svg file (using inkscape with gradient fill) and it works great for a white globe however I need to dynamically change the gradient start color for my color globes... Is there a way to change the gradient stop color within ha-floorplan..? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Could you please be a bit more specific, by telling a few more things about what you're working with, and what you're expecting. Thanks. Illustrations are much appreciated, too. If possible, update the title as good as you can, too 👍. |
Beta Was this translation helpful? Give feedback.
-
What sort of light entities are these in HA? The light example we put together shows how to generate RGB values in CSS, to mimic the RGB values of the physical light. Not sure if this concept can be reused in your scenario. https://experiencelovelace.github.io/ha-floorplan/docs/example-light/ Can you give us more detail about your HA light entities, and what the CSS looks like within the SVG? |
Beta Was this translation helpful? Give feedback.
-
Yes, there is a way. Can you try this? In your SVG file, assign an
Then, in your floorplan config, you can simply control the style of the stop, since it can be referenced by its
Can you try that, and let us know how it goes? The Light example shows the gradient in action: https://experiencelovelace.github.io/ha-floorplan/docs/example-light/ |
Beta Was this translation helpful? Give feedback.
@narrcom
Yes, there is a way. Can you try this?
In your SVG file, assign an
id
to each of the gradient's stops you'd like to control from floorplan (i.e.id="light_gradient_color_0"
):Then, in your floorplan config, you can simply control the style of the stop, since it can be referenced by its
id
(i.e.element: light_gradient_color_0
).