Adding Icons where none is available


(Joel W) #1

I have a few devices that there are no icons in the IOS app and would like to be able to have them. One Device is my Honeywell Thermostat, my SmartThings Temp/Humidity Sensor, SmartWeather and my IRIS Keypad. I was surprised that the two devices types from SmartThings doesn’t have them. The IRIS keypad I can understand.


#2

Hi @joelw135, do mean there’s no icon when looking at your devices in the Things view or Rooms, like this:

If so, it’s all in how the DH was written and what’s used as the default tile. For the thermo and temp/humidity sensor, Temperature is the default, so you’ll see the value off to the right and no image to the left because the DH doesn’t use an image for that tile (just a value).

If I edit the DH for the thermostat in the example I provided above, and include an image along with the value, here’s how it changes:


(Joel W) #3

Exactly most of my devices run locally, so changing the DH means custom and not run locally, So in that case I will leave it alone. I had changed the garage SmartThings Open/Close sensor to have garage door icons and submitted it but it was rejected. So I continued to use the standard DTH. Thanks for all the help.


#4

Im not a coder, but is it possible to add this code easily to a DTH? I would like to add icons to some multi sensors and a thermostat. I understand if it’s too much trouble if the code has to be customized for each type of DTH. I can live without it. I just wish there was an easier way to add icons to devices where I can simply browse to my icon on my phone. There are a few DTHs that will allow you to do just that.


(Joel W) #5

Most devices allow this, but I was very surprised when SmartThings native temp/humidity sensor doesn’t as it uses a value. But should have a way to do it.


(Robin) #6

I found this annoying to… Some DH’s allow change icon some don’t.

I recently discovered that some DH’s allow an image / photo instead of just one of the Smartthings standard icons… I much prefer this as it allows me (and more importantly my wife) to visualise each light fitting.

Images are standard for the defult presence sensor DH but not much else.

This option can be turned on by adding the following code to the main tile on each DH:

canChangeBackground: true

For example:

standardTile(“switch”, “device.switch”, width: 1, height: 1, canChangeIcon: false, canChangeBackground: true) {

Or

multiAttributeTile(name:“switch”, type: “lighting”, width: 6, height: 4, canChangeIcon: false, inactiveLabel: true, canChangeBackground: true){

If you just want to turn on the change icon option then add / edit the following code instead:

canChangeIcon: true

If either canChangeIcon Or canChangeBackground are not stated in your code, Smartthings will defult to ‘false’ and neither option will show in the device preferences page.

Obviously running custom DH’s prevent local running but, especially with recent platform improvements, I have never found this to be a problem. I have also never known my ISP connection to fail so I’m fairly confident with the cloud right now.


PETITION: ST please add ability to upload/use your own icons for devices!
More Icons or import them
Outdoor Sirens for UK? (2018)
How do you organize your devices? Naming conventions? (2018)
Unable to set the device image, please try again
[DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons
Import custom icons for device handlers tiles
Can we get some new icons ...?
[RELEASE] Fibaro FGS-213 Single Switch 2 (not 223)
iOS 2.4.0 - Release Notes
(Joel W) #7

Yes I knew that, but I want to run local as many of my devices as possible. For me Local is very important, maybe not for others. But a ggod thing you posted this as many others might want to do it.


#8

It’s not too difficult, and in some cases like the humidity/temp sensor, it’s just a matter of changing what the default tile is to get an icon to show up. That’s what I did for the humidity sensor where I made humidity the default instead of temp. The example @RobinWinbourne gave is exactly what I would have said as well, and I typically include that in the DH’s I create.

I was once in the same boat, but as more SmartApps like CoRE came along, more usage of non-ST devices (like vents, valves, and metering devices), and realizing that only a couple ST built-in SmartApps run local; I gave up on worrying about keeping things local. The promise of what “local” meant to me (and others) has yet to meet my expectations of what ST’s marketing made it out to be long ago.


(Robin) #9

Another point of note that may help some; is that you can switch to a custom DH, change the icon / image and then switch back to a standard locally running DH, Smartthings remembers the selected image.

Most standard DH’s already allow for ‘canChangeIcon’ but not ‘canChangeBackground’ (image), so the above method comes in handy for anyone wanting to use images whilst still keeping things local.

As noted in the other comments though, this won’t work for DH’s that use a value (thermostats) or toggle between icons (contact sensors). These DH’s change the icon back the moment they are loaded.

All I can reccomend is asking support to update their DH’s on the backend, but I wouldn’t hold my breath!

It’s a shame we can’t choose between photos / icons at will, separate from the DH… I’ve always thought the ST UI was lacking in that respect!


(Gene Clark) #10

My apologies if this isn’t the best place to ask this question but what’s the difference between the standard tile and the multi attribute tile?


(Robin) #11

Standard tile displays 1 thing.

Multi attribute tile displays lots of things.

http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html