Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {%- set main_group = "group.alle_rum" %}
- {%- macro glance(group) %}
- type: glance
- show_state: false
- entities:
- {%- for light in expand(group) %}
- {{- entity(light.entity_id, group) }}
- {%- endfor -%}
- {% endmacro %}
- {%- macro entity(light, group) %}
- - entity: {{ light }}
- tap_action:
- action: toggle
- hold_action:
- {{ open_slider(group) }}
- {%- endmacro %}
- {%- macro open_slider(group) -%}
- action: call-service
- service: browser_mod.popup
- service_data:
- title: Indstilling af lys
- style:
- border-radius: 20px
- --ha-card-border-radius: 20px
- card:
- type: entities
- title: {{ state_attr(group,'friendly_name') }}
- show_header_toggle: true
- entities:
- {%- for light in expand(group) %}
- - type: custom:slider-entity-row
- entity: {{ light.entity_id }}
- toggle: true
- {%- endfor %}
- deviceID:
- - this
- {%- endmacro %}
- type: custom:stack-in-card
- cards:
- - type: entities
- entities:
- - input_select.room_light
- - type: custom:state-switch
- entity: input_select.room_light
- states:
- {% for group in state_attr(main_group, 'entity_id') %}
- {{ state_attr(group,'friendly_name') }}:
- {{- glance(group) }}
- {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement