Skip to content

Commit

Permalink
Read state from core:LuminanceState property (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkow committed Oct 21, 2018
1 parent 5114165 commit 7629f50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/tahomalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ var getDeviceState = function getDeviceState(deviceURL) {
if(_thisDevice.states[j].name === "core:ClosureState") {
response.position = _thisDevice.states[j].value;
}

// - Exposes SunSensor value
// - https://github.com/nikkow/node-red-contrib-tahoma/issues/6
if(_thisDevice.states[j].name === "core:LuminanceState") {
response.luminance = _thisDevice.states[j].value;
}
}

return deferred.resolve(response);
Expand Down

0 comments on commit 7629f50

Please sign in to comment.