Skip to content

Commit

Permalink
Added device args
Browse files Browse the repository at this point in the history
Added device args to flow triggers
  • Loading branch information
MarvinSchenkel committed Mar 14, 2016
1 parent 3921baa commit c3ea5d0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
43 changes: 39 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
"title": {
"en":"A movie has started"
},
"args": [
{
"name": "kodi",
"type": "device",
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi"
}
],
"tokens":[
{
"name":"movie_title",
Expand All @@ -165,6 +172,13 @@
"title": {
"en":"An episode has started"
},
"args": [
{
"name": "kodi",
"type": "device",
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi"
}
],
"tokens":[
{
"name":"tvshow_title",
Expand Down Expand Up @@ -208,19 +222,40 @@
"id":"kodi_pause",
"title": {
"en":"Kodi has been paused"
}
},
"args": [
{
"name": "kodi",
"type": "device",
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi"
}
]
},
{
"id":"kodi_resume",
"title": {
"en":"Kodi has been resumed"
}
},
"args": [
{
"name": "kodi",
"type": "device",
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi"
}
]
},
{
"id":"kodi_stop",
"id":"kodi_stop",
"title": {
"en":"Kodi has been stopped"
}
},
"args": [
{
"name": "kodi",
"type": "device",
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi"
}
]
}
],
"actions":[
Expand Down
2 changes: 1 addition & 1 deletion drivers/kodi/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports.pair = function (socket) {
}

// Device gets deleted
module.exports.deleted = function (device_data) {
module.exports.deleted = function (device_data) {
// Create a new array without the deleted device
registeredDevices = registeredDevices.filter(function (item) {
return item.host !== device_data.id
Expand Down

0 comments on commit c3ea5d0

Please sign in to comment.