Item counter on Dashboard possible?

Hey Guys, longtime not seen.

I have a new challenge for you pros out there.

I want to show an Item list with essential household stuff on it and how many items I have. You know, stuff like how many rolls of garbage bags do I have in stock aso.

I imaging a fixed text with up down arrow to shift the numbers. Any apps for that or RM ideas?

Thanks

Depending on how sophisticated you want to get, this sounds do-able with Rule Machine and a couple virtual devices or just Rule Machine with a global variable and a connector. Here's what I'm thinking:

  1. Create a virtual device to display the value/number on the Dashboard. There are a lot of ways you can do this, but an easy, built-in way is a Virtual Dimmer (using the level attribute if you plan on values <= 100) or a Virtual Omni Sensor (using the variable attribute--a string you can set to whatever you want). You could call this device something like "Garbage Bag Count." Alternatively, create a global "Garbage Bag Count" number variable in Rule Machine, and create a Global Variable Connector to get something usable on the Dashboard.
  2. Create two virtual buttons: maybe one called something like "Increment Garbage Bag Count" and another called "Decrement Garbage Bag Count." Set the "Number of Buttons" on both of these to 1 for the sake of simplicity, though anything is really fine. You could also just make one "Garbage Bag Count Adjuster" button and use, say, button 1 pushed for increment and button 2 pushed for decrement. The downside here is you might not like how the name displays on the Dashboard.
  3. Create a Rule (either Button or Button Device would work here; this might be a rare case where Button is better) to handle adjusting your virtual "count" device in response to your virtual button(s). Depending on what you did for step 1, there are a couple different possibilities here:
    • for a virtual dimmer, do an "Adjust level" action and adjust by -1 or 1 to go down or up
    • for virtual omni sensor, I'd probably track the "real" number in a local variable in the rule, increment or decrement this variable based on the button events, then assign this value to the variable attribute of the omni device
    • for the RM global variable with a connector, just adjust the value of the variable directly
  4. On the Dashboard side, create a tile for either your virtual "count" device or global variable connector with the appropriate template. For the increment/decrement buttons, use the Button template and the appropriate button number when prompted/

If you go the global variable + connector route, you might not need step 2 or 3 at all, but doing so provides a convenient way to tap a big button and increment or decrement the value. Also, I'm not sure how familiar you are with RM or virtual devices, so if I should have explained anything above in better detail, let me know!

Note that I have never actually done anything like this, so this is is just me imagining a few ways this could be done. Others may have better/easier ideas or more practical things they've done in real life. (The all-virtual-devices idea was the first one that popped into my head, but global variables and connectors are newer and might be a better idea here. Oh, and if you want to customize a Dashboard label, check out Smartly--might be more than you really need here, but I think it could address that need, and there's little harm in trying it out; back up your "old" dashboard JSON before for an easy way to go back if you don't like it.)

2 Likes

Thanks Bert, though it will be something like that.
It seems it isn't tha big of a deal... I try it later today.

If I can do it i will finally give up and do a apartment dashboard on a e ink display.

I report back.