slipx06 / sunsynk-power-flow-card

⚡A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.
MIT License
195 stars 55 forks source link

Historical Base64 image #130

Closed brucehat closed 11 months ago

brucehat commented 11 months ago

Is there an existing issue for this?

Current Behavior

Current historical base64 image is in the javascript application, could it please be configurable as an entity or the PNG put in the www folder so it can be swapped to images of other brands like: image

Expected behaviour

Image based on model and modern

Possible Solutions

  1. Use model & modern: false combination to present image for other inverters
  2. provide a script include file for base64 image with true / false driver
  3. externalise png to folder on HA so it can be replaced but not overwritten during updates.

Mode

full

Context / Reason

Just to make your card more cool - it's part of a lot of our lives!

slipx06 commented 11 months ago

I can change the modern attribute to image: with the options of; modern, sunysnk, lux, solis and goodwe. If you can share with me the images/svg's ?

Legnava89 commented 11 months ago

Image for goodwe goodwe

brucehat commented 11 months ago

Hi,

Here is Lux, not sure what is better or do you want bas64?

HYBRID-001

Thanks Bruce

brucehat commented 11 months ago

Here is Solis

B5CbhwMTrqD3ggCeGzmCQy3Y11mHZcIBiAA1Qi8D

brucehat commented 11 months ago

Sorry I focused on quality not size --> tell me what you need and I will happily convert / resize etc.

Pho3niX90 commented 11 months ago

@slipx06 I did this on my fork. The base64 is moved to constants, and then selected based on the model. I haven't created a PR as yet as I am trying to do some refactoring.

CaptainMidnight commented 11 months ago

I can change the modern attribute to image: with the options of; modern, sunysnk, lux, solis and goodwe. If you can share with me the images/svg's ?

Hi @slipx06 I'd love it if you could make that change - I've just been looking at the code myself (although I'm not a coder more hacker/scripter) and created my own base64 code string from a Lux inverter image that I resized to 72x54 which I think is your modern image size, replaced it in your code and uploaded to HA just as a way of learning just a little of how this stuff works.....

Anyway, your suggestion would be fantastic as you can see with now supporting 4x different inverters, there's now a much bigger potential user base for your card.

I did look a changing another card to try and integrate some of your functionality but why reinvent the wheel......

slipx06 commented 11 months ago

@slipx06 I did this on my fork. The base64 is moved to constants, and then selected based on the model. I haven't created a PR as yet as I am trying to do some refactoring.

Thanks. I'll wait for you to finish before I do anything

slipx06 commented 11 months ago

I can change the modern attribute to image: with the options of; modern, sunysnk, lux, solis and goodwe. If you can share with me the images/svg's ?

Hi @slipx06 I'd love it if you could make that change - I've just been looking at the code myself (although I'm not a coder more hacker/scripter) and created my own base64 code string from a Lux inverter image that I resized to 72x54 which I think is your modern image size, replaced it in your code and uploaded to HA just as a way of learning just a little of how this stuff works.....

Anyway, your suggestion would be fantastic as you can see with now supporting 4x different inverters, there's now a much bigger potential user base for your card.

I did look a changing a other card to try and integrate some of your functionality but why reinvent the wheel......

Great. Can you share your encoded image

CaptainMidnight commented 11 months ago

Absolutely here it is, on this image I've reduced the icon to 52x72 as 54x72 was a bit too close to the inverter temps.

icon_inverter_2

Image code: iVBORw0KGgoAAAANSUhEUgAAADQAAABICAYAAAC5mNZRAAABb2lDQ1BpY2MAACiRdZG9S8NAGMaftkrFVoroIOIQoYpDC0VBHLUOXYqUWsGqS3JNWiFJwyVFiqvg4lBwEF38GvwPdBVcFQRBEUTc3P1apMT3mkKLtHdc3h9P7nm5ew7wp3Vm2D0JwDAdnk0lpdX8mhR8R4jmIMYRkZltLWQyaXQdP4/wifoQF7267+s4QgXVZoCvj3iWWdwhnidObzmW4D3iYVaSC8QnxDFOByS+Fbri8Zvgosdfgnkuuwj4RU+p2MZKG7MSN4iniKOGXmHN84ibhFVzZZnqKK0x2MgihSQkKKhgEzocxKmalFlnX6LhW0KZPIy+Fqrg5CiiRN4YqRXqqlLVSFdp6qiK3P/naWsz0173cBLofXXdzwkguA/Ua677e+q69TMg8AJcmy1/mXKa+ya91tKix0BkB7i8aWnKAXC1C4w8WzKXG1KAll/TgI8LYCAPDN0D/eteVs3/OH8Cctv0RHfA4REwSfsjG3/MEWfyDgOuPwAAAAlwSFlzAAALEwAACxMBAJqcGAAABXBJREFUaEPdW11u20YQ/kiuJMuynRgoYCBogz4ELeIaRU5QFO27z9ID+MVnaI7RHKJHcIAWaAyrbpACLprKon9l8a8zS1OiKFLalZakorUNG9TuzvfNzM4Od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O2e4ejoCCcnJ9jd3Z2wQFrxLl37HB4e4vj4WD7mKxw2jrxj1W+LjZolRy5oumu6vLzE2dkZLujWkH9mtdN3p+BLb74CSqySiXLFi1CftMaI8ZqGRdedqnuj7Jvxr1RQMK/1OhbnI6EFySw4TMN2il2TrUcnbK8M+Nkcp/ehyoDnCVp+k49PfYyQMDKJoosVd9PKFMbTrAb4PFpz9qHVBV5kI9qHjPnc0u6y6ATxbhR/6RfKLSq1lHHTHrTgGjKHLg2J/+aKL86iVRr3yxZIGSVUvOLU1qLvB1QQtYuDgwNZ8bW52Sms6Lq7u8P+/kvqR6U8qfcM68/z80gmd5otH6Ia8FmiGIvnDWX2XISLX3gCqtXjgqn0yw/3V7JQWeCzxDj9D8IALaoGa7c32QHHm2QOCHa5bOVXqkRzee1qGTlHXJI5e76nPFU2My+/8KJCPck3VmVVzOtYIfCijIXP6emwnjy36DRCB6Sxi7MlhNLbq3VzcxtHOZ155llL+XOzQmWUe/PmlworAM0SyOqNzySsvb29SPUdXlnxNXSUdbB0lic6VNGbFJbXgMOYyFGFP/vdOliINcM8PvFse9rAa0Mo2XrWhlBiq7UhlMSBtSG0ti4nk9Pkv7OMbQo1TJRYiAn9NhgMgjr+eck0bzJM83+TYoOvfV17wgAAAABJRU5ErkJggg==

Legnava89 commented 11 months ago

Beauty, beauty ... slipx06 is a god. Screenshot_20231112_183052_Home Assistant

brucehat commented 11 months ago

Lux also good - awesome work @slipx06 image

CaptainMidnight commented 11 months ago

What a great update, which I'm sure will make many users very happy, thank you!

slipx06 commented 11 months ago

@Pho3niX90 did all the heavy lifting for this change. He deserves all of the credit. 👏