Stills00
(Ben)
August 21, 2019, 10:40pm
63
I figured it out!! you have to open the image you want to copy in a new tab to get the raw link to photo and not use the link to your overall Github file location!
Seems so simple now… Thank you both @anon36505037 and @pmjoen you both are awesome.
Now i just need to figure out how to modify the Standard Toggle circle to make the immage fit inside of it. I think i saw a Wiki about it somewhere, getting off thread topic so i will start a new thread if I cant figure it out tonight.
Thanks guys!
1 Like
pmjoen
(Patrick Mjoen)
August 22, 2019, 3:31pm
64
Send the section of your code for the tile attributes, but I believe you are looking for this:
decoration: “flat”
2 Likes
Stills00
(Ben)
August 22, 2019, 9:48pm
65
tiles {
standardTile(“toggle”, “device.door”, width: 2, height: 2, canChangeIcon: true) {
state(“closed”, label:’{name}', action:"door control.open", icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closed.png", backgroundColor:"#00A0DC", nextState:"opening")
state("open", label:' {name}’, action:“door control.close”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Open.png ”, backgroundColor:"#e86d13 ", nextState:“closing”)
state(“opening”, label:’{name}', icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening.png", backgroundColor:"#e86d13")
state("closing", label:' {name}’, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing.png ”, backgroundColor:"#00A0DC ")
}
standardTile(“open”, “device.door”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘open’, action:“door control.open”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening%201.png ”
}
standardTile(“close”, “device.door”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘close’, action:“door control.close”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing%201.png ”
}
main “toggle”
details([“toggle”, “open”, “close”])
pmjoen
(Patrick Mjoen)
August 23, 2019, 12:57pm
66
Stills00:
tiles {
standardTile(“toggle”, “device.door”, width: 2, height: 2, canChangeIcon: true) {
state(“closed”, label:’{name}‘, action:“door control.open”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closed.png ”, backgroundColor:“#00A0DC ”, nextState:“opening”) state(“open”, label:’{name}’, action:“door control.close”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Open.png” , backgroundColor:“#e86d13 ”, nextState:“closing”)
state(“opening”, label:’{name}‘, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening.png ”, backgroundColor:“#e86d13 ”) state(“closing”, label:’{name}’, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing.png ”, backgroundColor:“#00A0DC ”)
}
standardTile(“open”, “device.door”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘open’, action:“door control.open”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening%201.png”
}
standardTile(“close”, “device.door”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘close’, action:“door control.close”, icon:“https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing%201.png”
}
main “toggle”
details([“toggle”, “open”, “close”])
That looks right, is it still not displaying properly?
Stills00
(Ben)
August 23, 2019, 2:27pm
67
I ended up changing the size and color of the icon so that it fit inside of the circle but it is still a toggle circle.
fieldsjm
(Jon)
August 23, 2019, 5:30pm
68
Glad you got this to work. To get rid of the circle in the toggle, add the decoration: “flat” to the toggle line of code as well.
Stills00:
tiles {
standardTile(“toggle”, “device.door”, width: 2, height: 2, canChangeIcon: true) {
state(“closed”, label:’{name}', action:“door control.open”…
becomes
tiles {
standardTile(“toggle”, “device.door”, width: 2, height: 2, canChangeIcon: true, decoration: “flat”) {
state(“closed”, label:’{name}', action:“door control.open”…
I think the icons look great, personally, to give yourself more room, I would increase the toggle tile size and push the other tiles below. I played around with it and got:
1 Like
fieldsjm
(Jon)
August 23, 2019, 5:35pm
69
If your interested in the code:
tiles(scale: 2){
standardTile("toggle", "device.door", width: 6, height: 4, canChangeIcon: true, decoration: "flat") {
state("closed", label:'${name}', action: "door control.open", icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closed.png", backgroundColor:"#00A0DC", nextState:"opening")
state("open", label:'${name}', action: "door control.close", icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Open.png", backgroundColor:"#e86d13", nextState:"closing")
state("opening", label:'${name}', icon: "https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening.png", backgroundColor:"#e86d13")
state("closing", label:'${name}', icon: "https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing.png ", backgroundColor:"#00A0DC")
}
standardTile("open", "device.door", inactiveLabel: false, width: 3, height: 2, decoration: "flat") {
state( "default", label:'open', action:"door control.open", icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Opening%201.png")
}
standardTile("close", "device.door", inactiveLabel: false, width: 3, height: 2, decoration: "flat") {
state( "default", label:'close', action:"door control.close", icon:"https://raw.githubusercontent.com/Stills00/SmartThingsPublic/master/Gate%20Closing%201.png")
}
main "toggle"
details(["toggle", "open", "close"])
1 Like
Stills00
(Ben)
August 24, 2019, 1:51am
70
This looks great thanks for posting the updated code I understand now how to do it! Thanks!!
And hopefully you are able to use the images! I also have ones that are grey in color so they don’t stand out so much in the list of you are interested.