@@ -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}
0 commit comments