Could I suggest you look at my code here and maybe fork it for your improvements (happy for your version to be the main one and for me to refork from you), I’ve broken up the package to make it more (imo) maintainable and customisable for others as a single file is too hard to manage.
Also with it being it github it would be easier update as each commit is tracked so people can see exactly what has changed and they can fork and make local changes that maybe arent relevant to you.
Only suggesting this as trying to follow this 6m thread of changes and copy paste without diffs is rather frustrating especially when there is a way that is effectively a global standard for managing code.
Feel free to ignore me though there’s no hard feelings if you do
EDIT:
PS Happy to help you if you are unfamiliar with Github and version control.
Feel free to raise PRs against mine and if @remko wants to own it i’ll happily grant it back to him… I’ve updated the readme to ensure credit goes to the correct person.
Thanks for this!! I fully agree Github is the way to go, I just never created my own project there. I actually currently do not have that much time to manage this, so I am perfectly happy with using your Github as the master. I will update the first post to reference your code
When I made it I am sure I had a reason for it. I think it had something to do with restoring the state after a reboot, or when something becomes unavailable, but looking at it now… I have to agree it looks weird. It can probably just be taken out.
Just looked over your repo (sorry, is that short for repository? I’m pretty new to this).
Looks really good. Like the way you’ve split it into packages and created additional templates for things like “battery time to charge” and “battery status info” etc. Also like the additional tariff sections. I need to incorporate some of that into mine to factor in our Octopus Go rates.
Just a question on packages if I may. I currently have everything in a single energy.yaml file which is called from my config.yaml thus:
Hi Dave, by chance I installed the HA Update 2023.3.5 last night which fixed the issues.
Just back to the extra digits to sort e.g. Battery % is 43.238% which I’ve got an idea how to fix reading through these posts, so going to try that as well as using the Template Editor.
In the inital “set” I define ‘battery_effectivness’ which is used in the if then else statements. I basically read the ‘solar_battery_effectivness’ into the variable used in the lower statements.
@Remko It might be worth either creating a 2nd repo or adding a dir called Views to this one and then we can manage the frontend code the same way… I’ve purposefully not do that with your as my dash is different and still not really what i want it to look like.
You could create a new template sensor and for the value template just add {{ states('sensor.solaredge_b1_state_of_energy') | round(2) }} to it then use the new sensor for the card
Always nice to hear that someone managed to upgrade HA without any issues
Glad you got it sorted.
If you figure out how to reduce the number of decimals in the battery state of energy, let me know. The Gauge Card is okay, but the Power Distribution and Tesla Like Flow Card both show battery state of energy to umpteen decimals. Since they all use the same entity, and that entity is set to 1 decimal place by default, I can’t figure out why.