lovelace: Update for new version of popup-card

This commit is contained in:
Thomas Lovén 2019-03-06 22:19:58 +01:00
parent 8f66f5a5ed
commit 334133f469
2 changed files with 98 additions and 88 deletions

View File

@ -1,97 +1,72 @@
type: vertical-stack type: picture-elements
cards: image: !file /local/images/Bottenvåning.png
- type: picture-elements elements:
image: !file /local/images/Bottenvåning.png
elements:
{% macro lamp(entity, x, y) -%} {% macro lamp(entity, x, y) -%}
- entity: {{entity}} - entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% } style: { left: {{x}}%, top: {{y}}% }
type: state-icon type: state-icon
tap_action: { action: toggle } tap_action: { action: toggle }
{%- endmacro %} {%- endmacro %}
{% macro dimlamp(entity, x, y) -%} {% macro dimlamp(entity, x, y) -%}
- entity: {{entity}} - entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% } style: { left: {{x}}%, top: {{y}}% }
type: state-icon type: state-icon
tap_action: { action: toggle } tap_action: { action: toggle }
hold_action: { action: more-info } hold_action: { action: more-info }
{%- endmacro %} {%- endmacro %}
# Kontoret # Kontoret
{{ dimlamp('light.taklampa_kontoret', 82, 68) }} {{ dimlamp('light.taklampa_kontoret', 82, 68) }}
{{ lamp('light.kontor_fonster', 83, 87) }} {{ lamp('light.kontor_fonster', 83, 87) }}
{{ dimlamp('light.skrivbordslampa_1', 88, 58) }} {{ dimlamp('light.skrivbordslampa_1', 88, 58) }}
# Lilla hallen # Lilla hallen
{{ dimlamp('light.lilla_hallen', 72, 53) }} {{ dimlamp('light.lilla_hallen', 72, 53) }}
# Stora hallen # Stora hallen
{{ dimlamp('light.stora_hallen', 43, 70) }} {{ dimlamp('light.stora_hallen', 43, 70) }}
{{ lamp('light.trappbelysning', 49, 61) }} {{ lamp('light.trappbelysning', 49, 61) }}
# Köket # Köket
{{ dimlamp('light.taklampa_koket', 32, 76) }} {{ dimlamp('light.taklampa_koket', 32, 76) }}
- type: state-icon - type: state-icon
entity: switch.kaffebryggare entity: switch.kaffebryggare
tap_action: { action: toggle } tap_action: { action: toggle }
style: { left: 16%, top: 84% } style: { left: 16%, top: 84% }
# Vardagsrummet # Vardagsrummet
{{ dimlamp('light.vardagsrum', 60, 30) }} {{ dimlamp('light.vardagsrum', 60, 30) }}
{{ dimlamp('light.takflakt', 43, 30) }} {{ dimlamp('light.takflakt', 43, 30) }}
{{ lamp('light.bokhylla', 55, 45) }} {{ lamp('light.bokhylla', 55, 45) }}
{{ lamp('light.deko_vardagsrum', 49, 15) }} {{ lamp('light.deko_vardagsrum', 49, 15) }}
- type: state-label - type: state-label
entity: sensor.vardagsrum_0 entity: sensor.vardagsrum_0
style: { left: 40%, top: 36% } style: { left: 40%, top: 36% }
# Sovrum # Sovrum
{{ dimlamp('light.sovrum', 81, 30) }} {{ dimlamp('light.sovrum', 81, 30) }}
# Tvättstuga # Tvättstuga
{{ lamp('light.skotbord', 21, 15) }} {{ lamp('light.skotbord', 21, 15) }}
- type: state-icon - type: state-icon
entity: switch.ventilation entity: switch.ventilation
tap_action: { action: toggle } tap_action: { action: toggle }
style: { left: 30%, top: 30% } style: { left: 30%, top: 30% }
# Utomhus # Utomhus
{{ dimlamp('light.baksida', 35, 5) }} {{ dimlamp('light.baksida', 35, 5) }}
{{ dimlamp('light.mellangang', 10, 30) }} {{ dimlamp('light.mellangang', 10, 30) }}
{{ dimlamp('light.uppfart', 5, 94) }} {{ dimlamp('light.uppfart', 5, 94) }}
{{ dimlamp('light.entre', 44, 94) }} {{ dimlamp('light.entre', 44, 94) }}
{{ dimlamp('light.fasad_1', 16, 94) }} {{ dimlamp('light.fasad_1', 16, 94) }}
{{ dimlamp('light.fasad_2', 60, 94) }} {{ dimlamp('light.fasad_2', 60, 94) }}
{{ dimlamp('light.fasad_3', 75, 94) }} {{ dimlamp('light.fasad_3', 75, 94) }}
{{ dimlamp('light.fasad_4', 88, 94) }} {{ dimlamp('light.fasad_4', 88, 94) }}
{{ dimlamp('light.fasad_5', 92, 70) }} {{ dimlamp('light.fasad_5', 92, 70) }}
{{ dimlamp('light.fasad_6', 97, 70) }} {{ dimlamp('light.fasad_6', 97, 70) }}
{{ dimlamp('light.fasad_7', 92, 30) }} {{ dimlamp('light.fasad_7', 92, 30) }}
{{ dimlamp('light.fasad_8', 97, 30) }} {{ dimlamp('light.fasad_8', 97, 30) }}
- type: state-label - type: state-label
entity: sensor.elmatare_0 entity: sensor.elmatare_0
style: { left: 5%, top: 55% } style: { left: 5%, top: 55% }
- type: custom:popup-card
entity: light.takflakt
title: Takfläkt
card:
type: entities
entities:
- type: custom:slider-entity-row
entity: light.takflakt
name: All
- type: section
- type: custom:slider-entity-row
entity: light.takflakt_1
name: 1
- type: custom:slider-entity-row
entity: light.takflakt_2
name: 2
- type: custom:slider-entity-row
entity: light.takflakt_3
name: 3
- type: custom:slider-entity-row
entity: light.takflakt_4
name: 4

View File

@ -1,5 +1,40 @@
title: Åvägen title: Åvägen
resources: !include resources.yaml resources: !include resources.yaml
background: var(--lovelace-background)
popup_cards:
light.taklampor:
title: Taklampor
card:
type: entities
entities:
- light.lilla_hallen
- light.sovrum
- light.stora_hallen
- light.takflakt
- light.taklampa_koket
- light.taklampa_kontoret
- light.vardagsrum
light.takflakt:
title: Takfläkt
card:
type: entities
entities:
- type: custom:slider-entity-row
entity: light.takflakt
name: All
- type: section
- type: custom:slider-entity-row
entity: light.takflakt_1
name: 1
- type: custom:slider-entity-row
entity: light.takflakt_2
name: 2
- type: custom:slider-entity-row
entity: light.takflakt_3
name: 3
- type: custom:slider-entity-row
entity: light.takflakt_4
name: 4
views: views:
- !include views/diverse_view.yaml - !include views/diverse_view.yaml
- !include views/security_view.yaml - !include views/security_view.yaml