Commit graph

12 commits

Author SHA1 Message Date
Ville Skyttä
5bf67cac66
Use RegistryEntryDisabler () 2021-12-15 23:25:40 +02:00
epenet
75ec937359
Use new Platform enum in Renault ()
* 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 ()
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 ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-18 13:27:44 +02:00
epenet
6881ab58d1
Add renault last activity sensors ()
* 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 ()
* 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 ()
* 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 ()
* 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 ()
* 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 () 2021-08-16 13:49:04 +02:00
epenet
75275254f9
Renault test optimisation ()
* 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 () 2021-07-28 12:41:11 -07:00