I created a decent looking printer ink status using a custom button-card and the IPP integration sensors that seems worth sharing.
To make this work, I have a template for each inkwell, and a main button-card to contain all the inkwells and show current printer status.
The inkwell template handles the ink level display, and will flash when below 10% to catch your attention. It expects an entity for the ink sensor and a color to show.
This uses the custom button card, which is installable via HACS, or can be installed manually. That card supports templating itself, rather than being a Lovelace feature. It’s a very powerful card. I have been able to make some really nice dashboards with it. I highly recommend reading the documentation at that link and experimenting with it.
I’m assuming the line through your question means you figured it out, but for the benefit of anyone else wondering how to do that:
in custom_fields add another custom field for the extra ink type (simply copy one of the existing and change the custom field name, color variable and entity appropriately, for example k: to k2:)
do the same in the styles:custom_fields: to copy the style
add your custom field name to the grid-template-areas value in the1st row, and add another s to the 2nd row to balance the columns
example: '"i c m y k k2" "n s s s s s"'
Thank you for very good post. Really usefull!
I am currently reading the documentatin on custom button card but can you describe the implemantation of the button card template? Not really clear for me.
The button card templates need to go in your raw dashboard config, typically at the top. If you use the UI to design your dashboards, first get into edit mode in the UI, then click the same 3-dot menu icon again and choose Raw configuration editor. I usually put it right below the title property. Just add a new property button_card_templates: and below it you define your named templates.
You define the template the same as you would if you were using the element in your dashboard, but you leave out the settings that would change (like entity). Then, when you use a custom button card in your dashboard you simply refer to your template by name in the template setting and add the unique settings for that button.
Hopefully that is helpful. I remember when I was getting it figured out I was a bit confused where to put the templates as well.
I meant the icon on your ink color. It’s different than the standard water droplet icon that I’m getting on my ink level sensors. Your icon looks more like an ink jet and I like it.
It looks good in that arrangement
It occurs to me that the black ink icon and label could use a gray drop-shadow so it is visible when the ink is full. Perhaps a gray shadow would look good for all the colors. My black ink has been nearly empty for a long time, so I hadn’t noticed that before.