* Use an eager task in the update coordinator scheduled refresh
We have a lot of places that will not suspend because the refresh function
decides it does not need to update. Currently these have to be scheduled
on the event loop even though they are a noop.
Since _handle_refresh_interval is subclassed in some integrations, I created
a dunder wrapper function to avoid integraions subclassing it
* fix time fires outside of patch
* Remove not assigned vehicles from DeviceRegistry on startup
* Replace async_remove_device with async_update_device
* Add test
* Use generator
---------
Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Allow one retry before raising ConfigEntryAuthFailed
* Move time with freezer
* Update homeassistant/components/bmw_connected_drive/coordinator.py
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add select for EV charging to bmw_connected_drive
* Use snapshot for select tests, split select_option tests
* Apply suggestions from code review
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Further adjustments from code review
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Bump PyJWT to 2.6.0
* fix time being frozen too late which makes the access token creation time in the future
* revert zha change
* fix repairs test
* fix ical test
* Add diagnostics to bmw_connected_drive
* Add tests for diagnostics
* Move get_fingerprints to library, bump bimmer_connected to 0.10.4
* Update bimmer_connected to 0.11.0
* Fix pytest
* Mock actual diagnostics HTTP calls
* Update tests for bimmer_connected 0.12.0
* Don't raise errors if vehicle is not found
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
* Fix displayed units
* Add tests for unit conversion
* Streamline test config entry init
* Refactor test to pytest fixture
* Fix renamed mock
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
* Add Config Flow to bmw_connected_drive
* Fix checks for bmw_connected_drive
* Adjust code as requested
* Clean .coveragerc after merge
* Use references for config flow
* Fix execute_service check against allowed accounts
* Adjust translation as username can be email or phone no
* Add BMWConnectedDriveBaseEntity mixin, remove unnecessary type casts
* Use BaseEntity correctly, fix pylint error
* Bump bimmer_connected to 0.7.13
* Adjustments for review
* Fix pylint
* Fix loading notify, move vin to entity attrs
* Remove vin from device registry
* Remove commented-out code
* Show tracker warning only if vehicle (currently) doesn't support location
* Remove unnecessary return values & other small adjustments
* Move original hass_config to own domain in hass.data
* Move entries to separate dict in hass.data
* Remove invalid_auth exception handling & test as it cannot happen
Co-authored-by: rikroe <rikroe@users.noreply.github.com>