Disane87 / spoolman-homeassistant

Spoolman home assistant integration 🏠
MIT License
59 stars 4 forks source link

Do you have an example of a nice map proposed for the dashboard? #62

Closed Disane87 closed 9 months ago

Disane87 commented 11 months ago
          Do you have an example of a nice map proposed for the dashboard?

Originally posted by @Eloura74 in https://github.com/Disane87/spoolman-homeassistant/issues/61#issuecomment-1827637967

Disane87 commented 11 months ago

You can use the default entities card for this: image

Or auto-entities-card for getting all entities by this integration dynamically: https://github.com/thomasloven/lovelace-auto-entities

And some mushroom-entity cards for example. https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/entity.md

I've created a simple card utilizing mushroom-template-card and auto-entities to dynamically show all spools:

type: custom:auto-entities
filter:
  include:
    - integration: '*spoolman*'
      options:
        type: custom:mushroom-template-card
        vertical: false
        icon_color: >- 
          #{{ state_attr(entity, 'filament_color_hex') }}
        icon: 'mdi:printer-3d'
        primary: >- 
          {{ state_attr(entity, 'filament_name') }}
        secondary:  >- 
          {{ (state_attr(entity, 'remaining_weight')/ 1000 | float)  | round(1) }} kg

sort:
  method: state
  reverse: true
card:
  type: grid
  columns: 2
  square: false
card_param: cards

image

It's pretty neat. I think I gonna document this in the readme.

Disane87 commented 11 months ago

:tada: This issue has been resolved in version 0.2.2-dev.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

pdsccode commented 10 months ago

Just for info as I struggled a bit implementing the suggested card:

I like to sort them properly by remaining weight so I added a 'numeric: true' to the sorting options:

sort:
  method: state
  reverse: true
Disane87 commented 8 months ago

:tada: This issue has been resolved in version 0.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: