From e3150d200c9350b31a4af3b0714a55cc9f55d793 Mon Sep 17 00:00:00 2001 From: uwap Date: Sun, 8 Apr 2018 11:08:46 +0200 Subject: [PATCH] RZL: Add all kitchen light slider --- config/rzl.js | 30 ++++++++++++++++++++++++++++++ src/components/UiItemList/index.js | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/config/rzl.js b/config/rzl.js index f304edb..25c7422 100644 --- a/config/rzl.js +++ b/config/rzl.js @@ -163,6 +163,18 @@ const config : Config = { defaultValue: "", values: {}, type: msg => JSON.parse(msg.toString()).progress || 0 + }, + kitchen_light_color: { + state: "/service/openhab/out/kitchen_light_all_color_temperature/state", + command: "/service/openhab/in/kitchen_light_all_color_temperature/command", + defaultValue: "0", + values: {} + }, + kitchen_light_brightness: { + state: "/service/openhab/out/kitchen_light_all_brightness/state", + command: "/service/openhab/in/kitchen_light_all_brightness/command", + defaultValue: "0", + values: {} } }, floalt.topics("65537"), @@ -510,6 +522,24 @@ const config : Config = { position: [325, 407], icon: "ceiling-light", ui: [ + { + type: "slider", + min: 0, + max: 100, + text: "Helligkeit", + icon: "brightness-7", + topic: "kitchen_light_brightness", + delayedApply: true + }, + { + type: "slider", + min: 0, + max: 100, + text: "Farbtemperatur", + icon: "weather-sunset-down", + topic: "kitchen_light_color", + delayedApply: true + }, { type: "section", text: "Lampe Eingang" diff --git a/src/components/UiItemList/index.js b/src/components/UiItemList/index.js index 9302ce4..a267629 100644 --- a/src/components/UiItemList/index.js +++ b/src/components/UiItemList/index.js @@ -123,7 +123,7 @@ export default class UiItemList extends React.Component { on(control.delayedApply)(); }} onDragStop={on(false)} - style={{width: 100, marginTop: 54}} + style={{width: 100}} /> ];