-
Notifications
You must be signed in to change notification settings - Fork 101
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
Powerwall operation mode does not update from the cloud following HA restart #618
Comments
Transferring this comment from #619 for reference: |
Additionally, changes made to the setting in the official phone Tesla app do not propagate down to this custom_component. |
@alandtse , I see the response in the debug logs does not return an operationhow does one use the HA service 'Tesla Custom Integration: api' ?
Some of the ID is redacted above. |
Looking at the code in `services.yaml', I found the following:
However, the But the above still produces the same error |
TLDR: I think the teslajsonpy code needs to change the API call from BATTERY_DATA to SITE_CONFIG to retrieve this data. I'd appreciate comments from people with more background on this than me. Using debug logs I found that the data is being retrieved by API calls to BATTERY_SUMMARY and BATTERY_DATA, neither of which contain the operation mode. It seems this is defined in teslajsonpy in energy.py on lines 175-178
It expects the operation mode to exist at the top level in battery_data, but it is not there, it is actually in the API call SITE_CONFIG under the property "default_real_mode" (not "operation"). This may have been an API change by Tesla (would be strange) or teslajsonpy using a deprecated API. I determined this by using Developer Tools > Services with a call to service
I tested the
|
I’ve opened a fork to start a PR, but first need to test. Does anyone have any pointers on how to get changed teslajsonpy code into HA for testing a change with tesla_custom? |
Version of the custom_component
3.12.2
Configuration
From core.config_entries
Describe the bug
Following HA restart the OperationMode sensor is always empty 'unknown' and does not update from the cloud, even after many hours (tested up to 11 hours).
Debug log
Debug log attached below but the following may be relevant.
home-assistant_tesla_custom_2023-05-29T06-46-22.585Z.log
The text was updated successfully, but these errors were encountered: