I am very new to HA so bear with me. I have an Octopus Energy Mini that I have working very well with HA. I have a very basic numerical display of current grid consumption.
I have solar, but have not been able to configure anything yet to provide generation data. When I am exporting, the grid consumption figure changes to a negative value. Is it possible with a bit of custom code to show this as a positive figure, and change the icon to show that power is being exported to the grid?
Long story short, my meter doesn’t show export and I don’t get paid for export, but I would like to show my export data, and have an indication on my dashboard that I am exporting.
Me again! So, that works exactly as you’ve described Tom, thank you. I have attached a screenshot of what I now have. What I would like to achieve if possible, is have only one sensor showing, but change the icon and it’s colour to show import or export, I have the two different icons but not sure if this is possible to do with the code you have kindly provided?
I managed to do this with conditional cards. The Grid Consumption card will show for any figure above zero and the Solar Export card shows for anything below zero. Probably not the best way to do it but it works.