From 7629f50ff91e5eefa74d9808ce9465503aac9173 Mon Sep 17 00:00:00 2001 From: Nicolas Nunge Date: Sun, 21 Oct 2018 12:41:35 +0200 Subject: [PATCH] Read state from core:LuminanceState property (#6) --- core/tahomalink.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tahomalink.js b/core/tahomalink.js index ada03df..69072c6 100644 --- a/core/tahomalink.js +++ b/core/tahomalink.js @@ -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);