hass-config/lovelace/floorplan.yaml

95 lines
2.8 KiB
YAML

# lovelace_gen
type: picture-elements
image: !file /local/images/Bottenvåning.png
elements:
{% macro lamp(entity, x, y) -%}
{% if not no_light %}
- entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% }
type: state-icon
tap_action: { action: toggle }
{% endif %}
{%- endmacro %}
{% macro dimlamp(entity, x, y) -%}
{% if not no_light %}
- entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% }
type: state-icon
tap_action: { action: toggle }
hold_action: { action: more-info }
{% endif %}
{%- endmacro %}
{% macro icon(entity, x, y) -%}
{% if not no_other %}
- entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% }
type: state-icon
{% endif %}
{%- endmacro %}
{% macro badge(entity, x, y) -%}
{% if not no_other %}
- entity: {{entity}}
style: { left: {{x}}%, top: {{y}}% }
type: state-badge
{% endif %}
{%- endmacro %}
# Kontoret
{{ dimlamp('light.taklampa_kontoret', 82, 68) }}
{{ lamp('light.kontor_fonster', 83, 87) }}
{{ dimlamp('light.skrivbordslampa_1', 88, 58) }}
{{ badge('sensor.kontoret_temperature', 82, 80) }}
# Lilla hallen
{{ dimlamp('light.lilla_hallen', 72, 53) }}
# Stora hallen
{{ dimlamp('light.stora_hallen', 43, 70) }}
{{ lamp('light.trappbelysning', 49, 61) }}
{{ icon('binary_sensor.hall_ytterdorr', 43, 87) }}
{{ badge('sensor.temperatursensor_atelje_1_0', 55, 54) }}
# Köket
{{ dimlamp('light.taklampa_koket', 32, 76) }}
{{ lamp('light.koksfonster', 22, 87) }}
{{ lamp('light.koksfonster', 28, 87) }}
{{ icon('switch.kaffebryggare', 16, 84) }}
# Vardagsrummet
{{ dimlamp('light.vardagsrum', 60, 30) }}
{{ dimlamp('light.takflakt', 43, 30) }}
{{ lamp('light.bokhylla', 55, 45) }}
{{ lamp('light.deko_vardagsrum', 49, 15) }}
{{ badge('sensor.vardagsrum_0', 40, 36) }}
{{ icon('binary_sensor.vardagsrum_ytterdorr', 38, 12) }}
# Sovrum
{{ dimlamp('light.sovrum', 81, 30) }}
{{ icon('binary_sensor.sovrum_ytterdorr', 78, 12) }}
# Tvättstuga
{{ lamp('light.skotbord', 21, 15) }}
{{ icon('binary_sensor.tvattstuga_ytterdorr', 13, 24) }}
# # Badrum
{{ badge('sensor.badrum_temp', 27, 30) }}
{{ badge('sensor.badrum_humidity', 27, 40) }}
{{ icon('switch.ventilation', 27, 20) }}
# Utomhus
{{ badge('sensor.utomhus_temp', 5, 10) }}
{{ 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) }}
{{ badge('sensor.elmatare_0', 5, 55) }}