added settings config

This commit is contained in:
Rudis Muiznieks 2022-02-08 14:10:12 -06:00
parent 4a0283c870
commit bb81a938e6
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 21 additions and 0 deletions

View File

@ -5,7 +5,15 @@ class RunScriptSkill(MycroftSkill):
super().__init__() super().__init__()
def initialize(self): def initialize(self):
self.settings_change_callback = self.on_settings_changed
self.on_settings_changed()
def on_settings_changed(self):
script_dir = self.settings.get('script_dir') script_dir = self.settings.get('script_dir')
self.read_scripts_dir(script_dir)
def read_script_dir(self, script_dir):
pass
@intent_handler('RunScript.intent') @intent_handler('RunScript.intent')
def handle_run_script_intent(self, msg=None): def handle_run_script_intent(self, msg=None):

13
settingsmeta.json Normal file
View File

@ -0,0 +1,13 @@
{
"skillMetadata": {
"sections": [{
"name": "Scripts Location",
"fields": [{
"name": "script_dir",
"type": "text",
"label": "Directory containing scripts",
"value": "/home/pi/scripts"
}]
}]
}
}