Commit Graph

77 Commits (4e94ce0cc7f76cb3c0eec2c68819b199878127fb)

Author SHA1 Message Date
epenet 075550b7ba
Use HOMEASSISTANT_DOMAIN alias for core DOMAIN in tests (#122762) 2024-07-29 12:51:12 +02:00
Richard Kroegel 745eea9a29
Bump bimmer_connected to 0.16.1 (#122699)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-07-29 12:02:47 +02:00
Richard Kroegel 99f01ac61e
Fix BMW remaining fuel device class (#119172)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-07-15 09:23:05 +02:00
Richard Kroegel 131d9ec51b
Add BMW tire pressure sensors (#120949) 2024-07-06 18:20:01 +02:00
Richard Kroegel 48145c1a7d
Refactor BMW sensors and migrate unique_ids (#121380) 2024-07-06 17:34:20 +02:00
Richard Kroegel f29094f41d
Refactor BMW send_message and add tests (#119170)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-07-06 11:00:00 +02:00
Richard Kroegel 324755b8f5
Separate BMW base entity into separate file (#120830)
* Refactor BMW base entity

* Update snapshots

* Changes from review
2024-07-05 16:08:27 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
Richard Kroegel d15d001cfc
Use runtime_data for BMW (#120837) 2024-06-30 14:51:39 +02:00
Jan Bouwhuis 8839a71adc
Prevent changes to mutable bmw_connected_drive fixture data (#120600) 2024-06-26 20:57:27 +02:00
Richard Kroegel d5bcfe9822
Improve BMW tests (#119171)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-26 12:27:55 +02:00
epenet b8e57f6174
Use relative imports in tests [a-i] (#119280) 2024-06-10 12:52:34 +02:00
Richard Kroegel 43343ea44a
Adjust BMW enum sensors translations (#118754)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-08 17:08:37 +02:00
Richard Kroegel b04a65f4d1
Change BMW select and sensor enums to lowercase (#118751)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-08 16:25:45 +02:00
epenet 4f6a98cee3
Remove unused request fixtures (#119044) 2024-06-07 09:19:03 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Richard Kroegel 1eb13b48a2
Add tests for BMW binary_sensor and lock (#118436)
* BMW: Add tests for binary_sensor & lock

* Use entity_registry_enabled_by_default fixture

* Update tests/components/bmw_connected_drive/test_binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Move fixtures to decorator

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use fixture decorators if possible

* Fix rebase

* Spelling adjustments

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use snapshot_platform helper

* Spelling

* Remove comment

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-04 15:08:15 +02:00
Richard Kroegel 7fb2802910
Allow per-sensor unit conversion on BMW sensors (#110272)
* 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>
2024-06-04 09:06:23 +02:00
Richard Kroegel 60bcd27a47
Use snapshot_platform helper for BMW tests (#118735)
* Use snapshot_platform helper

* Remove comments

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 19:46:04 +02:00
Richard Kroegel ef7c7f1c05
Refactor fixture calling for BMW tests (#118708)
* Refactor BMW tests to use pytest.mark.usefixtures

* Fix freeze_time

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 13:16:12 +02:00
Richard Kroegel 10291b1ce8
Bump bimmer_connected to 0.15.3 (#118179)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-05-27 11:01:22 +02:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
Richard Kroegel 13e2bc7b6f
Enable raising ConfigEntryAuthFailed on BMW coordinator init (#116643)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-05-14 21:14:35 +02:00
Richard Kroegel 0d0865e783
Bump bimmer_connected to 0.15.2 (#116424)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-04-30 22:49:28 +02:00
brave0d a99ecb024e
New BMW sensor for climate activity (#110287)
* 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>
2024-04-16 09:24:32 +02:00
Sid 3efee10b95
Enable Ruff RUF013 (#115333) 2024-04-10 08:55:59 +02:00
Richard Kroegel 16fc935c87
Refactor BMW entity availability (#110294)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-04-08 09:26:50 +02:00
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
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>
2024-03-26 00:02:16 +01:00
Erik Montnemery 426f73b1f4
Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
Thomas55555 66aa2c038a
Freeze timezone in bmw_connected_drive tests (#113533)
Freeze timezone in bmw_connected_drive
2024-03-15 18:22:17 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Joost Lekkerkerker a8887d59ed
Add icon translations to BMW (#111348)
* Add icon translations to BMW

* Add icon translations to BMW
2024-02-28 13:05:27 +01:00
J. Nick Koston d5e1934942
Use an eager task in the update coordinator scheduled refresh (#111570)
* 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
2024-02-26 23:31:08 -05:00
Richard Kroegel 1b8bda6067
Remove old BMW vehicles/devices automatically (#110255)
* 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>
2024-02-12 10:52:08 +01:00
Jan Bouwhuis c7eab49c70
Raise ServiceValidationError on invalid select option (#106350)
* Raise ServiceValidationError on invalid select option

* Fix tests

* Correct place holders

* More test fixes
2023-12-27 09:45:55 +01:00
Richard Kroegel 2287c45afc
Bump bimmer-connected to 0.14.5 (#104715)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-11-29 18:11:04 +01:00
Jan-Philipp Benecke 9ab1cb83d8
Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00
Richard Kroegel f61627ea08
Bump bimmer_connected to 0.14.1 (#101789)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-10-11 13:46:02 +02:00
Richard Kroegel bec36d3914
Add long-term statistics to BMW sensors (#99506)
* Add long-term statistics to BMW ConnectedDrive sensors

* Add sensor test snapshot

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-09-02 14:44:28 -07:00
Richard Kroegel 021b14fc17
Refactor & enhance BMW tests (#97895)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-08-30 11:45:09 +02:00
Richard Kroegel b403cb41c0
Allow one retry before raising ConfigEntryAuthFailed for bmw_connected_drive (#99168)
* 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>
2023-08-29 21:41:50 +02:00
Richard Kroegel 74d02a1574
BMW: Remove deprecated refresh from cloud button (#97864)
* Remove deprecated refresh from cloud button

* Clean up strings.json
2023-08-05 22:28:24 +02:00
Richard Kroegel f1a54a510c
Re-add "deactivate air conditioning" button to bmw_connected_drive (#94765) 2023-06-27 19:55:46 +02:00
Richard Kroegel 410b15df92
Improve exception handling for BMW remote services (#92199)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-06-26 19:05:50 +02:00
rikroe 1ea202a5bc
Add charging switch to BMW Connected Drive (#93737)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:48:13 +02:00
rikroe 52ef4a3b75
Ensure state update after BMW remote service execution (#93745)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:28:06 +02:00
rikroe f8f83906f8
Add climate on/off for supported BMW vehicles (#92962)
* Add switch platform

* Add tests

* Remove separate button

* Bump coverage

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-23 15:21:29 +02:00