hass-config/lovelace/floorplan.yaml
2019-03-31 17:58:34 +02:00

75 lines
2.1 KiB
YAML

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