added settings config
This commit is contained in:
parent
4a0283c870
commit
bb81a938e6
2 changed files with 21 additions and 0 deletions
|
@ -5,7 +5,15 @@ class RunScriptSkill(MycroftSkill):
|
|||
super().__init__()
|
||||
|
||||
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')
|
||||
self.read_scripts_dir(script_dir)
|
||||
|
||||
def read_script_dir(self, script_dir):
|
||||
pass
|
||||
|
||||
@intent_handler('RunScript.intent')
|
||||
def handle_run_script_intent(self, msg=None):
|
||||
|
|
13
settingsmeta.json
Normal file
13
settingsmeta.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"skillMetadata": {
|
||||
"sections": [{
|
||||
"name": "Scripts Location",
|
||||
"fields": [{
|
||||
"name": "script_dir",
|
||||
"type": "text",
|
||||
"label": "Directory containing scripts",
|
||||
"value": "/home/pi/scripts"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue