On this page I will share my setup of Tibber intergations, Homevolt information and automation plus Sungrow automation and information. Most of it is from different sources on the Home Assistant community. It can absolutely be made much more good looking so this is just an example how you can solve getting the information in the first place.
First of all we need some data from Tibber. If you have not done that yet, go to Tibber Developer and create an account to get your access token. Once ryou have it copy the token and create this entry in the secrets.yaml file:
tibber_token: Your access token in clear text
On the Tibber developer site you can run all types of queries to find out your house data. As an example:
This is a very nice card from HACS, charger card. Go to HACS and search for charger card and install it. This card is available for most chargers out there, in my case i have two Easee chargers so I also download the Easee charger integrations before configuring the card with my entities. This is done from settings in HA, then devices & services and there you search for the name of your charger. If it is not here you can also try HACS. Almost every major EV charger are available there. The configuration is relatively simple, just note the ID of your charger and do a search and replace for that name in the YAML file and you are done. Then you can play with the visuals as you like. To the left I have also added an integration to my car, a Polestar 4. there are integrations for most cars on the market so try to find youurs. I am playing with my integration so right now there are some values that are not populated. The topmost left tile is to give an indication if I have plugged in the cable in the car or forgot it. It is not working now due to the integration but when it does it uses some other nice HACS features, Mushroom and card-mod. Mushroom gives you a very nice freedom in creating own cards and card-mod let you play with the style sheets. In this case I use the code below. In that can have different text depending on if the cable is plugged in or not, I can use different icons depending on the state and also change the colors.
type: custom:mushroom-template-card
primary: >
{% if states('sensor.polestar_4460_charger_connection_status')=='Connected' %}
Polestar 4 connected
{% else %}
Polestar 4 not connected
{% endif %}
icon: >-
{% if states("sensor.polestar_4460_charger_connection_status") =='Connected'
%}
mdi:emoticon-happy
{% else %}
mdi:emoticon-sad
{% endif %}
primary_info: name
icon_type: icon
secondary_info: state
card_mod:
style: |
:host {
--card-mod-icon-color:
{% if states("sensor.polestar_4460_charger_connection_status")=='Connected' %} green
{% else %} red {% endif %}
Until we get the promissed API we can use REST to get some more info from our batteries.
The code below is a standard query to get info about the batter like SOC etc. Place this in the configuration.yaml file. You need to change the IP under - Resource: section. For me that is ip 192.168.1.91. You can get this info from our own AP or you can go to the web server for the battery and then to the command section and type in network as command and run that. In my case the output will partially be like this:
Line 8 from the bottom: (states(‘sensor.tibber_pulse_hornkamsgatan_29_accumulated_consumption’) | float * 0.79875) is the amount of Kwh I have bought from Tibber times the cost per kWh i pay to Göteborg energi. That is the fluctuating price only, no effect tariffs. In other places I do specify that in more details. You can remove those lines entirely if you do not like to have the calculations.