* Update BMW sensors to use device_class
* Test adjustments
* Trigger CI
* Remove unneeded cast
* Set suggested_display_precision to 0
* Rebase for climate_status
* Change charging_status to ENUM device class
* Add test for Enum translations
* Pin Enum sensor values
* Use snapshot_platform helper
* Remove translation tests
* Formatting
* Remove comment
* Use const.STATE_UNKOWN
* Fix typo
* Update strings
* Loop through Enum sensors
* Revert enum sensor changes
---------
Co-authored-by: Richard <rikroe@users.noreply.github.com>
* add sensor with climate activity status
* Update strings.json
* use icon translation and is_available for sensor
* use enum with translations
* Return None if value is UNKNOWN
* fix getting the value: x.value
* fix getting the value: x instead of x.value
* Fix tests and pre-commit
---------
Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* 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>