Tibber - Sensor for power consumption for electric car charging

Hi Christian,
did you find out what was your issue?

best regards.

Screenshot your config files and blur the password, so i can help.

here you go, and thx in advance.

Iā€™ve tested the scriped version and it works, but would prefer to get the sensors.yaml version to run.

Its a config package and not something for the sensors.yamlā€¦

1 Like

I see a lot of confusion around sensors.yaml. May I just state something bold? Every user should implement packages in their configuration. I think it is a mistake that a packages setup is not part of the standard configuration provided with HA.

homeassistant:
  packages: !include_dir_named packages

Some could see this as personal preference but it really isnā€™t. Packages can be used to have one sensors heavy file, one automations centered fileā€¦ if the user wanted to.

@lwde thanks for your snippet! This makes everything so much easier. Iā€™m hopefully soon in a position to test and give feedback.

2 Likes

thank youā€¦
took a while till the ā€œsensorsā€ updated themselvesā€¦ but it worksā€¦
thank you also to bringing up the ā€œpackagesā€ thats totally new to meā€¦ something new to figure out in HA.

BR and greetings

Thanks for sharing, works like a charm. I changed device_class to distance for polestar2_range.

But that value isnā€™t really helpful, anyways. Where does the number 487 for the calculation SoC%/100*487 come from?

I really hope Polestar is listening and finally opens up their API, at least a little bit for the most basic informationā€¦

I added the device class now too.

487km is the WLTP range for the 2020 LR AWD version.

just integrated my Polestar in conjunction with the tibber app into HA and it works!
I now would like to add a second car, is this possible?
if it is, what and how should I modify in the yaml files?

I guess as follows?

value_template: "{{ value_json.data.me.homes[0].electricVehicles[1].lastSeen | as_datetime | as_local }}"

edit: never mind, it worked :slight_smile:

This Tibber solution looks great and simple to implement, except it hasnā€™t worked for me, as when I try and add my Polestar EV as a Power-up in the Tibber app, the app just hangs when I try and login using my Polestar ID. Seems that the service is unreachable!? Iā€™m not sure whether itā€™s because Iā€™m in New Zealand (Tibber doesnā€™t exist here), or because my Polestar is leased (although I have a Polestar ID and can log in independently of Tibber and have the Polestar app etc.). Any ideas or wise insights appreciated :slight_smile:

Hi @KiwiAndy I am also a kiwi and got Tibber working with my Polestar 2 by setting my Tibber account to be in France. Then about a month ago it stopped, it looks like something as happened to block us kiwiā€™s using Tibber. maybe they ahve geo-locked access?

Hi @Simon_Bunn. That confirms it thanks. I assume Tibber has blocked access to the NZ Polestar VIN database or similar. You may be able to use the customer integration in this post though:
Integration of Polestar 2 - #165 by leeyuentuen.

Unfortunately, I can not as it requires your car to be identified and owned by you under your Polestar ID, which being a lease car mine is not.

HI,

sorry for the late reply. Did you get it to work yourself?
I did. The problem was I had not realized I had to put it in a package to get it to work in my setup.

So, in configuration.yaml I needed to add

homeassistant:
packages:
tibber_polestar_2: !include tibber_polestar_2.yaml

And then enter the code into in my caser the file tibbe_polestar_2.yaml

Works since then.
But I do not use it anymore, as now there is a possibility with API thru Polestar which use instead.