Skip to content

Commit 1e92893

Browse files
authored
Merge pull request SmartThingsCommunity#2366 from SmartThingsCommunity/staging
Rolling up staging to production
2 parents 75d8282 + 86fa70b commit 1e92893

File tree

25 files changed

+752
-197
lines changed

25 files changed

+752
-197
lines changed

devicetypes/smartthings/aeon-home-energy-meter.src/aeon-home-energy-meter.groovy

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,22 @@ metadata {
4141
}
4242

4343
// tile definitions
44-
tiles {
45-
valueTile("power", "device.power", decoration: "flat") {
46-
state "default", label:'${currentValue} W'
44+
tiles(scale: 2) {
45+
multiAttributeTile(name:"power", type: "generic", width: 6, height: 4){
46+
tileAttribute("device.power", key: "PRIMARY_CONTROL") {
47+
attributeState("default", label:'${currentValue} W')
48+
}
49+
tileAttribute("device.energy", key: "SECONDARY_CONTROL") {
50+
attributeState("default", label:'${currentValue} kWh')
51+
}
4752
}
48-
valueTile("energy", "device.energy", decoration: "flat") {
49-
state "default", label:'${currentValue} kWh'
50-
}
51-
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat") {
53+
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
5254
state "default", label:'reset kWh', action:"reset"
5355
}
54-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
56+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
5557
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
5658
}
57-
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat") {
59+
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
5860
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
5961
}
6062

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,23 @@ metadata {
4343
}
4444

4545
// tile definitions
46-
tiles {
47-
standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
48-
state "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
49-
state "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
46+
tiles(scale: 2) {
47+
multiAttributeTile(name:"switch", type: "generic", width: 6, height: 4, canChangeIcon: true){
48+
tileAttribute("device.switch", key: "PRIMARY_CONTROL") {
49+
attributeState("on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00a0dc")
50+
attributeState("off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff")
51+
}
5052
}
51-
valueTile("energy", "device.energy", decoration: "flat") {
53+
valueTile("energy", "device.energy", decoration: "flat", width: 2, height: 2) {
5254
state "default", label:'${currentValue} kWh'
5355
}
54-
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat") {
56+
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5557
state "default", label:'reset kWh', action:"reset"
5658
}
57-
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat") {
59+
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5860
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
5961
}
60-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
62+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
6163
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
6264
}
6365

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,35 @@ metadata {
5858
}
5959

6060
// tile definitions
61-
tiles {
62-
standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
63-
state "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
64-
state "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
65-
}
66-
valueTile("power", "device.power", decoration: "flat") {
61+
tiles(scale: 2){
62+
multiAttributeTile(name:"switch", type: "generic", width: 6, height: 4, canChangeIcon: true){
63+
tileAttribute("device.switch", key: "PRIMARY_CONTROL") {
64+
attributeState("on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00a0dc")
65+
attributeState("off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff")
66+
}
67+
}
68+
valueTile("power", "device.power", decoration: "flat", width: 2, height: 2) {
6769
state "default", label:'${currentValue} W'
6870
}
69-
valueTile("energy", "device.energy", decoration: "flat") {
71+
valueTile("energy", "device.energy", decoration: "flat", width: 2, height: 2) {
7072
state "default", label:'${currentValue} kWh'
7173
}
72-
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat") {
74+
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
7375
state "default", label:'reset kWh', action:"reset"
7476
}
75-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
77+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
7678
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
7779
}
7880

7981
(1..4).each { n ->
80-
standardTile("switch$n", "switch$n", canChangeIcon: true) {
82+
standardTile("switch$n", "switch$n", canChangeIcon: true, width: 2, height: 2) {
8183
state "on", label: '${name}', action: "off$n", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
8284
state "off", label: '${name}', action: "on$n", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
8385
}
84-
valueTile("power$n", "power$n", decoration: "flat") {
86+
valueTile("power$n", "power$n", decoration: "flat", width: 2, height: 2) {
8587
state "default", label:'${currentValue} W'
8688
}
87-
valueTile("energy$n", "energy$n", decoration: "flat") {
89+
valueTile("energy$n", "energy$n", decoration: "flat", width: 2, height: 2) {
8890
state "default", label:'${currentValue} kWh'
8991
}
9092
}

devicetypes/smartthings/danalock.src/danalock.groovy

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,26 @@ metadata {
3131
reply "988100620100,delay 4200,9881006202": "command: 9881, payload: 00 62 03 00 00 06 FE FE"
3232
}
3333

34-
tiles {
35-
standardTile("toggle", "device.lock", width: 2, height: 2) {
36-
state "locked", label:'locked', action:"lock.unlock", icon:"st.locks.lock.locked", backgroundColor:"#00a0dc", nextState:"unlocking"
37-
state "unlocked", label:'unlocked', action:"lock.lock", icon:"st.locks.lock.unlocked", backgroundColor:"#ffffff", nextState:"locking"
38-
state "unknown", label:"unknown", action:"lock.lock", icon:"st.locks.lock.unknown", backgroundColor:"#ffffff", nextState:"locking"
39-
state "locking", label:'locking', icon:"st.locks.lock.locked", backgroundColor:"#00a0dc"
40-
state "unlocking", label:'unlocking', icon:"st.locks.lock.unlocked", backgroundColor:"#ffffff"
34+
tiles(scale: 2) {
35+
multiAttributeTile(name:"toggle", type: "generic", width: 6, height: 4){
36+
tileAttribute("device.lock", key: "PRIMARY_CONTROL") {
37+
attributeState("locked", label:'locked', action:"lock.unlock", icon:"st.locks.lock.locked", backgroundColor:"#00a0dc", nextState:"unlocking")
38+
attributeState("unlocked", label:'unlocked', action:"lock.lock", icon:"st.locks.lock.unlocked", backgroundColor:"#ffffff", nextState:"locking")
39+
attributeState("unknown", label:"unknown", action:"lock.lock", icon:"st.locks.lock.unknown", backgroundColor:"#ffffff", nextState:"locking")
40+
attributeState("locking", label:'locking', icon:"st.locks.lock.locked", backgroundColor:"#00a0dc")
41+
attributeState("unlocking", label:'unlocking', icon:"st.locks.lock.unlocked", backgroundColor:"#ffffff")
42+
}
4143
}
42-
standardTile("lock", "device.lock", inactiveLabel: false, decoration: "flat") {
44+
standardTile("lock", "device.lock", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4345
state "default", label:'lock', action:"lock.lock", icon:"st.locks.lock.locked", nextState:"locking"
4446
}
45-
standardTile("unlock", "device.lock", inactiveLabel: false, decoration: "flat") {
47+
standardTile("unlock", "device.lock", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4648
state "default", label:'unlock', action:"lock.unlock", icon:"st.locks.lock.unlocked", nextState:"unlocking"
4749
}
48-
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
50+
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4951
state "battery", label:'${currentValue}% battery', unit:""
5052
}
51-
standardTile("refresh", "device.lock", inactiveLabel: false, decoration: "flat") {
53+
standardTile("refresh", "device.lock", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5254
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
5355
}
5456

devicetypes/smartthings/ecobee-sensor.src/ecobee-sensor.groovy

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,37 @@ metadata {
2222
capability "Refresh"
2323
}
2424

25-
tiles {
26-
valueTile("temperature", "device.temperature", width: 2, height: 2) {
27-
state("temperature", label:'${currentValue}°', unit:"F",
25+
tiles(scale: 2) {
26+
multiAttributeTile(name: "temperature", type: "generic", width: 6, height: 4, canChangeIcon: true) {
27+
tileAttribute ("device.temperature", key: "PRIMARY_CONTROL") {
28+
attributeState "temperature", label:'${currentValue}°',
2829
backgroundColors:[
29-
// Celsius
30-
[value: 0, color: "#153591"],
31-
[value: 7, color: "#1e9cbb"],
32-
[value: 15, color: "#90d2a7"],
33-
[value: 23, color: "#44b621"],
34-
[value: 28, color: "#f1d801"],
35-
[value: 35, color: "#d04e00"],
36-
[value: 37, color: "#bc2323"],
37-
// Fahrenheit
38-
[value: 40, color: "#153591"],
39-
[value: 44, color: "#1e9cbb"],
40-
[value: 59, color: "#90d2a7"],
41-
[value: 74, color: "#44b621"],
42-
[value: 84, color: "#f1d801"],
43-
[value: 95, color: "#d04e00"],
44-
[value: 96, color: "#bc2323"]
45-
]
46-
)
30+
// Celsius
31+
[value: 0, color: "#153591"],
32+
[value: 7, color: "#1e9cbb"],
33+
[value: 15, color: "#90d2a7"],
34+
[value: 23, color: "#44b621"],
35+
[value: 28, color: "#f1d801"],
36+
[value: 35, color: "#d04e00"],
37+
[value: 37, color: "#bc2323"],
38+
// Fahrenheit
39+
[value: 40, color: "#153591"],
40+
[value: 44, color: "#1e9cbb"],
41+
[value: 59, color: "#90d2a7"],
42+
[value: 74, color: "#44b621"],
43+
[value: 84, color: "#f1d801"],
44+
[value: 95, color: "#d04e00"],
45+
[value: 96, color: "#bc2323"]
46+
]
47+
}
4748
}
4849

49-
standardTile("motion", "device.motion") {
50-
state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#cccccc")
51-
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
50+
standardTile("motion", "device.motion", inactiveLabel: false, width: 2, height: 2) {
51+
state "active", label:"Motion", icon:"st.motion.motion.active", backgroundColor:"#00A0DC"
52+
state "inactive", label:"No Motion", icon:"st.motion.motion.inactive", backgroundColor:"#cccccc"
5253
}
5354

54-
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat") {
55+
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5556
state "default", action:"refresh.refresh", icon:"st.secondary.refresh"
5657
}
5758

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* not displayed to the user. We do this so we can receive events and display on device
2727
* activity. If the user wants to display the tamper tile, adjust the tile display lines
2828
* with the following:
29-
* main(["water", "temperature", "tamper"])
30-
* details(["water", "temperature", "battery", "tamper"])
29+
* main(["water", "temperature"])
30+
* details(["water", "temperature", "tamper", "battery", "configure"])
3131
*
3232
* @param none
3333
*
@@ -40,7 +40,7 @@ metadata {
4040
capability "Configuration"
4141
capability "Battery"
4242
capability "Health Check"
43-
capability "Sensor"
43+
capability "Sensor"
4444

4545
command "resetParams2StDefaults"
4646
command "listCurrentParams"
@@ -74,12 +74,14 @@ metadata {
7474
}
7575
}
7676

77-
tiles {
78-
standardTile("water", "device.water", width: 2, height: 2) {
79-
state "dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff"
80-
state "wet", icon:"st.alarm.water.wet", backgroundColor:"#00a0dc"
81-
}
82-
valueTile("temperature", "device.temperature", inactiveLabel: false) {
77+
tiles(scale:2) {
78+
multiAttributeTile(name:"water", type: "generic", width: 6, height: 4){
79+
tileAttribute("device.water", key: "PRIMARY_CONTROL") {
80+
attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff")
81+
attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#00A0DC")
82+
}
83+
}
84+
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
8385
state "temperature", label:'${currentValue}°',
8486
backgroundColors:[
8587
[value: 31, color: "#153591"],
@@ -91,14 +93,14 @@ metadata {
9193
[value: 96, color: "#bc2323"]
9294
]
9395
}
94-
standardTile("tamper", "device.tamper") {
95-
state("secure", label:"secure", icon:"st.locks.lock.locked", backgroundColor:"#ffffff")
96-
state("tampered", label:"tampered", icon:"st.locks.lock.unlocked", backgroundColor:"#00a0dc")
96+
standardTile("tamper", "device.tamper", width: 2, height: 2) {
97+
state("secure", label:"secure", icon:"st.locks.lock.locked", backgroundColor:"#ffffff")
98+
state("tampered", label:"tampered", icon:"st.locks.lock.unlocked", backgroundColor:"#00a0dc")
9799
}
98-
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
100+
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
99101
state "battery", label:'${currentValue}% battery', unit:""
100102
}
101-
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") {
103+
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
102104
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
103105
}
104106

devicetypes/smartthings/home-energy-meter.src/home-energy-meter.groovy

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,19 @@ metadata {
3838
}
3939

4040
// tile definitions
41-
tiles {
42-
valueTile("power", "device.power", width: 2, height: 2) {
43-
state "default", label:'${currentValue} W'
41+
tiles(scale: 2) {
42+
multiAttributeTile(name:"power", type: "generic", width: 6, height: 4){
43+
tileAttribute("device.power", key: "PRIMARY_CONTROL") {
44+
attributeState("default", label:'${currentValue} W')
45+
}
46+
tileAttribute("device.energy", key: "SECONDARY_CONTROL") {
47+
attributeState("default", label:'${currentValue} kWh')
48+
}
4449
}
45-
valueTile("energy", "device.energy") {
46-
state "default", label:'${currentValue} kWh'
47-
}
48-
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat") {
50+
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4951
state "default", label:'reset kWh', action:"reset"
5052
}
51-
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
53+
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
5254
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
5355
}
5456

devicetypes/smartthings/light-sensor.src/light-sensor.groovy

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ metadata {
2727
}
2828

2929
// UI tile definitions
30-
tiles {
31-
valueTile("illuminance", "device.illuminance", width: 2, height: 2) {
32-
state("illuminance", label:'${currentValue}', unit:"lux",
33-
backgroundColors:[
34-
[value: 9, color: "#767676"],
35-
[value: 315, color: "#ffa81e"],
36-
[value: 1000, color: "#fbd41b"]
37-
]
38-
)
30+
tiles(scale: 2) {
31+
multiAttributeTile(name:"illuminance", type: "generic", width: 6, height: 4){
32+
tileAttribute("device.illuminance", key: "PRIMARY_CONTROL") {
33+
attributeState("illuminance", label:'${currentValue}', unit:"lux",
34+
backgroundColors:[
35+
[value: 9, color: "#767676"],
36+
[value: 315, color: "#ffa81e"],
37+
[value: 1000, color: "#fbd41b"]
38+
]
39+
)
40+
}
3941
}
4042

4143
main "illuminance"

devicetypes/smartthings/motion-detector.src/motion-detector.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ metadata {
2626
}
2727

2828
// UI tile definitions
29-
tiles {
30-
standardTile("motion", "device.motion", width: 2, height: 2) {
31-
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
32-
state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#cccccc")
33-
}
34-
29+
tiles(scale: 2) {
30+
multiAttributeTile(name:"motion", type: "generic", width: 6, height: 4){
31+
tileAttribute("device.motion", key: "PRIMARY_CONTROL") {
32+
attributeState("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
33+
attributeState("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#CCCCCC")
34+
}
35+
}
3536
main "motion"
3637
details "motion"
3738
}

devicetypes/smartthings/nyce-motion-sensor.src/nyce-motion-sensor.groovy

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,25 @@ metadata {
2323
capability "Refresh"
2424
capability "Sensor"
2525

26-
command "enrollResponse"
26+
command "enrollResponse"
2727

2828
fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3041"
29-
fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3043", deviceJoinName: "NYCE Ceiling Motion Sensor"
30-
fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3045", deviceJoinName: "NYCE Curtain Motion Sensor"
29+
fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3043", deviceJoinName: "NYCE Ceiling Motion Sensor"
30+
fingerprint inClusters: "0000,0001,0003,0406,0500,0020", manufacturer: "NYCE", model: "3045", deviceJoinName: "NYCE Curtain Motion Sensor"
3131
}
3232

33-
tiles {
34-
standardTile("motion", "device.motion", width: 2, height: 2) {
35-
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
36-
state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#cccccc")
33+
tiles(scale: 2) {
34+
multiAttributeTile(name:"motion", type: "generic", width: 6, height: 4){
35+
tileAttribute("device.motion", key: "PRIMARY_CONTROL") {
36+
attributeState("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
37+
attributeState("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#CCCCCC")
38+
}
3739
}
3840

39-
valueTile("battery", "device.battery", decoration: "flat", inactiveLabel: false) {
41+
valueTile("battery", "device.battery", decoration: "flat", inactiveLabel: false, width: 2, height: 2) {
4042
state "battery", label:'${currentValue}% battery'
4143
}
42-
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat") {
44+
standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
4345
state "default", action:"refresh.refresh", icon:"st.secondary.refresh"
4446
}
4547

0 commit comments

Comments
 (0)