Commit Graph

29 Commits

Author SHA1 Message Date
epenet
2a25dcd44e Bump renault-api to 0.3.1 (#144366)
* Bump renault-api to 0.3.1

* Adjust tests
2025-05-07 09:44:55 +03:00
epenet
42d22bb1a3 Use unique registration number in renault tests (#143926) 2025-04-30 10:05:00 +02:00
epenet
dc02c37413 Use snapshot_platform in renault tests (#143864)
* Use snapshot_platform in renault tests

* More

* tweak

* Improve
2025-04-30 08:08:24 +02:00
epenet
f71903a563 Simplify device registry checks in renault tests (#143863) 2025-04-29 19:03:14 +02:00
epenet
1075ea1220 Bump renault-api to 0.3.0 (#143657) 2025-04-25 16:52:23 +02:00
tmenguy
c422bcf1e2 Make renault scan interval dynamic (#142964)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2025-04-19 09:51:41 +02:00
tmenguy
da9b3dc68b Better throttling handling for the Renault API (#141667)
* Added some better throttling handling for the Renault API, it fixes #106777 HA ticket

* Added some better throttling handling for the Renault API, it fixes #106777 HA ticket, test fixing

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/renault_hub.py

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

* bigger testsuite for  #106777 HA ticket

* bigger testsuite for  #106777 HA ticket

* bigger testsuite for  #106777 HA ticket

* bigger testsuite for  #106777 HA ticket

* Adjust tests

* Update homeassistant/components/renault/coordinator.py

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

* Update homeassistant/components/renault/renault_hub.py

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

* Update homeassistant/components/renault/renault_hub.py

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

* Update tests/components/renault/test_sensor.py

* Update tests/components/renault/test_sensor.py

* Update tests/components/renault/test_sensor.py

* requested changes  #106777 HA ticket

* Use unkown

* Fix test

* Fix test again

* Reduce and fix

* Use assumed_state

* requested changes  #106777 HA ticket

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2025-04-01 17:14:21 +02:00
epenet
3155c1cd4f Add tests for renault QuotaLimitException (#141985) 2025-04-01 11:01:13 +02:00
Marc Mueller
f11b316dac Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +02:00
Marc Mueller
837ee7c4fb Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
Sid
fe9cc6705c Add ruff rule PIE804 (#113620)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
Marc Mueller
7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
epenet
7c72b97d79 Use SnapshotAssertion in Renault tests (part 2) (#92395) 2023-05-24 09:39:37 +02:00
epenet
b969790e95 Use SnapshotAssertion in Renault tests (#90778) 2023-04-30 18:55:31 +02:00
epenet
73d0124c98 Use entity name translations in Renault (#90697) 2023-04-03 18:20:11 +02:00
Franck Nijhof
330e1c6cbb Clean up unnecessary registry mocks from integration tests (#87763) 2023-02-09 10:43:45 +01:00
epenet
6af07aa348 Improve renault tests (#85065) 2023-01-03 17:32:10 +01:00
Ville Skyttä
5bf67cac66 Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
epenet
75ec937359 Use new Platform enum in Renault (#60903)
* Use Platform enum in Renault

* Use Platform enum in Renault tests

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 09:28:04 -08:00
epenet
29c95a0b34 Use constants in renault tests (#58406)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-25 09:42:01 -04:00
epenet
a421c524c1 Use pytest fixtures on Renault tests (#57955)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-18 13:27:44 +02:00
epenet
6881ab58d1 Add renault last activity sensors (#57750)
* Add battery and location last_activity sensors

* Drop state attributes

* Drop ATTR_LAST_UPDATE

* Adjust tests

* Mark new sensors as disabled_default

* Add default_disabled attribute

* Add context managers

* Adjust tests for disabled entities
2021-10-15 16:27:12 +02:00
Paulus Schoutsen
a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
epenet
9ba504cd78 Address late review for Renault integration (#55230)
* Add type hints

* Fix isort

* tweaks to state attributes

* Move lambdas to regular functions

* Split CHECK_ATTRIBUTES into DYNAMIC_ATTRIBUTES and FIXED_ATTRIBUTES

* Clarify tests

* Fix typo
2021-08-27 07:22:23 +02:00
epenet
9315f3bdd9 Use EntityDescription - renault (#55061)
* Cleanup sensor.py

* Add EntityDescription

* Add checks for state attributes

* Fix pylint

* Simplify checks

* Add icon checks

* Update data type

* Use mixin for required keys, and review class initialisation

* Add constraint to TypeVar("T")

* Enable lambda for icon handling

* Enable lambda for value handling

* Enable lambda for value handling
2021-08-25 23:15:49 +02:00
epenet
16cb50bddf Ensure device entry in Renault integration (#54797)
* Ensure device registry is set even when there are no entities

* Fix isort

* Use async_get for accessing registry
2021-08-18 12:44:35 +02:00
epenet
a204d7f807 Renault code quality improvements (#53680) 2021-08-16 13:49:04 +02:00
epenet
75275254f9 Renault test optimisation (#53705)
* Cleanup tests

* Use a MockConfigEntry

* Don't set up the integration for duplicate config entry testing
2021-08-16 12:52:58 +02:00
epenet
8d84edd3b7 Add renault integration (#39605) 2021-07-28 12:41:11 -07:00