Hi, I am justing starting a little development trials on my homey, but get some weird things (at least to me). Could not find a solutions on the forum and the documentation is poor (sorry).
I just started a new app to test out.
app.js
'use strict';
const Homey = require('homey');
const t = require('./lib/tools');
class ToolBox extends Homey.App {
onInit() {
this.log('Toolbox is running')
t.log('APP', 'Toolbox is started');
t.log('APP', 'Create Action Card ask_question');
let askQuestion = new Homey.FlowCardAction('ask_question');
t.log('APP', 'Action Card ask_question created');
askQuestion
.register()
.registerRunListener(async ( args, state ) => {
t.log('APP', 'Listener for Card ask_question created');
return true;
})
}
}
module.exports = ToolBox;
in app.json I have
{
"id": "eu.yormedia.ToolBox",
"version": "1.0.0",
"compatibility": ">=2.4.0",
"sdk": 2,
"name": {
"en": "ToolBox",
"nl": "ToolBox"
},
"description": {
"en": "A versatile application ",
"nl": "Een veelzijdige applicatie"
},
"images": {
"large": "/assets/images/large.png",
"small": "/assets/images/small.png"
},
"author": {
"name": "yormedia",
"email": "info@yormedia.eu"
},
"category": [
"tools"
],
"permissions": [
"homey:manager:speech-input",
"homey:manager:speech-output"
],
"flow": {
"actions": [
{
"id": "ask_question",
"title": {
"en": "Ask a question",
"nl": "Stel een vraag"
}
}
]
}
}
When I either run or validate the flow section will be deleted out of my app.json.
Any help will be appreciated.
Thank you
Carlo
(t.log is just a console log for my own flow debug)