Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons in Table #128

Open
BenJewell opened this issue Jan 30, 2024 · 6 comments
Open

Buttons in Table #128

BenJewell opened this issue Jan 30, 2024 · 6 comments

Comments

@BenJewell
Copy link

One big thing that is seemingly missing (unless I am missing something?) is having a button or similar entity in a table. I can make the table show the name or state of the button, but not the clickable button itself.

@paulbusse
Copy link

+1 on this one
I have a couple of use cases for this:

  • Managing inventories (consume a bottle of wine, ...)
  • I have this custom component that connects to a library system and allows you to extend books

So having a table where you can connect actions to a column should be nice.

@BenJewell
Copy link
Author

+1 on this one I have a couple of use cases for this:

* Managing inventories (consume a bottle of wine, ...)

* I have this custom component that connects to a library system and allows you to extend books

So having a table where you can connect actions to a column should be nice.

I ended up using the multiple entity row card instead, to do this instead. Here's an example that allows changing the temperature in different modes and different rooms
Screenshot_20241205-094007

@EdLeckert
Copy link
Contributor

EdLeckert commented Dec 5, 2024

  • Managing inventories (consume a bottle of wine, ...)

@paulbusse: If you don't mind me asking, what do you use for your wine inventory and how would you integrate with it to "consume a bottle"?

@paulbusse
Copy link

@EdLeckert: I use grocy. It just manages the number of bottles. I only have 10-15 different wines in stock (max 200 bottles) But the inventory is all I need. I know which wines I have.
I use grocy only for things that we consume over longer periods of time, things we buy in bulk (like wine).

Buying I typically do in the Grocy web interface on my PC

I would create a table like

wine # Consume Add
"name of wine" "nr in stock" "buy icon" "consume icon"
"name of wine" "nr in stock" "buy icon" "consume icon"
"name of wine" "nr in stock" "buy icon" "consume icon"

Using the grocy custom component, I would link the calls below to a click on the column.

  • grocy.consume_product_from_stock
  • grocy.add_product_to_stock

The buy icon and consume icon could be any fixed text/icon.

There are other use cases I can see as well:

  • There is an integration with the Belgian library system that allows to extend book loans
  • as this component allows to make a table of all smoke detectors, with a button to shut them down
  • and I run fail2ban, where I want to be able to unban certain IPs.

@EdLeckert
Copy link
Contributor

@paulbusse: I was just curious if you used CellarTracker. It's a nice system, but has a limited API...basically only intended for backups, though there are HA integrations that use it to provide a detailed inventory.

@paulbusse
Copy link

@EdLeckert The only thing I store is a URL to a description of the wine.

@BenJewell: The information I'm talking about is coming into HA as a list in an attribute.
I've thought about entities, but that means that I have to create and entity for every wine (Which I could automatically by going through MQTT or using the HA API). But it is messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants