@@ -42,27 +42,30 @@ metadata {
42
42
reply " 200163,delay 5000,2602" : " command: 2603, payload: 63"
43
43
}
44
44
45
- tiles {
46
- standardTile(" switch" , " device.switch" , width : 2 , height : 2 , canChangeIcon : true ) {
47
- state " on" , label :' ${name}' , action :" switch.off" , icon :" st.switches.switch.on" , backgroundColor :" #79b821" , nextState :" turningOff"
48
- state " off" , label :' ${name}' , action :" switch.on" , icon :" st.switches.switch.off" , backgroundColor :" #ffffff" , nextState :" turningOn"
49
- state " turningOn" , label :' ${name}' , action :" switch.off" , icon :" st.switches.switch.on" , backgroundColor :" #79b821" , nextState :" turningOff"
50
- state " turningOff" , label :' ${name}' , action :" switch.on" , icon :" st.switches.switch.off" , backgroundColor :" #ffffff" , nextState :" turningOn"
45
+ tiles(scale : 2 ) {
46
+ multiAttributeTile(name :" switch" , type : " lighting" , width : 6 , height : 4 , canChangeIcon : true ){
47
+ tileAttribute (" device.switch" , key : " PRIMARY_CONTROL" ) {
48
+ attributeState " on" , label :' ${name}' , action :" switch.off" , icon :" st.switches.switch.on" , backgroundColor :" #79b821" , nextState :" turningOff"
49
+ attributeState " off" , label :' ${name}' , action :" switch.on" , icon :" st.switches.switch.off" , backgroundColor :" #ffffff" , nextState :" turningOn"
50
+ attributeState " turningOn" , label :' ${name}' , action :" switch.off" , icon :" st.switches.switch.on" , backgroundColor :" #79b821" , nextState :" turningOff"
51
+ attributeState " turningOff" , label :' ${name}' , action :" switch.on" , icon :" st.switches.switch.off" , backgroundColor :" #ffffff" , nextState :" turningOn"
52
+ }
53
+ tileAttribute (" device.level" , key : " SLIDER_CONTROL" ) {
54
+ attributeState " level" , action :" switch level.setLevel"
55
+ }
51
56
}
52
- standardTile(" indicator" , " device.indicatorStatus" , inactiveLabel : false , decoration : " flat" ) {
57
+
58
+ standardTile(" indicator" , " device.indicatorStatus" , height : 2 , width : 2 , inactiveLabel : false , decoration : " flat" ) {
53
59
state " when off" , action :" indicator.indicatorWhenOn" , icon :" st.indicators.lit-when-off"
54
60
state " when on" , action :" indicator.indicatorNever" , icon :" st.indicators.lit-when-on"
55
61
state " never" , action :" indicator.indicatorWhenOff" , icon :" st.indicators.never-lit"
56
62
}
57
- standardTile(" refresh" , " device.switch" , inactiveLabel : false , decoration : " flat" ) {
63
+ standardTile(" refresh" , " device.switch" , height : 2 , width : 2 , inactiveLabel : false , decoration : " flat" ) {
58
64
state " default" , label :" " , action :" refresh.refresh" , icon :" st.secondary.refresh"
59
65
}
60
- controlTile(" levelSliderControl" , " device.level" , " slider" , height : 1 , width : 3 , inactiveLabel : false ) {
61
- state " level" , action :" switch level.setLevel"
62
- }
63
66
64
67
main([" switch" ])
65
- details([" switch" , " refresh" , " indicator" , " levelSliderControl " ])
68
+ details([" switch" , " refresh" , " indicator" ])
66
69
}
67
70
}
68
71
0 commit comments