Countdown to date

Is there anyone that have a sensor to show countdown to a specific date?
In my case i want to know when lets encrypt expires.

Or

1 Like

Running hass.io
“apt-get install ssl-cert-check” is not possible “-bash: apt-get: command not found”

OK, use the second method.

I really dont get where to put the script

Create a folder in your .homeassistant directory called python_scripts. Create a new file in there called countdown.py and insert the contents of the file from the thread I linked to, changing the dates to whatever date you want.

Save the file, and in your configuration.yaml put a line saying python_script:.

Restart HA.

Seems like there is no .homeassistant dir

Then where are all your homeassistant configuration files?

Idk if it is any difference but i am running hassio (resinos-hassio-1.1-raspberrypi3.img)

Yes, but presumably you edit your configuration.yaml file once in a while? It must be somewhere.

Oh yes, almost daily :slight_smile:
But that i do that from “Browser-based configuration file editor for Home Assistant.”

Does that not tell you where your configuration files are?

If not, you’ll have to wait for somebody else to tell you what the directory is called and where it is, I don’t use hassio. :+1:

Does that ‘browser-based configuration file editor for Home Assistant’ allow you to place files into your config directory? If not, you’ll need to setup Samba so you can access the directory. Once you have that, it will be your network location \config. For me its hassio\config.

Turned out there is a component for it https://home-assistant.io/components/sensor.cert_expiry/ :ok_hand:

1 Like

Now able to access through samba :slight_smile:

Should it be python_script or python_scripts in configuration.yaml?

Since the directory is called python_scripts

S on the directory, no s in configuration.yaml.

Like secrets/secret.

Great i will try

How to fetch info in frontend?

Manually, by going to the services page (remote control icon in the dev panel), selecting your python script in the list and pressing ‘call service’

Or in an automation by calling the service in your action. :+1: