Replies: 1 comment 6 replies
-
Off the top of my head you could make five images and use Also have a look a the home example which shows a moisture sensor graph with a gradient colour https://experiencelovelace.github.io/ha-floorplan/docs/example-home/ |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, long time user - first time poster. I've an idea of what I want to do - I'm just really unsure how to go about doing it. I set up a floorplan for my home years ago, used it every day - took a bit of a break from automating the house, just enjoyed living with it! But now I've got the bug again and I'm looking build upon what I have.
I decided I wanted more information on my hot water tank, I installed some sensors and wanted to depict that information with a visual of my tank. I have copied some code and generated SVG images running off an apache server on my network, I just really dislike how it runs - it reloads every 20 seconds and makes my dashboard look unsightly when it does. So I thought about applying the Floorplan method to it - but I am stumped. Coding isn't my natural environment and I am hoping somebody can help me.
I have created this small SVG file to appear on my dashboard, that shows my 5 sensor values - and I want it to colour the tank on a gradient based off the sensor values roughly at each point. (eg blue for cold [<30°C], purple for warm [30><40°C], red for hot[<40°C]). I don't know if it's possible for 1 formula to do all that and create the gradient in one object, so I had thought about working around it by layering images on top of one another each representing a particular sensor like so
Given that I can't give the text sensors and their respective "part of the tank image" the same ID, the tank segments have just been named tank.1 etc. I've had no trouble in the past colouring my SVGs based off ON/OFF values, but this is way beyond me.
Is it possible to do this or am I barking up the wrong tree? Any help or a point in the right direction would be hugely appreciated!
Regards,
Craig
Beta Was this translation helpful? Give feedback.
All reactions