Certificate Expiry - Add attribute providing seconds until certificate expires #445
Replies: 2 comments 1 reply
-
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
-
Another workaround is to a time timestamp-offset trigger for an automation. Not clear how reliable this is if the exact trigger time is missed. Whereas a seconds attribute would enable trigger when expiry seconds is
You really want to handle it with a condition check, like below, but for some reason,
Message malformed: extra keys not allowed @ data['conditions'][0]['after_offset'] |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Integration name
Certificate Expiry
Link to integration documentation on our website
https://www.home-assistant.io/integrations/cert_expiry/
Describe the enhancement
Add an attribute with seconds until cert expiry (this would be a negative value after expiry).
This integration works well, providing the timestamp when the certificate will expire. But in many or most use case for the integration the timestamp is not what you need, rather you what to know how long until the certificate expires. E.g. certificate will expire in 7 days.
Currently there is only the "Is valid" attribute, but it only changes when the certificate has already expired. You want to know e.g. 7 days before expiry.
Use cases
This would allow automation to decide whether to run the Let's Encrypt Add On to renew a certificate.
This would allow you to send notification e.g. 3 days before a certificate expires.
Anything else?
A current workaround is to create a template sensor that converts the expire timestamp to seconds until expiry. This is fine, but this use case is so common, that I think this values should be built into the integration.
https://community.home-assistant.io/t/hass-io-letsencrypt-renewal-and-reboot/295966/5
Beta Was this translation helpful? Give feedback.
All reactions