Advertisement
dykandDK

HA - YAML - Auto-entities with mushroom templates to show garbage collection sensors

Mar 20th, 2024
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.81 KB | None | 0 0
  1. type: custom:auto-entities
  2. card:
  3.   square: false
  4.   type: grid
  5.   columns: 1
  6. card_param: cards
  7. filter:
  8.   include:
  9.     - entity_id: sensor.affalddk_*
  10.       state: < 35
  11.       options:
  12.         type: custom:mushroom-template-card
  13.         primary: '{{state_attr(entity,''name'') }}'
  14.         icon-type: entity-picture
  15.         picture: '{{ state_attr(entity, ''entity_picture'') }}'
  16.         secondary: |-
  17.           {% set val = states(entity) | int %}
  18.           {% if val > 1 %}
  19.           {{ val }} dage
  20.           {% elif val==1 %}
  21.           1 dag
  22.           {% elif val==0 %}
  23.           I dag
  24.           {% endif %}
  25.         icon: mdi:home
  26.         layout: horizontal
  27.         tap_action:
  28.           action: more-info
  29.   exclude:
  30.     - entity_id: sensor.*naeste_afhentning
  31. sort:
  32.   method: state
  33.   numeric: true
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement