Add Script for Command Line Use


Recommended Posts

I am trying to add a script that can be called from the command line but not sure where I should add this script file.  I understand there is a user scripts plugin and I have used this and it is great however I am trying to run a script from Home Assistant through a command line and I don't think this plugin would work with that. Where should I add my script to make this work?

Edited by mgranger
Link to comment
24 minutes ago, Squid said:

it should.  Script would be something like docker exec HomeAssistant /config/NameOfScript.sh

Yes that would work if you needed to run it yourself. I was thinking more in terms of letting HomeAssistant run it as needed. 

 

I briefly looked at HomeAssistant since I have some home automation, but my needs are so simple I figured that would be a project for another day.:D

Link to comment

Ok so here is what I am trying to do even though I am sure it is unecessary.  I am trying to monitor how many days are left on my let's encrypt cert.  So I came across this forum but it requires a script that someone wrote.

 

https://community.home-assistant.io/t/sensor-to-show-expiry-date-of-ssl-certificate/13479

 

So I am kind of unsure where to put this script file to get it to run from home-assistant.  

 

@trurl  I would suggest trying home-assistant sometime.  I started with the basic stuff but have branched out over about a year and half of using it.  

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.