3 or more state virtual "button"?

I have found myself using virtual buttons to monitor and report states for simple applications. For example, “has the mail been delivered today.” The buttons are triggered by rules in CoRE based on acceleration sensors, contact sensors, etc. I think this is a pretty common practice in this community.

I have a few applications where a two-state on/off virtual button is not good enough. I’m looking for a way to do 3-or-more state buttons easily. Here’s an example application.

Our dog eats twice a day, once in the morning, once at night. I’d like to monitor whether or not my daughter has fed the dog. If she hasn’t fed her by 8:30am, send a text. If she hasn’t fed her a second time by 8;30pm, send another text. This is easy enough to do with CoRE but I’d also like a visible state monitor that I can see to know what the state is. This is straightforward to implement with 2, two-state buttons, one for breakfast and one for dinner. But what I really want is a 3-state solution which can be set to “Hungry”, “Breakfast”, and “Dinner” before resetting to “Hungry” at midnight.

I’m curious if anyone has a device handler that implements this kind of multi-state switch as a virtual button or other solution I should consider.

Thanks in advance.

The closest possibility that fits existing SmartThings Capability is setLevel (ie, Dimmer).

Other Capabilities with numeric Attributes could be considered (Temperature,…).

A Button Controller has become de facto a “multi button Thing”, but it still has no Commands.

2 Likes

Hmm, let me rethink this post lol.

A virtual button is still binary.

The virtual garage door has five display states: open, opening, closing, closed, and unknown, and you can set them with a smart app. You can also change the labels.

However, it can’t be toggled manually, so I don’t know if it meets your requirements.

Most people use a virtual thermostat, I think, or a virtual dimmer as @tgauchat mentioned, as they work in a similar way. You have to assign different ranges to equate to different values, but then you have something that you can change manually if you like.

2 Likes

I had to edit my post because I was going suggest that if the OP was using SmartTiles, he can load a static image that rotates based on hunger status but I realized that what I might be suggesting is not supported in the current SmartTiles version.

1 Like

@anon36505037 not yet. Had some unexpected travel pop up and suck my week away. Hoping to play with it some this weekend. Will report back when I do. Thanks!

1 Like

@anon36505037 I’ve got this working now. Thanks for your help. I’ve got several other applications I plan to re-purpose your device handler for. Thank you!

The only thing that I haven’t solved yet is that SmartTiles doesn’t seem to have support for the Door Control or Garage Door Control capabilities so I can’t display this in SmartTiles dashboard. Hopefully this will be solved in ActionTiles.

Tagging @tgauchat

1 Like

Yup… ActionTiles has added Garage Door Tiles.

3 Likes

Ok, I’m looking at this and imagining.
I’m imagining the Favorites section of the mobile app Dashboard.

I’m imagining the Ecobee sensor icons showing Temperature… unless there is motion, at which point they switch to showing Motion! They switch back to showing temperature if either of the following occur:
a) temperature changes
or
b) motion ceases

Is this doable?

Just stumbled on this. I like it.

I would like to have a virtual switch or dimmer and make several different states for a tile button. I want to have different labels for each state to show on the tile, much like the example in this thread. If I use a virtual dimmer, how would I make it so a diff text label would show on the tile for each state. So if the dimmer was a level 1, I would like the tile button to show “ON”. And if dimmer was as level 2, the tile shows “WORKING”. I would like to make maybe 10 diff states. I can see a virtual dimmer working but I am not sure how to make the labels show for the different dimmer levels.

1 Like

ok, that helps on the detail page, can we make that text show on the MAIN button (short words are fine)? AND each word could have ACTION or not. Some words the user could still press the button, other words would be info only, no action.