Certificate Expiry

The cert_expiry integration fetches the certificate from a configured host and displays its expiration in a timestamp sensor.


There are 2 options in configuring the cert_expiry sensor:

  • Via the Home Assistant user interface where it will let you enter a host and port for the certificate to check.
  • Via the Home Assistant configuration.yaml file.
# Example configuration.yaml entry
  - platform: cert_expiry
    host: home-assistant.io

Configuration Variables

host string Required

The host FQDN (or IP) to retrieve certificate from.

port integer (Optional, default: 443)

The port number where the server is running.


The Certificate Expiry entities provide extra attributes to represent the state of the certificate.

Name Description
is_valid If the certificate is able to be validated: True / False.
error A human-readable error description if the certificate is considered invalid, “None” otherwise.