Commit Graph

90 Commits (fe5cd5c55c89f5a4b1d56a7b4a59743907b10983)

Author SHA1 Message Date
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Josef Zweck c56eee3639
Fix bmw_connected_drive tests (#135911) 2025-01-18 11:10:52 +01:00
Richard Kroegel 514b74096a
Improve BMW test quality (#133704) 2025-01-17 09:58:46 +01:00
Richard Kroegel 8bbbbb00d5
Limit unique_id migration to platform for BMW (#131582) 2024-12-17 20:43:09 +01:00
Richard Kroegel 8953ac1357
Improve BMW translations (#133236) 2024-12-15 12:16:10 +01:00
Richard Kroegel 772b047d44
Change BMW reauth/reconfigure to only allow password (#132767)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-12-09 23:00:38 +01:00
Richard Kroegel 535b47789f
Improve BMWDataUpdateCoordinator typing (#132087)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-12-04 00:33:45 +01:00
Richard Kroegel 6dd93253c6
Add captcha to BMW ConfigFlow (#131351)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-11-28 21:01:00 +01:00
Richard Kroegel 8abbc4abbc
Bump bimmer_connected to 0.16.4 (#129838) 2024-11-05 14:13:48 +01:00
Josef Zweck eb45b89557
Remove battery device class from bmw secondary sensor (#128970)
Remove battery device class
2024-10-23 11:19:22 +02:00
Richard Kroegel 54c4fb5f56
BMW: Add reconfiguration flow (#127726)
* BMW: Add reconfiguration flow

* Implement requested changes

--------

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

* Abort if unique_id changes, small adjustments

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-08 07:42:10 +02:00
epenet bdd3aa8e39
Use start_reauth helper method in config flow tests (a-d) (#124780)
* Use start_reauth helper method in integration tests (a-d)

* Revert broadlink

* Revert bthome
2024-08-28 15:48:36 +02:00
Richard Kroegel 2fe19c04b9
Bump bimmer_connected to 0.16.2 (#124651) 2024-08-26 13:57:25 -10:00
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