Commit Graph

211 Commits (25d092c8eb1c4fe115ccf55f7fa3adcba4631d01)

Author SHA1 Message Date
epenet 7ba5038509
Remove YAML support from cert_expiry (#132350)
* Deprecate yaml import in cert_expiry

* Simplify

* Do full cleanup

* Cleanup more
2024-12-09 20:15:46 +01:00
epenet b1379f6a89
Avoid access to `self.context["source"]` in integration config flows (#132355)
* Avoid access to `self.context["source"]` in integration config flows

* One more

* One more
2024-12-05 21:20:02 +01:00
epenet bed3fcfd43
Move cert_expiry base entity to separate module (#126478) 2024-09-23 08:47:23 +02:00
epenet 1f3c99dff3
Standardize import step variable name in cert_expiry (#124696) 2024-08-28 09:51:25 +02:00
epenet c49fce5541
Force alias when importing sensor PLATFORM_SCHEMA (#120536) 2024-06-26 12:14:13 +02:00
J. Nick Koston dbd3147c9b
Remove `async_late_forward_entry_setups` and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
J. Nick Koston ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Marc Mueller 44049c34f9
Use PEP 695 type alias for ConfigEntry types (#117632) 2024-05-17 15:42:58 +02:00
Michael e66581e3a2
Store runtime data inside the config entry in Certificate Expiry (#116819)
replace optional timeout by sane default
2024-05-05 01:33:24 +02:00
Sid 6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
J. Nick Koston 4fb127e5af
Avoid creating another ssl context in cert_expiry (#113467)
Creating an ssl context does blocking I/O as it has to
read the certs from disk
2024-03-14 19:58:11 -04:00
Marc Mueller 2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Erik Montnemery 6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Joost Lekkerkerker 18fcb14c1b
Add icon translations to Cert expiry (#111354) 2024-02-25 14:04:48 +01:00
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Marc Mueller 7023ac7366
Enable strict typing for cert_expiry (#107860) 2024-01-12 12:32:17 +01:00
J. Nick Koston 24ee64e20c
Convert cert_expiry to use asyncio (#106919) 2024-01-05 08:03:53 -10: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
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Joost Lekkerkerker e9f9c7799a
Add device to cert expiry (#98152)
* Add device to cert expiry

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-10 13:05:58 +02:00
J. Nick Koston e1f14ed990
Disable always_update in cert_expiry coordinator (#97417) 2023-07-28 12:41:25 -05:00
Maikel Punie b4a46b9817
Codeowner update for cert-expiry (#97246) 2023-07-26 09:07:47 +02:00
J. Nick Koston ea160c2bad
Fix reload in cert_expiry (#95867) 2023-07-04 12:13:52 -05:00
J. Nick Koston aa71c8e8f0
Reduce I/O from cert_expiry (#94399) 2023-06-10 12:53:09 -05:00
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action 3f992ed31d [ci skip] Translation update 2023-02-04 00:23:44 +00:00
epenet 810367b757
Fix `can not` typo (#87254) 2023-02-03 11:37:16 +01:00
Franck Nijhof a79885ceaf
Enable Ruff SIM117 (#86783) 2023-01-27 11:52:49 +01:00
Marc Mueller 6397138589
Update Optional typing (1) [Py310] (#86417)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-23 09:56:10 +01:00
Marc Mueller 2512eb1e4c
Improve DataUpdateCoordinator typing in integrations (5) (#84740) 2022-12-28 23:44:41 +01:00
GitHub Action f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action f3b3193f7a [ci skip] Translation update 2022-11-25 00:24:19 +00:00
GitHub Action fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
GitHub Action bec8e544f4 [ci skip] Translation update 2022-08-14 00:25:47 +00:00
GitHub Action 81e3ef03f7 [ci skip] Translation update 2022-08-02 00:27:42 +00:00
Aidan Timson 1204b4f700
Add typings to Certificate Expiry integration (#75945) 2022-07-31 13:26:16 +02:00
J. Nick Koston cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
GitHub Action b6b72f50ec [ci skip] Translation update 2022-05-22 00:22:43 +00:00
GitHub Action 102ae9f0e3 [ci skip] Translation update 2022-02-22 00:17:23 +00:00
GitHub Action c4cc6ca0ba [ci skip] Translation update 2022-02-20 00:20:09 +00:00
GitHub Action 208671418e [ci skip] Translation update 2022-02-16 00:14:09 +00:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
GitHub Action 77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
GitHub Action e591393f01 [ci skip] Translation update 2022-01-28 00:14:53 +00:00