-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Sync car state from Teslamate MQTT
Since Teslamate doesn't map directly to TeslaCar from teslajsonpy, we need to have special handling of both 'plugged_in' and 'state' when they come from Teslamate. When we receive a new 'plugged_in'-value, we check the `car.state` to determine the new 'charging_state' in teslajsonpy, and similarly we need to check the `car.charging_state` when Teslamate sends a new car-state. Also refactor the MQTT-code slightly to avoid multiple implementations of the code that updates the TeslaCar-object.
- Loading branch information
Showing
1 changed file
with
79 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters