[RELEASE] Tile Master - Display multiple devices that can be Controlled from the tile!

Follow-up question: I'd like to assign a series of icons to my Thermostat's thermostatOperatingState property. From what I can tell this enum has 5 values: heating, heat pending, idle, cool pending, and cooling. However, when I select this attribute and then select the option to use icons in place of displaying the value, it only gives me an option for two icons. Is this a limitation of TM or did I mess up somehow?

New version on GitHub...
2.4.9 - 12/02/20 - Added current mode wildcard

Yes, there are only two icon options per device. This won't change, sorry.

1 Like

I'm speachless at your response time... WOW! Thanks for the mode wildcard... it works well. Too bad about the icon limitation... looks like I'll have to get creative. If I think of something I'll be sure to post the solution.

1 Like

OK I cobbled together a solution that gets me 1 extra icon. Read on if you care to see how a novice got the job done... I've hidden the solution so it won't bore everyone to death.

Summary

TM2 allows 3 icons for numeric-valued properties, so I took a copy of @bravenel 's code that converts a contact sensor to a motion sensor and modified it to parse the thermostatOperatingState enum from a thermostat and assign a numeric value, which I then store in a virtual temperature sensor. Here's how it operates:

  1. create a virtual temperature sensor as an integer storage device
  2. subscribe to the thermostatOperatingState of a thermostat device and parse the enum into bins:
    a) "cooling" and "pending cool" are assigned a value of 0
    b) "idle", "fan only", and "vent economizer" are assigned a value of 2
    c) "heating" and "pending heat" are assigned a value of 4
  3. When setting up my tile in TM2, I select the virtual temperature sensor and not the thermostat device. This lets me flip the switch to get the 3rd icon, since the only available property (temperature) is numeric.
  4. I set a "low" threshold of 1 and a "high" threshold of 3, and then assign icons for cooling, fan/idle, and heating.
  5. Profit!

Code is here. I make no guarantees it'll be interesting or useful to anyone but me... however, if you're looking for a way to get Tile Master to select between 3 icons based on an enum-typed device property, this is one way to go.

Here's the tile I created. It shows hub mode, thermostat mode (heating or cooling), current thermostat activity (3 values: "heating," "idle," and "cooling"), and the state of an Ecolink contact sensor I've converted into a power monitoring device.
combo_tile

The other two icons for the activity column:
heating cooling

Cheers!

3 Likes

forgive me but I'm clueless. I tried doing some cursory searches but got nothing to show me how to do this.

So loaded up Tile Master app parent+child+drvr.

GOAL: I want to do exactly what @JasonJoel achieved. Not sure what he had as his sensor but I have the Xiaomi Temperature Humidity working well but want this same tile he created:
Screenshot 2019-09-21 at 8.54.59 AM

Could I ask this noobie a howto simple step by step guide? I feel like an fool since I code as a living. So weird I just can't get a grip on this. In the meantime, I'll keep RTFM but if someone could point me to get me started doing this exact thing would be awesome and could bring you mucho karma :wink:

I will pay it forward by posting a howto once I get my tiles to not look like someone dropped a pizza on the floor :slight_smile:

Hi @bptworld !

I´ve developed a rudimentary "file driver" ...

It has some limitations, of course, but I think it may help you with reading and writing files.

Take a look. Maybe it is useful for you.

Marco

Think I found a bug.

I'm trying to display the level attribute of a Virtual Dimmer. In the dashboard, the level on the tile does not update. The switch (on/off) attribute does behave normally. When the dimmer is on and I click on the Child App it throws this:

Error: No signature of method: java.math.BigDecimal.toLowerCase() is applicable for argument types: () values: []

Logs show this - [error] groovy.lang.MissingMethodException: No signature of method: java.math.BigDecimal.toLowerCase() is applicable for argument types: () values: [] on line 2172 (tileHandler)

If I turn the dimmer off, the child app loads normally.

@jaredhouck

Check your setting - 'Is device value Text or Numbers'. You most likely have it set wrong. I added more error catching to warn about this.


New version...
2.5.0 - 12/06/20 - Added more error catching

That was it! I think what threw me is that I didn't get that setting until I picked - Use Custom Colors on Device Value - which I'm not doing.

Thank you!!

1 Like

Need some guidance. I'm trying to reduce the distance between lines. Note in my picture below the Guest Bath Fan tile on the right -> the gap between "off" (first line) and "0min m 58%" (second line). I've adjusted the justifications on both lines and font sizes all over the place. I can't figure it out.

Fan tiles

I tried putting the small "m" up in the top left corner on the first line (because I really like how the Master Bath Fan tile looks = single line) , but I still had the huge space between the lines.

Appreciate any help!

So i'm trying to do a forecast tile. First reiteration of such tile came out great but then i got greedy and wanted to use more lines.
Well if you look at the first picture you will see the information and its formatting. No problem there unless i'm missing something? Problem is in the second picture

Now for some reason the text gets jumbled that the start is somewhere at the bottom????

How can i solve this? tried deleting and creating another tile from scratch with the same results?

Pretty sure it's the comma causing havoc. Adjusted the code to replace any comma found in the value with a period. See if it helps.

2.5.1 - 12/20/20 - Adjustments to device value

1 Like

Of course now any forecast doesn't have a comma in them. will keep an eye for it when it updates tonight.

1 Like

NOPE made it worse.


I added today's forecast and the variable for date if that makes any difference?

Screenshot please

:point_up:t4::point_up:t4::point_up:t4::point_up:t4:

1 Like

New to HE, just finished port from ST mostly went well. I have played with Tile Master and it has some nice needed features, great job.

I keep running out of space when creating tiles. I understand that if I used Bitly my space usage would go down. My question is to use Bitly do you need the internet? I have searched for the answer and it seem like yes, however I have not seen a direct answer to this question.

Another question is if maker api uses the internet?

Welcome to Hubitat!

yes

Depends on what you are doing with it. It can be used internal or external. Best to ask that in a Maker API thread.

Tnx for fast response. If I wanted to reduce size, are there other techniques without needing to be online?

Right now I am just trying to create a single tile that shows status and can be controlled for 8 or so switches. I run out of room after two. I am currently not using icons but would like to do so. Can stuff be stored locally to reduce the url length? I am already using global etc.