Replies: 2 comments 4 replies
-
For reference, here's the YAML. In the SVG file there are only two groups , power_in and power_out, and each group contains only the path object for one arrow.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Just an update - I figured out how to toggle SVG elements on/off by individual and by layers. It was only a challenge because the examples everyone was using were for bitmaps / pngs, whereas I have SVG graphical elements in the floorplan SVG as layers, for instance; arrows and lines that depict how power flows in my home. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two SVG elements: power_in_arrow and power_out_arrow. Depending on the state of my HA entity sensor.grid_power, I want to turn on/off the opacity of these elements accordingly When power is flowing into my house from the grid, ala:
'${parseFloat(entities["sensor.egauge_grid_pushpull"].state) > 0`
I would like to turn the opacity of power_in_arrow to 1 and the opacity of power_out_arrow to 0.
Since the elements seem to want to be the same name as the entity (and why the heck is that a restriction when we have to specify the elements: anyway?) how can I do this when there's multiple svg elements? I've got css classes for turning off the individual elements, but hs-floorplan can't seem to find the elements by name.
Beta Was this translation helpful? Give feedback.
All reactions