Advertisement
fablav

Auto entity light

Apr 28th, 2024
770
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.52 KB | Software | 0 0
  1. type: custom:auto-entities
  2. card:
  3.   type: grid
  4.   title: Luci accese
  5.   columns: 2
  6.   square: false
  7. card_param: cards
  8. filter:
  9.   template: >-
  10.     {%- for s in expand(states.light.luci)|selectattr('state','eq','on') if
  11.     s.state == 'on' -%}
  12.       {{
  13.         {
  14.           'type': 'custom:button-card',
  15.           'entity': s.entity_id,
  16.           'template': 'light_button_mini',
  17.           'label': s.name,
  18.           'name': ' '
  19.        
  20.         }
  21.       }},
  22.     {%- endfor %}
  23. sort:
  24.   method: state
  25.   numeric: true
  26.  
Tags: ha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement