Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api for Homeyscript #25

Open
tboudri opened this issue Dec 9, 2018 · 1 comment
Open

Api for Homeyscript #25

tboudri opened this issue Dec 9, 2018 · 1 comment

Comments

@tboudri
Copy link

tboudri commented Dec 9, 2018

is it possible to make Countdown available in HomeyScript?

@groetsels
Copy link

Dat zou erg mooie zijn.
Uitlezen kan wel met een stukje script:
(nu zetten nog)...

console.log('-------------CountDown timers----------');

let tokens = await Homey.flowToken.getFlowTokens();

for (var i in tokens) {
if (tokens[i].uriObj.name.indexOf('CountDown') === 0) {
//if (tokens[i].uri == 'homey:app:nl.bevlogenheid.countdown') {
console.log(tokens[i].title + ' (' + tokens[i].type + ') : ' + tokens[i].value);
//console.log(tokens[i])
}
}

if (1 == 2) {
let app = await Homey.apps.getApp( {id: 'homey.countdown'} );
await app.apiPost('/update_timer/', {timername: 'schemer', seconds: 120} );
}

return true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants