Commit graph

12 commits

Author SHA1 Message Date
Joost Lekkerkerker
dd69ba3136
Migrate Cert Expiry to has entity name ()
* Migrate Cert Expiry to has entity name

* Migrate Cert Expiry to has entity name

* Fix entity name
2023-08-17 18:29:20 +02:00
epenet
fa7acb4f0d
Add type hints to integration tests (part 3) () 2023-02-10 16:05:01 +01:00
epenet
807c69f621
Add type hints to integration tests (b-c) () 2023-02-08 18:08:43 +01:00
jjlawren
f31b9eae61
Fix creating cert_expiry configs during runtime ()
* Fix creating cert_expiry configs during runtime

* Address review feedback on tests

* Improve delayed startup test
2021-09-18 19:54:54 +02:00
jjlawren
0438c9308c
Delay startup for cert_expiry to allow for self checks ()
* Delay startup of cert_expiry

* Update tests
2021-09-16 13:31:36 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum ()
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered ()
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Simone Chemelli
7bcd92172a
Remove relative time sensor from cert_expiry () 2020-11-13 13:15:37 +01:00
jjlawren
e92e26b73a
Add expiration timestamp to cert_expiry sensors ()
* Add expiration timestamp to cert_expiry sensors

* Clear timestamp if cert becomes invalid

* Use timezone-aware timestamps

* Use DataUpdateCoordinator, split timestamp to separate sensor

* Use UTC, simpler add/remove handling

* Review fixes

* Fix incomplete mock that fails in 3.8

* Use static timestamps, improve helper method name
2020-06-18 18:29:46 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
jjlawren
df3f7687d4
Refactor Certificate Expiry Sensor ()
* Cert Expiry refactor

* Unused parameter

* Reduce delay

* Deprecate 'name' config

* Use config entry unique_id

* Fix logic bugs found with tests

* Rewrite tests to use config flow core interfaces, validate created sensors

* Update strings

* Minor consistency fix

* Review fixes, complete test coverage

* Move error handling to helper

* Subclass exceptions

* Better tests

* Use first object reference

* Fix docstring
2020-03-02 07:44:24 -06:00