Commit graph

29 commits

Author SHA1 Message Date
J. Nick Koston c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
J. Nick Koston 24ee64e20c
Convert cert_expiry to use asyncio (#106919) 2024-01-05 08:03:53 -10:00
Jan-Philipp Benecke 8a4b761c78
Use freezegun in cert_expiry tests (#105125) 2023-12-07 21:55:37 +01:00
Jan-Philipp Benecke 024db6dadf
Move cert_expiry coordinator to its own file (#100472)
* Move cert_expiry coordinator to its own file

* Add missing patched config flow test
2023-09-16 11:19:05 +02:00
Joost Lekkerkerker dd69ba3136
Migrate Cert Expiry to has entity name (#98160)
* 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
Ville Skyttä ced67e5800
Import util.dt as dt_util in components/[a-d]* (#93756) 2023-05-30 00:02:06 +03:00
epenet 5cc9e7fedd
Add missing mock in cert_expiry config flow tests (#88835) 2023-02-27 14:01:53 +01:00
epenet fa7acb4f0d
Add type hints to integration tests (part 3) (#87844) 2023-02-10 16:05:01 +01:00
epenet 807c69f621
Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
jjlawren f31b9eae61
Fix creating cert_expiry configs during runtime (#56298)
* 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 (#56266)
* 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 (#49654)
* 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
Ville Skyttä 153d6e891e
Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
Paulus Schoutsen 9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* 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 (#44746) 2021-01-01 22:31:56 +01:00
Simone Chemelli 7bcd92172a
Remove relative time sensor from cert_expiry (#42338) 2020-11-13 13:15:37 +01:00
J. Nick Koston 89a9634d35
Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-29 09:39:24 -07:00
jjlawren 3d1a5f76b2
Fix cert_expiry time-based tests v2 (#36934) 2020-06-19 16:19:43 +02:00
jjlawren 6bffd9a892
Fix cert_expiry time-based tests (#36924) 2020-06-19 00:26:34 +02:00
jjlawren e92e26b73a
Add expiration timestamp to cert_expiry sensors (#36399)
* 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 (#34901) 2020-04-30 13:29:50 -07:00
jjlawren df3f7687d4
Refactor Certificate Expiry Sensor (#32066)
* 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
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Bas Nijholt cce3077df3 Sort imports according to PEP8 for cert_expiry (#29705) 2019-12-08 23:32:50 +01:00
jjlawren 44bf9e9ddc Additional SSL validation checks for cert_expiry (#28047)
* Additional SSL validation checks

* Add validity attribute, log errors on import

* Don't log from sensor
2019-10-22 23:34:12 -07:00
Quentame ac467d0b3f Not slugify cert_expiry name (#28055) 2019-10-21 14:30:49 +02:00
Maikel Punie 9114ed36cd Fix cert expiry config flow check and update (#26638)
* Fix typo in translations

* Work on bug #26619

* readd the homeassistant.start event

* Remove the callback

* Added the executor_job for _test_connection

* Update test_config_flow.py
2019-09-17 13:39:46 -07:00
Maikel Punie 33bd9c83fb Enable cert_expiry config entries (#25624)
* Enable cert_expiry config entries

* add black

* lint fixes

* Rerun black

* Black on json files is a bad idea

* Work on comments

* Forgot the lint

* More comment work

* Correctly set defaults

* More comments

* Add codeowner

* Fix black

* More comments implemented

* Removed the catch

* Add helper.py from cert_expiry to .coveragerc
2019-08-28 19:35:09 +02:00