Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which field provides the ChargingState? #123

Open
virtualzone opened this issue Mar 2, 2024 · 10 comments
Open

Which field provides the ChargingState? #123

virtualzone opened this issue Mar 2, 2024 · 10 comments

Comments

@virtualzone
Copy link

Hi there,

I'm trying to retrieve the ChargingState from the telemetry data. I assumed this was returned in the ChargeState.

I assumed that ChargeState had type charging_value, so I could check i.e. for ChargeStateDisconnected (enum value 1).

However, ChargeState only returns a string_value which is Idlewhenever the vehicle is not charging.

Help is appreciated, thanks in advance!

@jbanyer
Copy link

jbanyer commented Mar 2, 2024

I'm also interested in this question. Our use case requires knowing all the different charging states.

Currently we use charge_state.charging_state in the Fleet API vehicle data.

@purcell-lab
Copy link

purcell-lab commented Mar 15, 2024

ChargeState:/ ChargeEnableRequest: seems to change when charging starts/ stops:

#127 (comment)

@peetermeos
Copy link

As far as I can see, ChargingState returns rather useless Idle/Enabled string value, the expected enum ChargingState is always default (ie. ChargingStateUnknown). So in short, it does not seem to be yet fully implemented. Emailed support about it, no response yet.

@jbanyer
Copy link

jbanyer commented Apr 11, 2024

@agbpatro are you able to comment on this? It's very important for our use case (chargehq.net). Thanks.

@agbpatro
Copy link
Collaborator

agbpatro commented Apr 11, 2024

For ChargeState , value should be stored in string

@stx
Copy link

stx commented Apr 11, 2024

@agbpatro Developers want to know how to access the ChargingState values like Disconnected, Charging, Complete, listed here:

enum ChargingState {

ChargeState does not provide this (it provides "Idle" or "Enable") and it appears there is no way to retrieve this field. This is a very important field for virtually all third party apps. Is there a way to get the ChargingState?

@agbpatro
Copy link
Collaborator

I see yeah. That is not supported yet. Will update the thread here once its available

@stx
Copy link

stx commented Apr 11, 2024

@agbpatro Thanks for the update! FYI this is a major blocker for all consumer and charging apps in moving to fleet telemetry from data requests. That field is needed to know what the car is doing and to know when to issue start/stop charging commands.

@jbanyer
Copy link

jbanyer commented Apr 11, 2024

@agbpatro thanks, just reiterating @stx's comment that this issue is preventing us from moving to fleet telemetry. I did email fleetapisupport@tesla.com about it on 18th March but haven't had a reply. Cheers.

@Bre77
Copy link

Bre77 commented Apr 14, 2024

@jbanyer FYI we have observed three states from Streaming that map to polled values:

"Idle": "stopped", #streaming
"QualifyLineConfig": "starting", #streaming
"Enable": "charging", #streaming

https://github.com/Teslemetry/hass-teslemetry/blob/eb3e886e8222010d2e131c5092e5dd94f0444a18/custom_components/teslemetry/sensor.py#L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants