Skip to content

Commit

Permalink
Removed extra google stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
inventor96 committed Sep 8, 2019
1 parent 90562a3 commit 855b64d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 72 deletions.
14 changes: 0 additions & 14 deletions lib/plugins/basalprofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,6 @@ function init (ctx) {
}]
};

function googleHomeCurrentBasalhandler (result, next, sbx) {
var pwd = result.parameters && result.parameters.givenName ? result.parameters.givenName : null;
next(basalMessage(pwd, sbx));
}

basal.googleHome = {
intentHandlers: [{
intent: 'CurrentMetric'
, routableSlot:'metric'
, slots:['basal', 'current basal']
, intentHandler: googleHomeCurrentBasalhandler
}]
};

return basal;
}

Expand Down
19 changes: 0 additions & 19 deletions lib/plugins/cob.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,25 +308,6 @@ function init (ctx) {
}]
};

function googleHomeCOBHandler(result, next, sbx) {
var preamble = result && result.parameters && result.parameters.givenName ? result.parameters.givenName + ' has' : 'You have';
var value = 'no';
if (sbx.properties.cob && sbx.properties.cob.cob !== 0) {
value = Math.round(sbx.properties.cob.cob);
}
var response = preamble + ' ' + value + ' carbohydrates on board';
next(response);
}

cob.googleHome = {
intentHandlers: [{
intent: 'CurrentMetric'
, routableSlot:'metric'
, slots:['cob', 'carbs on board', 'carbohydrates on board', 'carbohydrates']
, intentHandler: googleHomeCOBHandler
}]
};

return cob;

}
Expand Down
15 changes: 0 additions & 15 deletions lib/plugins/iob.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,21 +288,6 @@ function init(ctx) {
}]
};

function googleHomeIOBIntentHandler(result, next, sbx) {
var preamble = result && result.parameters && result.parameters.givenName ? result.parameters.givenName + ' has ' : 'You have ';
var message = preamble + getIob(sbx) + ' insulin on board';
next(message);
}

iob.googleHome = {
intentHandlers: [{
intent: 'CurrentMetric'
, routableSlot: 'metric'
, slots: ['iob', 'insulin on board', 'insulin']
, intentHandler: googleHomeIOBIntentHandler
}]
};

return iob;

}
Expand Down
24 changes: 0 additions & 24 deletions lib/plugins/openaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,30 +543,6 @@ function init (ctx) {
}]
};

function googleHomeForecastHandler(response, next, sbx) {
if (sbx.properties.openaps && sbx.properties.openaps.lastEventualBG) {
var response = 'The Open APS eventual BG is ' + sbx.properties.openaps.lastEventualBG;
next(response);
}
}

function googleHomeLastLoopHandler (response, next, sbx) {
var response = 'The last successful loop was ' + moment(sbx.properties.openaps.lastLoopMoment).from(moment(sbx.time));
next(response);
}

openaps.googleHome = {
intentHandlers: [{
intent: 'CurrentMetric'
, routableSlot: 'metric'
, slots: ['openaps', 'openaps forecast', 'forecast']
, intentHandler: googleHomeForecastHandler
}, {
intent: 'LastLoop'
, intentHandler: googleHomeLastLoopHandler
}]
};

function statusClass (prop, prefs, sbx) {
var level = statusLevel(prop, prefs, sbx);
return levels.toStatusClass(level);
Expand Down

0 comments on commit 855b64d

Please sign in to comment.