Skip to content

Commit 54ceb97

Browse files
author
Matt Nohr
committed
Merge branch 'multi-attribute-tiles'
First pass at updates for an experimental new feature. More details coming soon.
2 parents ff1505a + 6628708 commit 54ceb97

File tree

28 files changed

+376
-367
lines changed

28 files changed

+376
-367
lines changed

devicetypes/smartthings/aeon-multisensor-6.src/aeon-multisensor-6.groovy

+10-8
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ metadata {
6363
status "wake up" : "command: 8407, payload: "
6464
}
6565

66-
tiles {
67-
standardTile("motion", "device.motion", width: 2, height: 2) {
68-
state "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
69-
state "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
66+
tiles(scale: 2) {
67+
multiAttributeTile(name:"motion", type: "generic", width: 6, height: 4){
68+
tileAttribute ("device.motion", key: "PRIMARY_CONTROL") {
69+
attributeState "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
70+
attributeState "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
71+
}
7072
}
71-
valueTile("temperature", "device.temperature", inactiveLabel: false) {
73+
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
7274
state "temperature", label:'${currentValue}°',
7375
backgroundColors:[
7476
[value: 32, color: "#153591"],
@@ -80,13 +82,13 @@ metadata {
8082
[value: 98, color: "#bc2323"]
8183
]
8284
}
83-
valueTile("humidity", "device.humidity", inactiveLabel: false) {
85+
valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
8486
state "humidity", label:'${currentValue}% humidity', unit:""
8587
}
86-
valueTile("illuminance", "device.illuminance", inactiveLabel: false) {
88+
valueTile("illuminance", "device.illuminance", inactiveLabel: false, width: 2, height: 2) {
8789
state "luminosity", label:'${currentValue} ${unit}', unit:"lux"
8890
}
89-
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
91+
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
9092
state "battery", label:'${currentValue}% battery', unit:""
9193
}
9294

devicetypes/smartthings/aeon-multisensor-gen5.src/aeon-multisensor-gen5.groovy

+11-9
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ metadata {
5959
status "wake up" : "command: 8407, payload: "
6060
}
6161

62-
tiles {
63-
standardTile("motion", "device.motion", width: 2, height: 2) {
64-
state "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
65-
state "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
62+
tiles(scale: 2) {
63+
multiAttributeTile(name:"motion", type: "generic", width: 6, height: 4){
64+
tileAttribute ("device.motion", key: "PRIMARY_CONTROL") {
65+
attributeState "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
66+
attributeState "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
67+
}
6668
}
67-
valueTile("temperature", "device.temperature", inactiveLabel: false) {
69+
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
6870
state "temperature", label:'${currentValue}°',
6971
backgroundColors:[
7072
[value: 32, color: "#153591"],
@@ -76,16 +78,16 @@ metadata {
7678
[value: 98, color: "#bc2323"]
7779
]
7880
}
79-
valueTile("humidity", "device.humidity", inactiveLabel: false) {
81+
valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
8082
state "humidity", label:'${currentValue}% humidity', unit:""
8183
}
82-
valueTile("illuminance", "device.illuminance", inactiveLabel: false) {
84+
valueTile("illuminance", "device.illuminance", inactiveLabel: false, width: 2, height: 2) {
8385
state "luminosity", label:'${currentValue} ${unit}', unit:"lux"
8486
}
85-
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
87+
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
8688
state "battery", label:'${currentValue}% battery', unit:""
8789
}
88-
standardTile("configureAfterSecure", "device.configure", inactiveLabel: false, decoration: "flat") {
90+
standardTile("configureAfterSecure", "device.configure", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
8991
state "configure", label:'', action:"configureAfterSecure", icon:"st.secondary.configure"
9092
}
9193

devicetypes/smartthings/aeon-multisensor.src/aeon-multisensor.groovy

+11-9
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ metadata {
5656
}
5757
}
5858

59-
tiles {
60-
standardTile("motion", "device.motion", width: 2, height: 2) {
61-
state "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
62-
state "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
59+
tiles(scale: 2) {
60+
multiAttributeTile(name:"motion", type: "generic", width: 6, height: 4){
61+
tileAttribute ("device.motion", key: "PRIMARY_CONTROL") {
62+
attributeState "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0"
63+
attributeState "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"
64+
}
6365
}
64-
valueTile("temperature", "device.temperature", inactiveLabel: false) {
66+
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
6567
state "temperature", label:'${currentValue}°',
6668
backgroundColors:[
6769
[value: 31, color: "#153591"],
@@ -73,16 +75,16 @@ metadata {
7375
[value: 96, color: "#bc2323"]
7476
]
7577
}
76-
valueTile("humidity", "device.humidity", inactiveLabel: false) {
78+
valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
7779
state "humidity", label:'${currentValue}% humidity', unit:""
7880
}
79-
valueTile("illuminance", "device.illuminance", inactiveLabel: false) {
81+
valueTile("illuminance", "device.illuminance", inactiveLabel: false, width: 2, height: 2) {
8082
state "luminosity", label:'${currentValue} ${unit}', unit:"lux"
8183
}
82-
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
84+
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
8385
state "battery", label:'${currentValue}% battery', unit:""
8486
}
85-
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") {
87+
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
8688
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
8789
}
8890

devicetypes/smartthings/aeon-siren.src/aeon-siren.groovy

+8-6
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ metadata {
3333
reply "9881002001FF,delay 3000,988100200100,9881002002": "command: 9881, payload: 00200300"
3434
}
3535

36-
tiles {
37-
standardTile("alarm", "device.alarm", width: 2, height: 2) {
38-
state "off", label:'off', action:'alarm.siren', icon:"st.alarm.alarm.alarm", backgroundColor:"#ffffff"
39-
state "both", label:'alarm!', action:'alarm.off', icon:"st.alarm.alarm.alarm", backgroundColor:"#e86d13"
36+
tiles(scale: 2) {
37+
multiAttributeTile(name:"alarm", type: "generic", width: 6, height: 4){
38+
tileAttribute ("device.alarm", key: "PRIMARY_CONTROL") {
39+
attributeState "off", label:'off', action:'alarm.siren', icon:"st.alarm.alarm.alarm", backgroundColor:"#ffffff"
40+
attributeState "both", label:'alarm!', action:'alarm.off', icon:"st.alarm.alarm.alarm", backgroundColor:"#e86d13"
41+
}
4042
}
41-
standardTile("test", "device.alarm", inactiveLabel: false, decoration: "flat") {
43+
standardTile("test", "device.alarm", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4244
state "default", label:'', action:"test", icon:"st.secondary.test"
4345
}
44-
standardTile("off", "device.alarm", inactiveLabel: false, decoration: "flat") {
46+
standardTile("off", "device.alarm", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4547
state "default", label:'', action:"alarm.off", icon:"st.secondary.off"
4648
}
4749

devicetypes/smartthings/centralite-dimmer.src/centralite-dimmer.groovy

+18-15
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,28 @@ metadata {
3939
reply "zcl on-off off": "on/off: 0"
4040
}
4141

42-
// UI tile definitions
43-
tiles {
44-
standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
45-
state "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
46-
state "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
47-
state "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
48-
state "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
42+
tiles(scale: 2) {
43+
multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4){
44+
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
45+
attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
46+
attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
47+
attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
48+
attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
49+
}
50+
tileAttribute ("device.level", key: "SLIDER_CONTROL") {
51+
attributeState "level", action:"switch level.setLevel"
52+
}
53+
tileAttribute ("power", key: "SECONDARY_CONTROL") {
54+
attributeState "power", label:'${currentValue} W'
55+
}
4956
}
50-
controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 2, inactiveLabel: false) {
51-
state "level", action:"switch level.setLevel"
52-
}
53-
valueTile("power", "device.power", decoration: "flat") {
54-
state "power", label:'${currentValue} W'
55-
}
56-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
57+
58+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5759
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
5860
}
61+
5962
main "switch"
60-
details(["switch","power","refresh","levelSliderControl"])
63+
details(["switch","refresh"])
6164
}
6265
}
6366

devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy

+15-12
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,30 @@ metadata {
4242
reply "200163,delay 5000,2602": "command: 2603, payload: 63"
4343
}
4444

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+
}
5156
}
52-
standardTile("indicator", "device.indicatorStatus", inactiveLabel: false, decoration: "flat") {
57+
58+
standardTile("indicator", "device.indicatorStatus", height: 2, width: 2, inactiveLabel: false, decoration: "flat") {
5359
state "when off", action:"indicator.indicatorWhenOn", icon:"st.indicators.lit-when-off"
5460
state "when on", action:"indicator.indicatorNever", icon:"st.indicators.lit-when-on"
5561
state "never", action:"indicator.indicatorWhenOff", icon:"st.indicators.never-lit"
5662
}
57-
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
63+
standardTile("refresh", "device.switch", height: 2, width: 2, inactiveLabel: false, decoration: "flat") {
5864
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
5965
}
60-
controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 3, inactiveLabel: false) {
61-
state "level", action:"switch level.setLevel"
62-
}
6366

6467
main(["switch"])
65-
details(["switch", "refresh", "indicator", "levelSliderControl"])
68+
details(["switch", "refresh", "indicator"])
6669
}
6770
}
6871

devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy

+9-6
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ metadata {
2828
status "battery ${i}%": new physicalgraph.zwave.Zwave().batteryV1.batteryReport(batteryLevel: i).incomingMessage()
2929
}
3030
}
31-
tiles {
32-
standardTile("water", "device.water", width: 2, height: 2) {
33-
state "dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff"
34-
state "wet", icon:"st.alarm.water.wet", backgroundColor:"#53a7c0"
31+
32+
tiles(scale: 2) {
33+
multiAttributeTile(name:"water", type: "generic", width: 6, height: 4){
34+
tileAttribute ("device.water", key: "PRIMARY_CONTROL") {
35+
attributeState "dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff"
36+
attributeState "wet", icon:"st.alarm.water.wet", backgroundColor:"#53a7c0"
37+
}
3538
}
36-
valueTile("battery", "device.battery", decoration: "flat", inactiveLabel: false) {
39+
valueTile("battery", "device.battery", decoration: "flat", inactiveLabel: false, width: 2, height: 2) {
3740
state "battery", label:'${currentValue}% battery', unit:""
3841
}
39-
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") {
42+
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4043
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
4144
}
4245
main "water"

devicetypes/smartthings/ge-zigbee-dimmer.src/ge-zigbee-dimmer.groovy

+14-13
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,25 @@ metadata {
4141
reply "zcl on-off off": "on/off: 0"
4242
}
4343

44-
// UI tile definitions
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"
44+
tiles(scale: 2) {
45+
multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
46+
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
47+
attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
48+
attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
49+
attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
50+
attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
51+
}
52+
tileAttribute ("device.level", key: "SLIDER_CONTROL") {
53+
attributeState "level", action:"switch level.setLevel"
54+
}
5155
}
52-
controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 2, inactiveLabel: false, range:"(0..100)") {
53-
state "level", action:"switch level.setLevel"
54-
}
55-
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
56+
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5657
state "level", label: 'Level ${currentValue}%'
5758
}
58-
valueTile("power", "device.power", decoration: "flat") {
59+
valueTile("power", "device.power", decoration: "flat", width: 2, height: 2) {
5960
state "power", label:'${currentValue} W'
6061
}
61-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
62+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
6263
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
6364
}
6465
main "switch"

devicetypes/smartthings/ge-zigbee-switch.src/ge-zigbee-switch.groovy

+10-9
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,19 @@ metadata {
4141
reply "zcl on-off off": "on/off: 0"
4242
}
4343

44-
// UI tile definitions
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"
44+
tiles(scale: 2) {
45+
multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
46+
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
47+
attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
48+
attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
49+
attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
50+
attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
51+
}
5152
}
52-
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
53+
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5354
state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
5455
}
55-
valueTile("power", "device.power", inactiveLabel: false, decoration: "flat") {
56+
valueTile("power", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5657
state "power", label:'${currentValue} Watts'
5758
}
5859
main "switch"

0 commit comments

Comments
 (0)