Skip to content

Commit 3b7fb1b

Browse files
committed
updates
1 parent 2470eeb commit 3b7fb1b

File tree

6 files changed

+691
-9
lines changed

6 files changed

+691
-9
lines changed

devicetypes/gupta/tasmota.src/TasmotaContactSensor.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ metadata {
4343
}
4444

4545
tiles {
46-
multiAttributeTile(name:"main", type: "generic"){
46+
multiAttributeTile(name:"main", type: "generic", canChangeIcon: 'true', canChangeBackground : 'true' ){
4747
tileAttribute ("device.contact", key: "PRIMARY_CONTROL") {
4848
attributeState "open", label:'${name}', action: "close", icon:"st.contact.contact.open", backgroundColor:"#e86d13"
4949
attributeState "closed", label:'${name}', action: "open", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc"
5050
}
5151

5252
tileAttribute("device.device_details", key: "SECONDARY_CONTROL") {
53-
attributeState("default", action: "refresh", label: '${currentValue}', icon:"st.secondary.refresh-icon")
53+
attributeState("default", action: "refresh", label: '${currentValue}', icon:"https://github.com/sgupta999/GuptaSmartthingsRepository/raw/master/icons/refresh.png")
5454
attributeState("refresh", label: 'Updating data from server...')
5555
}
5656
}
@@ -189,6 +189,7 @@ def updateTiles(Object val ){
189189
//log.debug "Are updates ready ${state.update1}, ${state.update2}, ${state.update3}, ${state.update4}"
190190
//log.debug "Time is ${state.currentTimestamp}"
191191
if (state.update1 && state.update2 && state.update3 && state.update4){
192+
state.update1 = state.update2 = state.update3 = state.update4 = false;
192193
runIn(3,fireEvents)
193194
}
194195
}

devicetypes/gupta/tasmota.src/TasmotaSensorSwitch.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ metadata {
4848
}
4949

5050
tiles {
51-
multiAttributeTile(name:"main", type: "generic"){
51+
multiAttributeTile(name:"main", type: "generic", canChangeIcon: 'true', canChangeBackground : 'true' ){
5252
tileAttribute ("device.contact", key: "PRIMARY_CONTROL") {
5353
attributeState "open", label:'${name}', action: "close", icon:"st.contact.contact.open", backgroundColor:"#e86d13"
5454
attributeState "closed", label:'${name}', action: "open", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc"
5555
}
5656

5757
tileAttribute("device.device_details", key: "SECONDARY_CONTROL") {
58-
attributeState("default", action: "refresh", label: '${currentValue}', icon:"st.secondary.refresh-icon")
58+
attributeState("default", action: "refresh", label: '${currentValue}', icon:"https://github.com/sgupta999/GuptaSmartthingsRepository/raw/master/icons/refresh.png")
5959
attributeState("refresh", label: 'Updating data from server...')
6060
}
6161
}
@@ -209,6 +209,7 @@ def updateTiles(Object val ){
209209
//log.debug "Are updates ready ${state.update1}, ${state.update2}, ${state.update3}, ${state.update4}"
210210
//log.debug "Time is ${state.currentTimestamp}"
211211
if (state.update1 && state.update2 && state.update3 && state.update4){
212+
state.update1 = state.update2 = state.update3 = state.update4 = false;
212213
runIn(3,fireEvents)
213214
}
214215
}

devicetypes/gupta/tasmota.src/TasmotaSwitch.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ metadata {
4141
}
4242

4343
tiles {
44-
multiAttributeTile(name:"main", type: "device.switch", width: 6, height: 4){
44+
multiAttributeTile(name:"main", type: "device.switch", width: 6, height: 4, canChangeIcon: 'true', canChangeBackground : 'true' ){
4545
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
4646
attributeState "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00A0DC"
4747
attributeState "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
4848
}
4949

5050
tileAttribute("device.device_details", key: "SECONDARY_CONTROL") {
51-
attributeState("default", action: "refresh", label: '${currentValue}', icon:"st.secondary.refresh-icon")
51+
attributeState("default", action: "refresh", label: '${currentValue}', icon:"https://github.com/sgupta999/GuptaSmartthingsRepository/raw/master/icons/refresh.png")
5252
attributeState("refresh", label: 'Updating data from server...')
5353
}
5454
}
@@ -190,6 +190,7 @@ def updateTiles(Object val ){
190190
//log.debug "Are updates ready ${state.update1}, ${state.update2}, ${state.update3}, ${state.update4}"
191191
//log.debug "Time is ${state.currentTimestamp}"
192192
if (state.update1 && state.update2 && state.update3 && state.update4){
193+
state.update1 = state.update2 = state.update3 = state.update4 = false;
193194
runIn(3,fireEvents)
194195
}
195196
}

devicetypes/gupta/tasmota.src/TasmotaSwitchSensor.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ metadata {
4848
}
4949

5050
tiles {
51-
multiAttributeTile(name:"main", type: "device.switch", width: 6, height: 4){
51+
multiAttributeTile(name:"main", type: "device.switch", width: 6, height: 4, canChangeIcon: 'true', canChangeBackground : 'true' ){
5252
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
5353
attributeState "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00A0DC"
5454
attributeState "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
5555
}
5656

5757
tileAttribute("device.device_details", key: "SECONDARY_CONTROL") {
58-
attributeState("default", action: "refresh", label: '${currentValue}', icon:"st.secondary.refresh-icon")
58+
attributeState("default", action: "refresh", label: '${currentValue}', icon: "https://github.com/sgupta999/GuptaSmartthingsRepository/raw/master/icons/refresh.png")
5959
attributeState("refresh", label: 'Updating data from server...')
6060
}
6161
}
@@ -207,6 +207,7 @@ def updateTiles(Object val ){
207207
//log.debug "Are updates ready ${state.update1}, ${state.update2}, ${state.update3}, ${state.update4}"
208208
//log.debug "Time is ${state.currentTimestamp}"
209209
if (state.update1 && state.update2 && state.update3 && state.update4){
210+
state.update1 = state.update2 = state.update3 = state.update4 = false;
210211
runIn(3,fireEvents)
211212
}
212213
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mqtt-bridge-smartthings",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "MQTT Bridge to SmartThings [MBS]",
55
"main": "mbs-server.js",
66
"bin": {

0 commit comments

Comments
 (0)