I cannot find out, when I select the Active Color Attribute in a HERO tile, what is it looking for to determine active/inactive? I have a TimedSession device which is a count-down timer. This is implemented as a sensor, since it is not an actuator device. Anyways, my primary, secondary, and icon attributes work great, but I cannot figure out what type of data and values are expected in this attribute.
At this point in time, the active coloring applies to a subset of core attributes defined by official SmartThings capabilities.
It looks like TimedSession has the states of canceled, paused, running, and stoppedā¦ and looking at the only device handler I could find in the SmartThings repository, it looks like we could add running as an active state for this device. Iāll add it to the hit list.
Edit: It looks like the specific device handler I linked to also maps the status to a switch attribute. Depending on what device handler you are using, you might just be able to use the switch attribute for the color.
In the meantime, hereās what states currently trigger active status.
My device in Hubitat is a sensor, which is what I think it should be. When the timer expires, it triggers a pushbutton event, as a 1-button push button controller. The idea being that this is not an actuator of any device. If the active state can be linked to ārunningā for the for the sessionStatus attribute, that would be awesome. I did try to use the switch attribute of āonā and āoffā but it appears that your system will only interpret the values on/off if the device implements the switch capability ā simply exposing a āswitchā attribute with the on/off values and assigning the active color attribute to āswitchā does not seem to work.
Because turning the device on or off from rules would have zero impact without first having had set the timeout value, I donāt want to make this an actual switch. I donāt want to make this a hacked solution. As it is now, it adheres to the spec, and I am okay with extra attributes, I just donāt want capabilities added simply as a matter of a hack to make it work if I can avoid it.
I changed my device to support capability contact sensor as a test. I set the contact state to open/closed and when rendered as a Contact SeƱor, the color changes, but when rendered as a HERO tile, it is ignored. Possible bug?
Can you share the code? If itās not public code, at least via PM so I can take a closer look?
ā
Edit: Regarding including the switch as a capabilityā¦ the only official device handler from SmartThings (in GitHub) which implements the TimedSession capability also implements the Switch capability.
Since the TimedSession capability implements start() and stop() methods, the switch has some pretty direct methods to map to. The Gentle Wakeup device from the SmartThings repo is a good reference on a reasonable mapping:
@Armand_Welsh it looks like the āColorā property of the Hero Attribute is not getting subscribed. Iāve added it to our hit list.
In the meantime, if you edit the Hero Attribute tile and use the switch as a secondary attribute and then save the dashboard, it will setup the subscription as expected. After the subscription is setup, you can remove the switch as a Secondary attribute in the Hero Tile configuration if desired.
Also is there a way to not have the words/title of the attribute come up on the center of the hero tiles and just have the icon instead of both the icon and title come up together.
I donāt believe we currently have a mapping for acceleration for active colors, but Iāve noted the request and will see if we can get it added to an upcoming release.
Not at the moment, but thatās an interesting request. The thought with Hero Attribute tiles was that the attribute would be the āheroā of the tile and thus displayed in the middle.
Can you help me better understand your particular use case? Iām trying to understand how āaccelerationā is being used as a key piece of data on the tile as itās usually only something thatās active for a very brief period of time. Looking at the DTH, perhaps itās just using āaccelerationā as a proxy for indicating that power is being consumed by an attached device (since the standard states are āactiveā and āinactiveā and seem to read well for that purpose)?
@josh Iām using the plug with my electric car charger. I thought the acceleration attribute was weird as well but have found out the in the ST app there was an action to show inactive when power is below X. So since the charger uses about 2 watts of power when plugged in and not charging I put in to show inactive when there is 3 watts or lower. Iām using this tile to show that the car is charging and that everything is working. I would like to know this by just looking over at tablet and seeing the tile color different.
I am trying to apply active color attribute to Hubitat Virtual Thermostats. I set it to Thermostat Mode which is Heat, Cool, Off, etc.
I turned on active color attribute for the thermostat is in heat mode and it displayed blue. So not sure exactly what it is looking at and why it chose blue?
Reading this I am guessing that this will not do anything at this point as the attributes need to be turned on in the backend in Sharptools?
Just curious whether it wouldnāt make sense to allow configuration on the front end where we could specify the value and the color?
The attribute thermostatMode is considered active when it contains one of the following strings:
'auto', 'cool', 'heat', 'emergencyHeat'
Itās based on whatever styles are applied. By default it will use the āactiveā style from your Theme (the default active style for a new theme is blue).
Or if an active style is explicitly set within the Tile settings, it will use that.
(And if itās a legacy dashboard with an active color set in the dashboard settings, it will use that.)
Thereās a feature request open for it which you can vote on in the following thread. Itās one of the top requested features at this point, so itās likely to be on our short-list soon: