https://github.com/jumper047/mycroft-scripting-skill
This skill allows you to write simple scripts and activate them with custom intents. For example, if you want to interact with home assistant but don’t like boring “switch on”, you cant write script triggering with “illuminate bedroom”, which inside mycroft will be translated to “switch on light in bedroom”, so you should not tinkering with home assistant’s plugins source codes to change activation phrases. Ofcourse scripts can be more complicated, you can execute multiple commands by one trigger etc - plugin’s readme contains few examples. Plugin is on early stage, and source code is a mess, but at least basic functions works fine. I’ll be glad if you share your usage scenarios/ideas/etc!
Installation
Just do msm install https://github.com/jumper047/mycroft-scripting-skill.git
. No additional libreries required.
Usage
For now the only way to edit scripts is the config file located at ~/.mycroft/skills/ScriptingSkill/scripts.yaml
Open it, edit, save and say “Reload scripts”. That’s all.
There is the config file’s structure:
skill name:
- intent string
- actions string
another name:
- intent string
- action string
Scripts examples
Quick and drity replacement for flip coin skill:
flip a coin:
- (please|) flip a coin
- one_of(say tails|say heads)
Night light automation
night light:
- (switch|turn) on {switch} temporarliy; turn on
- switch on {switch} && sleep(50) && switch off {switch}