Commit Graph

16 Commits (5626cc45245f0387fd0ba4c9756202a6166d3f55)

Author SHA1 Message Date
epenet 001a452bb7
Update naming scheme for Renault entities (#57922)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 19:46:02 +02: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 0d842a8f01
Adjust charging_power unit (#56167) 2021-09-15 07:54:56 +02:00
epenet 0749e045bb
Add reauth to Renault config flow (#55547)
* Add reauth flow to async_setup_entry

* Add reauth flow to config_flow

* Add reauth tests

* Split reauth/reauth_confirm

* unindent code

* Add entry_id and unique_id to reauth flow testing

* Use description_placeholders for username

* fix typo
2021-09-04 02:17:24 +02:00
epenet f8ec85686a
Add select platform to Renault integration (#55494)
* Add select platform to Renault integration

* Fix pylint
2021-09-01 14:44:10 +02:00
epenet bcf97cb308
Add device tracker platform to Renault integration (#54745) 2021-09-01 13:10:48 +02:00
epenet 02b7356596
Add services to Renault integration (#54820)
* Add services

* Add tests

* Cleanup async

* Fix pylint

* Update services.yaml

* Add extra schema validation

* Rename constants

* Simplify code

* Move constants

* Fix pylint

* Cleanup constants

* Drop charge_set_mode as moved to select platform

* Only register the services if no config entry has registered them yet

* Replace VIN with device selector to select vehicle

* Update logging

* Adjust type checking

* Use a shared base SERVICE_VEHICLE_SCHEMA

* Add selectors for ac_start (temperature/when)

* Add object selector for charge_set_schedules service
2021-09-01 11:23:54 +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 faec82ae8f
Add binary sensor platform to Renault integration (#54750)
* Add binary sensor platform

* Add tests

* Simplify code

* Adjust descriptions

* Adjust tests

* Make "fuel" tests more explicit

* Updates for device registry checks
2021-08-19 09:27:43 +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