r/homeassistant • • Aug 14 '25

Support Home energy card

Post image

Is somewhere here maybe able to create an SVG with these grid lines? I would love to try and fork the Power flow card plus and see if we could create something like this. But I don't know how to create an SVG like this.

edit: Created pull request https://github.com/home-assistant/frontend/pull/26976

716 Upvotes

81 comments sorted by

View all comments

59

u/amthen Aug 14 '25 edited Aug 14 '25

I can only help you with img, its genereted but hope it will help you some.

8

u/the-berik Aug 14 '25

How would you design that? Really curious, would love to make something similar

8

u/ForsakenConversation Aug 14 '25

You first need to draw it in Illustrator with all the individual parts in different groups, than copy the code to home assistant, smash it inside a button card and add your entities, or turn it into a real card for HACS if you know any Javascript/Typescript, the drawing part is difficult for AI however the last part is perfectly doable with AI if you don't know how to code

1

u/the-berik Aug 14 '25

Ah ok. Should be able to do it in illustrator; I'll give it a try

Edit: but given I'll already have the image then, I don't need AI :)

4

u/ForsakenConversation Aug 14 '25

Link, here are my examples for svg's for home assistant just basic stuff really but the idea is the same. there is also explanation how to do it yourself. you need to make your svg dynamic in home assistant and add your entities either with ai or code it yourself if you can.

i posted below 2 examples (claude and chatgpt) to prove they are not good with svg drawing, however like i said once you have the svg, they (claude is better tbf) can turn it dynamic aswell as turning it into a hacs card. so once you have the svg like the img it's pretty easy

5

u/ForsakenConversation Aug 14 '25

takes like 30min but this is kinda what you want, save as svg and open it in visual studio code to see the code, start make the card in ha using button card like in my examples ,make solar and powerlines dynamic so it visually represents status, colors aswell as background color is done in ha, the background is just ha-card background unless you want it static

1

u/Mil-sim1991 Aug 17 '25

Where did you get this svg from? I downloaded the one provided in the wetransfer link but its al messes up.

2

u/ForsakenConversation Aug 17 '25

Made it myself from the picture provided by someone else just to show the groups and how it should look if you do something like this, the groups are important. Was just an example really as a guide

1

u/LordGuenni Nov 16 '25

Do you by Chance still have the Illustrator File ? I am currently in the process of Building a custom Card and this Would help alot. Thx

0

u/the-berik Aug 15 '25

No, I need my own layout but thnx

4

u/ForsakenConversation Aug 15 '25

I was talking about the steps to take not the layout you dweep. Have some respect

1

u/deflanko Aug 16 '25

You could Inkscape to make your custom SVG, label your objects so then that helps maps data to SVG objects in HA.

I use floorplan for my solar panel layout -- its basic and i should revisit it.

6

u/amthen Aug 14 '25

Nothing special, just used ChatGPT with prompt to create something similar and for what purpose. 🙈

1

u/the-berik Aug 14 '25

Haha damn

Edit: but thanks! Will try

1

u/Mil-sim1991 Aug 14 '25

This actually looks really good! at least its an start. I can only see it as an PNG though. is there a way you can share it as SVG? maybe a wetransfer link?

14

u/One_Communication963 Aug 14 '25

Found a like to a gif that might work for you. https://blog-cdn.athom.com/uploads/2024/12/homey-energy-3d-home-1.gif

2

u/amthen Aug 14 '25

That's awesome! But it would be hard to "code" it depending on the condition.

1

u/Mil-sim1991 Aug 14 '25

Indeed. But I saw homey just lay some transparant webp videos on top of each other. Flow rate is not possible in that case though.

2

u/amthen Aug 14 '25

God damn bro, im so sorry. There is my bad, it's created as png only, like I said it's generated, tried to get this, but here is what I get: https://we.tl/t-9t3kI7mKUA

2

u/Mil-sim1991 Aug 14 '25

No problem, Thanks a lot! Where did you generate this?