Great question. The general philosophy we follow is to only show ON variants for devices that need to represent some type of ON/OFF state to the user. The obvious cases are ON/OFF relays (and sensors) and dimmer modules/bulbs. Less obvious would be how we show furnace and compressor equipment OFF/ON states when showing a thermostat device.
But for, say, just a temperature sensor that has a numerical value we always show those as just a gray thermometer icon. We don't currently do this, but I could see using the ON (colored) thermometer icon if it was a temperature sensor that also had some out-of-bounds reporting (like freezing).
The idea behind all this is to reserve the color versions of the icons for instances where you want to draw the users attention to that device in order to indicate that it is ON, tripped, opened, etc. A sensor device reporting just a temperature value wouldn't qualify for that.
As for reporting error cases, if you aren't already then you should set the error state for the devices if that particular device isn't working (couldn't be updated because of a failed request, etc.) via something like:
- Code: Select all
dev.setErrorStateOnServer(u"request failed")
That will show the device in red in the UI which is what we do for most (but not all yet) of Indigo's device to indicate something isn't working right. Internally we probably don't call that method enough, so some of our plugins/devices may not reflect the desired behavior of showing red in all cases where something failed for that device.
In summary:
- normal/off (grayscale) icon: indicates device is working correctly and is in the OFF/closed/etc state if it has states.
- on (colored) icon: indicates device/sensor is in the ON/opened/tripped/etc. state.
- error state (icon will be shown invisible or disable and device name text in red): something isn't working with device or plugin is disabled/not started yet.
- disabled state (icon and device name rendered using disable appearance): when a device has communication disabled (all my holiday lights modules are in this state, for example, since it isn't the season).