feat!: add support for solar systems and powerwall (#341) #353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
car.py
that contains aTeslaCar
class.energy.py
that contains energy site classes.Controller.generate_car_objects
that generatesTeslaCar
objects and stores them intoself.cars
by vin.Controller.generate_energysite_objects
that generatesSolarSite
,PowerwallSite
orSolarPowerwallSite
objects and stores them in theself.energysites
dictionary byenergysite_id
.Controller.update
to now just send a single request to thePRODUCT_LIST
endpoint (instead of bothPRODUCT_LIST
andVEHICLE_LIST
to get all products on a Tesla account. From there, create a list of carsself._vehicle_list
and energy sitesself._energysite_list
.TeslaCar
andEnergySite
when instantiated.include_vehicles
andinclude_energysites
arguments toController.connect
which default to True. This provides the option to completely ignore vehicles or energysites.Controller.command
,Controller.get
andController.post
methods. OnlyController._wake_up
was usingpost
which now usesController.api
.closes #348
closes #334
closes #24
BREAKING CHANGE: HomeAssistant specific code has been moved out. The API is now just a communication layer
Co-authored-by: Alan D. Tse [email protected]