Closed carleeno closed 1 year ago
Please note that we still need a verb after the fix:
. I know it's weird, but it's consistent with other stuff like feat:
Please note that we still need a verb after the
fix:
. I know it's weird, but it's consistent with other stuff likefeat:
ahh thanks, that makes sense
This should fix a couple of related issues:
If
get_vehicle_data
failed for a TeslaException that wasn't a 408, it would try to return an unassigned variable. Now it will re-raise that "unexpected" exception to let the caller handle it.Additionally the calls for
get_vehicle_data
ingenerate_car_objects
did not handle a vehicle being offline gracefully, and would fail the entire integration setup. The same was forgenerate_energysite_objects
for a very similar reason.Now if the vehicle/site data is unavailable during setup, the device will still be added with the data dict empty. Each of the car/site classes are designed to handle an empty data dictionary, so this should be fine. From what I can tell, it's not really possible to NOT add a device that's in the vehicle list or site list without refactoring a lot of controller.py.
All of these cases are logged as warnings, as they don't break anything, but would be unusual/unexpected.