[smartly] color changing tiles - Now in Celsius

Soon smartly will be releasing a mod with the ability to enable a color changing background based on a tiles value. This will be available for Temperature, Humidity, and Battery tiles at first. Below are samples as well as questions about what you would like to see in this upcoming mod.

Battery

Battery tiles will start out Green and then change to Yellow and then Red as they drain. There has been some debate about when color changes should occur. So we are opening that up to public input. Vote below!

When you do you think the color should change from Green to Yellow?

  • 40%
  • 35%
  • 30%
  • 25%

0 voters

When do you think the color should change from Yellow to Red?

  • 20%
  • 15%
  • 10%

0 voters


Humidity

Humidity color changes will occur every 5-10% points. Below is a chart of what it will look like


Temperature

This has only been done for Fahrenheit. If anyone wants to help convert this to Celsius PM me.
BIG THANKS to @ulmeistern for helping us with this.

Celsius temperature chart

Fahrenheit temperature color chart

Sensor Reading Note - the coding for this is lengthy, and could only be done out to the tenth of a degree. If your sensors read to the hundredth it will need to be adjusted to work with this mod (see below). We recommend using @Cobra's Average All. This app will allow you to easily create a virtual sensor using only 1 decimal.

Far left sensor reading not supported.

I found a few post mentioning this/similar requests so @janzilverstone @anon61068208 @troper @JohnRob @peterbrown77.pb

Thanks to all for your support in smartly. We look forward to hearing your thoughts on this upcoming mod.

12 Likes

This is awesome

1 Like

Hi,

One of the things I've learned about battery devices is they are all different. Even devices of the same brand/model. To aggravate the issue even more, some batteries are reported as %age and some in voltage. I don't know if it's possible or practical but each device likely needs its own trippoint.

If your sensors read to the hundredth it will
You can ignore the last two digits. Just because a sensor "reads" to 0.01 it doesn't mean the accuracy supports its existence.

2 Likes

This is very nice...

1 Like

Understood. This variable color coding, when enabled will be applied based on numeric value. This means if you have battery tiles that display voltage values instead of percentage, they will show the default battery tile color if the value displays more than 1 decimal place (i.e. 4.02 [volts]). If it displays 1 or less decimal points, it'll probably show red as it would be under the lowest "red" threshold. any decimal value.

edit above: @TechMedX just pointed out that battery color coding is done per whole number, so any decimal used in the battery tile value would revert to default battery tile color for that particular tile.

1 Like

Understood. This variable color coding, when enabled will be applied based on numeric value. This means if you have battery tiles that display voltage values instead of percentage, they will show the default battery tile color if the value displays more than 1 decimal place (i.e. 4.02 [volts]). If it displays 1 or less decimal points, it'll probably show red as it would be under the lowest "red" threshold.

But the question was when should the tile color change. So I believe each devices needs its own threshold.

John

1 Like

I would actually consider shifting the red and yellow cut points up for battery devices even more than what the poll suggested.

I have found that the coin cell and other 3v batteries that most smart devices take are kinda unreliable. So if I see a battery go below, say, 70% sometimes, I might change it soon regardless of what the next reading is (sometimes there isn’t one).

2 Likes

That's not going to happen without a JS solution. Are you sure there are battery tiles that output voltage? That sounds more like an attribute tile showing a 'battery' attribute. I mean no offense, I've just never seen a voltage on an actual battery type tile.

Edit for clarity on the limitations: this mod is HE JSON colorTemplate based, utilizing native HE dashboard functionality, albeit not available in the HE dashboard UI. For this reason, without JS, this sort of thing is not possible per-tile. It's per tile-type.

Edit edit: this is be possible with a technique I've developed but haven't released yet.

1 Like

Both @marktheknife @JohnRob have understandable points. I appreciate your input. However device specific templates are not available to my knowledge (nor would I want to code it, or know anything of this JS character mentioned :wink: ).

Also consider, just because a device has trouble operating below a certain battery threshold, does that mean the battery is no good? Maybe instead of replacement, the battery should be repurposed to a less energy dependent sensor.

IMO, that task would be better left to one of the many notifier apps, than a global dashboard mod.

I will go a different way with this.

I have the same observation as @JohnRob, all devices seem to be unique. Two of the same device may vary. 2.8V means one thing on one brand, and something totally different on another.

If the devices are arbitrary, why not make the tiles also be arbitrary? The battery voltages are more of a suggestion than anything.

I would make some arbitrary cutoffs, and just stick with it. You are never going to get every device correct no matter how you try.

2 Likes

I feel like I'm replying to something completely different than what was written before, but going to run with this.

This 'mod' will only support % based battery value tiles, globally, using a single set of color thresholds. Initially, it'll be predetermined.. eventually I see it having those global threshold values settable in the interface. If this mod doesn't work for whatever devices you have, then don't enable it. (not directed at neonturbo!)

I totally get there's a conversation to be had about what this feature should be, but it straight up isn't configurable per-tile because of a limitation with HE. There is a way I've developed, but it's not going to be baked in for some time.

Note: @markus's JSInject platform is always available to develop exactly what it should be.

3 Likes

Agreed. To add to the mix, my front door hinge sensor battery level goes up and down 30% hour by hour. will I jump out of my chair to change it when I see the tile turn yellow? no. Very good point to make that different devices have different levels of cruciality when it comes to battery levels, very good point. I haven't heard a peep from my schlage locks since they dipped below 70%. I'd love to have it show red at 75% in that case.

This smartly dashboard mod, however, will not do that.

The honest truth is a version of this battery color coding is already baked into the smartly-base skin and included in each update. I think it's something like 1-14% is red, 15 is orange,, 16+ green. This is really a good opportunity to come up with the global thresholds that we'll start with. Down the road, they will be configurable globally.

3 Likes

@marktheknife @JohnRob @neonturbo If one was so inclined, the JSON could be edited PER DASH to display different thresholds. These options could also be built into smartly as a separate 'select-able' mod for "high energy devices" or what you wanna call it.

If the consensus is for a separate "High energy" mod for certain devices, I am happy to setup a poll (or you can) for those options, and code a separate 'mod' for the results. These 'mods' would only be usable 1 per dash.

2 Likes

I would be concerned if it gets too complex it will only be useful for a small number of folks.

Honestly for battery state I put my money on @bptworld Device Watcher. While in theory DW could leave my vulnerable for up to 24 hours (my current setting) its reliability is worth the risk.

But just as a idea, could the threshold use a global variable to trigger? If so could each unit have its own GV?

John

@JohnRob doubtful. Here is what it takes.

{
  "template": "battery",
  "bgColor": "rgba(0,255,105,0.75)",
  "iconColor": "rgba(0,0,0,0.66)",
  "state": "57"
},

Each value is a separate entry with separate "state" value. I do not think there is a tile for GV and thus no state to target.

As for @bptworld's Device Watchdog. I use it too. Just setup a virtual switch. Tie that to the report you wanna run. Setup a RM rule to trigger the switch "on" every so often to push the report. I do my lock every 5 minutes with this.

Awesome stuff - thanks.

Will look into this and give it a go ...

/jan

1 Like

10% is making a surprising come back!

I'm going to close the voting tomorrow afternoon so I can complete the code changes.

Just my $0.02.

Green > 80%
Yellow < 80% but >= 60%
Orange <=60% but >= 20%
Red < 20%

1 Like

At the last minute he slides in a new color group! Nicely done. I actually kinda like the idea, maybe in a future smartly release.

For now I have good news.

@spelcheck has redesigned smartly to make it even more flexible. We now have the ability to include these as options not just a one way solution! A smartly release soon will include the ability to select these thresholds as options, and smartly will apply the correct code accordingly. This will be a selectable option per dashboard, with the all icons on that dashboard having the same thresholds.

Green will begin at 100, and go until 71, or 41 .

Yellow will begin at 70, or 40, and go until 41, 16, or 11.

Red will begin at 40, 15, or 10, and go until 0.

While no solution will ever make everyone happy all the time, we hope you enjoy the options we will soon provide. @JohnRob @marktheknife @neonturbo @Angus_M @magasser

We are also always looking to new ideas to improve smartly so keep them coming (and now I need to find a good Orange!) @aaron

5 Likes

Big THANKS to @ulmeistern for the help converting this to Celsius.

smartly will soon release both versions for use.

3 Likes