Jump to content

Add Script for Command Line Use


mgranger

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?

Link to comment

Assuming you are running Home Assistant as a docker, if you put it in the appdata for the docker then the application will be able to get to it wherever it has appdata mapped.

 

I don't know any details about how to make Home Assistant use the script.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...