thomasloven / lovelace-badge-card

🔹 Place badges anywhere in the lovelace layout
MIT License
82 stars 13 forks source link

FR: add columns option #9

Open Mariusthvdb opened 2 years ago

Mariusthvdb commented 2 years ago

please consider adding a columns option (as on glance or grid) so we can do:L

- type: custom:badge-card
  columns: 5
  badges:
    - sensor.1_badge
    - sensor.2_badge
    - sensor.3_badge
    - sensor.4_badge
    - sensor.5_badge
    - sensor.6_badge
    - sensor.7_badge
    - sensor.8_badge
    - sensor.9_badge
    - sensor.10_badge

instead of:

entities:
  - type: custom:badge-card
    badges:
      - sensor.1_badge
      - sensor.2_badge
      - sensor.3_badge
      - sensor.4_badge
      - sensor.5_badge
  - type: custom:badge-card
    badges:
      - sensor.6_badge
      - sensor.7_badge
      - sensor.8_badge
      - sensor.9_badge
      - sensor.10_badge

thanks!

Mariusthvdb commented 3 months ago

given the new 2024.8 (!) badges, please reconsider this FR, it has become even more desirable to be able to do that.

see

type: custom:badge-card
badges:
  - entity: binary_sensor.donker_buiten
  - entity: sensor.buienradar_temperature
  - entity: sensor.buienradar_barometer
  - entity: sun.sun

and the result:

Scherm­afbeelding 2024-08-01 om 11 57 39

Aware this has been somewhat neglected lately... but, given the new life for badges in modern HA and still not being able to place them anywhere but at the top of the views, I hope you will revisit this once more.

related HA documentation: https://rc.home-assistant.io/dashboards/badges/

this is a modern days replacement of the entities option in the OP

type: grid
square: false
columns: 4
cards:
  - type: custom:badge-card
    badges:
      - entity: binary_sensor.donker_buiten
  - type: custom:badge-card
    badges:
      - entity: sensor.buienradar_temperature
  - type: custom:badge-card
    badges:
      - entity: sensor.buienradar_barometer
  - type: custom:badge-card
    badges:
      - entity: sun.sun
Scherm­afbeelding 2024-08-01 om 12 21 11

Thanks!