RZL: Add all kitchen light slider

This commit is contained in:
uwap 2018-04-08 11:08:46 +02:00
parent f2cc0eaa2a
commit e3150d200c
2 changed files with 31 additions and 1 deletions

View file

@ -163,6 +163,18 @@ const config : Config = {
defaultValue: "", defaultValue: "",
values: {}, values: {},
type: msg => JSON.parse(msg.toString()).progress || 0 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"), floalt.topics("65537"),
@ -510,6 +522,24 @@ const config : Config = {
position: [325, 407], position: [325, 407],
icon: "ceiling-light", icon: "ceiling-light",
ui: [ 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", type: "section",
text: "Lampe Eingang" text: "Lampe Eingang"

View file

@ -123,7 +123,7 @@ export default class UiItemList extends React.Component<UiItemListProps> {
on(control.delayedApply)(); on(control.delayedApply)();
}} }}
onDragStop={on(false)} onDragStop={on(false)}
style={{width: 100, marginTop: 54}} style={{width: 100}}
/></MuiThemeProvider> /></MuiThemeProvider>
</ListItemSecondaryAction> </ListItemSecondaryAction>
]; ];