tesla icon indicating copy to clipboard operation
tesla copied to clipboard

Battery Sensor Stopped Working

Open ChristopherJacob opened this issue 2 years ago • 22 comments

Get the following error message in home assistant.

This entity is no longer being provided by the tesla_custom integration. If the entity is no longer in use, delete it in settings.

ChristopherJacob avatar Oct 26 '22 21:10 ChristopherJacob

Entity names have changed. You'll need to find the new entity name.

alandtse avatar Oct 26 '22 21:10 alandtse

It doesn't even show in the devices tab. Nothing changed on my side. I have looked through all entities provided by the integration. Any ideas?

image

ChristopherJacob avatar Oct 26 '22 21:10 ChristopherJacob

So this isn't a case where you just updated to 3.x?

alandtse avatar Oct 26 '22 21:10 alandtse

It doesn't even show in the devices tab. Nothing changed on my side. I have looked through all entities provided by the integration. Any ideas?

image

Keep scrolling. It's under...Sensors.

GitHubGoody avatar Oct 27 '22 10:10 GitHubGoody

It doesn't even show in the devices tab. Nothing changed on my side. I have looked through all entities provided by the integration. Any ideas? image

Keep scrolling. It's under...Sensors.

I was having the same issue. My battery % showed 'unavailable' until after a reboot of HA.

subcritical71 avatar Oct 28 '22 01:10 subcritical71

Same issue here, but appears to be all sensors Screenshot 2022-10-28 at 03 25 34

running 3.0.2 on 2022.10.5 Supervisor 2022.10.0 Operating System 9.3 Frontend 20221010.0 - latest

JasonRS1969 avatar Oct 28 '22 02:10 JasonRS1969

Same here, but everything just suddenly stops working

DanniDesign avatar Oct 28 '22 05:10 DanniDesign

Same issue here, but appears to be all sensors Screenshot 2022-10-28 at 03 25 34

running 3.0.2 on 2022.10.5 Supervisor 2022.10.0 Operating System 9.3 Frontend 20221010.0 - latest

These are the old sensors. Did you remove and re-add the integration as advised?

Most if not all sensors have new names, the appended '_sensor' on the end of the sensor names has been removed.

FalconUK avatar Oct 28 '22 16:10 FalconUK

. Did you remove and re-add the integration as advised?

Where is this advised? I upgraded via HACS, no mention there, and I looked on the code page, couldn't see anything there either.

JasonRS1969 avatar Oct 28 '22 17:10 JasonRS1969

Removing and reading the integration does resolve the issue btw. Now to update dashboards and automations.

JasonRS1969 avatar Oct 28 '22 17:10 JasonRS1969

. Did you remove and re-add the integration as advised?

Where is this advised? I upgraded via HACS, no mention there, and I looked on the code page, couldn't see anything there either.

image

FalconUK avatar Oct 28 '22 18:10 FalconUK

Not sure if this is same issue as OP- but I reinstalled when v3 came out, and things have been mostly fine- however the “battery” sensor constantly goes unavailable randomly. Running latest (v3.5.1)

nicholashead avatar Dec 03 '22 23:12 nicholashead

Not sure if this is same issue as OP- but I reinstalled when v3 came out, and things have been mostly fine- however the “battery” sensor constantly goes unavailable randomly. Running latest (v3.5.1)

This sounds like a new issue. I took a quick look and I don't see this same behavior, and I don't see any obvious reason it would become unavailable. Can you create a new issue and I'll dig a bit deeper. I recently made a small change to the battery sensor in v3.2.0 so I want to make sure it's not due to that or affecting others.

carleeno avatar Dec 03 '22 23:12 carleeno

Not sure if this is same issue as OP- but I reinstalled when v3 came out, and things have been mostly fine- however the “battery” sensor constantly goes unavailable randomly. Running latest (v3.5.1)

I got the same problem. However I think it is related to the car going into sleep, as it comes back when I awake the car. Same issue with the charge limit.

My smart charge automations relies on these two entities, so I really need them to be available (last known state). I will try this meantime and see if this workaround works: (edit: did not work)

`sensor:

  • platform: template sensors: zach_s_tazzzz_battery: value_template: >- {% set soc = states('sensor.zach_s_tazzzz_battery') %} {{ soc if soc != 'unknown' else states('sensor.zach_s_tazzzz_battery') }}

automation:

  • service: input_number.set_value target: entity_id: input_number.zach_s_tazzzz_charge_limit data: value: >- {% set soc = states('number.zach_s_tazzzz_charge_limit') %} {{ soc if soc != 'unknown' else states('number.zach_s_tazzzz_charge_limit') }}`

Sh1bbyz avatar Dec 04 '22 15:12 Sh1bbyz

@nicholashead / @Sh1bbyz is your HA restarting while your car is asleep? That will cause sensors to show unavailable since the api can not remember the state across restarts, and it doesn't poll again until the car awakes.

If so you can fix this in the configuration, check the box "Force cars awake on restart" This will wake the cars to set the sensors on HA restart, then the car should go back to sleep in ~10 minutes.

carleeno avatar Dec 04 '22 15:12 carleeno

@nicholashead / @Sh1bbyz is your HA restarting while your car is asleep? That will cause sensors to show unavailable since the api can not remember the state across restarts, and it doesn't poll again until the car awakes.

If so you can fix this in the configuration, check the box "Force cars awake on restart" This will wake the cars to set the sensors on HA restart, then the car should go back to sleep in ~10 minutes.

@carleeno That might have just done it! I didn't know what that option really meant, so I never bothered to select it. Now it seems to work as intended with no more "unavailable"! Thx!!

Sh1bbyz avatar Dec 04 '22 17:12 Sh1bbyz

@carleeno I believe you're correct - I was probably viewing it after a reboot. I've adjusted my config settings and it all looks great. Thanks.

nicholashead avatar Dec 09 '22 16:12 nicholashead

Help needed, I have integrated the new Tesla custom integration for vehicle / gateway and powerwall. It all looks great but the car battery sensor is not coming through. I have deleted reset reinstalled reset a couple of times but no battery level. It was there with my old integration. Here is what I get:

image

image

Duff-Box1 avatar Mar 10 '23 17:03 Duff-Box1

@Duff-Box1 the error you're seeing there (408 vehicle unavailable) means your car is sleeping when the request is being made. Should make sure your car is awake - there's settings in the custom integration for how invasive you want the polling/wakeups to be: https://github.com/alandtse/tesla/wiki/Polling-policy

nicholashead avatar Mar 10 '23 17:03 nicholashead

Thanks yes, however i did wake up the car before installing and the integration says it wakes the car in installation. So it is a bit oddAll the other entities pull through?Sent from my iPhoneOn 10 Mar 2023, at 17:50, Nicholas Head @.***> wrote: @Duff-Box1 the error you're seeing there (408 vehicle unavailable) means your car is sleeping when the request is being made. Should make sure your car is awake - there's settings in the custom integration for how invasive you want the polling/wakeups to be: https://github.com/alandtse/tesla/wiki/Polling-policy

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Duff-Box1 avatar Mar 10 '23 18:03 Duff-Box1

If I reinstall the custom integration without the powerwall item selected the car battery status % reappears, I then have to install the old powerwall integration to see the powerwall, but the old integration does not allow powerwall control. So it seems I can have powerwall control and no car battery status or powerwall control but not both!There are two gateways on my Tesla app as I had one fail, so one is dormant and the other active. It’s possibly something to do with that, I will request Tesla remove the dormant one and try again after, or happy to try any other suggestions any one has.Many thanks.Sent from my iPadOn 10 Mar 2023, at 18:12, Tim Duffy @.> wrote:Thanks yes, however i did wake up the car before installing and the integration says it wakes the car in installation. So it is a bit oddAll the other entities pull through?Sent from my iPhoneOn 10 Mar 2023, at 17:50, Nicholas Head @.> wrote: @Duff-Box1 the error you're seeing there (408 vehicle unavailable) means your car is sleeping when the request is being made. Should make sure your car is awake - there's settings in the custom integration for how invasive you want the polling/wakeups to be: https://github.com/alandtse/tesla/wiki/Polling-policy

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Duff-Box1 avatar Mar 11 '23 09:03 Duff-Box1

I resolved this issue by requesting Tesla to remove the dormant gateway (previously replaced) on my account and App. Re installed the integration and Vehicle battery now appears.Sent from my iPadOn 10 Mar 2023, at 18:12, Tim Duffy @.> wrote:Thanks yes, however i did wake up the car before installing and the integration says it wakes the car in installation. So it is a bit oddAll the other entities pull through?Sent from my iPhoneOn 10 Mar 2023, at 17:50, Nicholas Head @.> wrote: @Duff-Box1 the error you're seeing there (408 vehicle unavailable) means your car is sleeping when the request is being made. Should make sure your car is awake - there's settings in the custom integration for how invasive you want the polling/wakeups to be: https://github.com/alandtse/tesla/wiki/Polling-policy

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Duff-Box1 avatar Mar 15 '23 07:03 Duff-Box1

It seems that it did stop working for me a few days ago. The sensor still shows up sometimes (I believe on restart HA), but becomes unavailable after a few minutes

(going through fleet API)

Chacsam avatar Jun 10 '24 14:06 Chacsam

Hi @Chacsam please could you open a new issue with logs, as this issue is quite old (and predates Fleet API)

skipishere avatar Jun 10 '24 15:06 skipishere