From e49a3f09ff2627c2f27b0a868878e2d9a97dd815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Thu, 3 Jan 2019 21:38:52 +0100 Subject: [PATCH] lovelace - Floorplan complete --- lovelace/floorplan.yaml | 94 +++++++++++++++++++++++++++++++++++++++++ lovelace/main.yaml | 12 ++++-- packages/lovelace.yaml | 2 +- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 lovelace/floorplan.yaml diff --git a/lovelace/floorplan.yaml b/lovelace/floorplan.yaml new file mode 100644 index 0000000..af11d9d --- /dev/null +++ b/lovelace/floorplan.yaml @@ -0,0 +1,94 @@ +type: picture-elements +image: !file /local/images/Bottenvåning.png +elements: + + {% set lamp = """ + type: state-icon + tap_action: { action: toggle } + """ %} + {% set dimlamp = """ + type: state-icon + tap_action: { action: toggle } + hold_action: { action: more-info } + """ %} + + # Kontoret + - entity: light.taklampa_kontoret + style: { left: 82%, top: 68% } + {{ dimlamp }} + - entity: light.kontor_fonster + style: { left: 83%, top: 87% } + {{ lamp }} + - entity: light.skrivbordslampa_1 + style: { left: 88%, top: 58% } + {{ dimlamp }} + + # Lilla hallen + - entity: light.lilla_hallen + style: { left: 72%, top: 53% } + {{ dimlamp }} + + # Stora hallen + - entity: light.stora_hallen + style: { left: 43%, top: 70% } + {{ dimlamp }} + - entity: light.trappbelysning + style: { left: 49%, top: 61% } + {{ lamp }} + + # Köket + - entity: light.taklampa_koket + style: { left: 32%, top: 76% } + {{ dimlamp }} + - type: state-icon + entity: switch.kaffebryggare + tap_action: { action: toggle } + style: { left: 16%, top: 84% } + +# Vardagsrummet + - entity: light.vardagsrum + style: { left: 60%, top: 30% } + {{ dimlamp }} + - entity: light.takflakt + style: { left: 43%, top: 30% } + {{ dimlamp }} + - entity: light.bokhylla + style: { left: 55%, top: 45% } + {{ lamp }} + - type: state-label + entity: sensor.vardagsrum_0 + style: { left: 40%, top: 36% } + +# Sovrum + - entity: light.sovrum + style: { left: 81%, top: 30% } + {{ dimlamp }} + +# Tvättstuga + - entity: light.skotbord + style: { left: 21%, top: 15% } + {{ lamp }} + +# Utomhus + - entity: light.ute_framsidan + style: { left: 44%, top: 94% } + {{ lamp }} + - entity: light.ute_framsidan + style: { left: 16%, top: 94% } + {{ lamp }} + - entity: light.ute_framsidan + style: { left: 60%, top: 94% } + {{ lamp }} + - entity: light.ute_framsidan + style: { left: 75%, top: 94% } + {{ lamp }} + - entity: light.ute_framsidan + style: { left: 95%, top: 30% } + {{ lamp }} + - entity: light.ute_framsidan + style: { left: 95%, top: 70% } + {{ lamp }} + + - type: state-label + entity: sensor.elmatare_0 + style: { left: 5%, top: 55% } diff --git a/lovelace/main.yaml b/lovelace/main.yaml index 7294465..a10df8c 100644 --- a/lovelace/main.yaml +++ b/lovelace/main.yaml @@ -1,5 +1,11 @@ title: Åvägen views: - - title: Hemma - cards: [] - + - title: Hemma2 + cards: + - type: entity-button + entity: light.taklampa_kontoret + name: Reload config + tap_action: + action: call-service + service: shell_command.lovelace_gen + - !include floorplan.yaml diff --git a/packages/lovelace.yaml b/packages/lovelace.yaml index 526eb02..77a7ee4 100644 --- a/packages/lovelace.yaml +++ b/packages/lovelace.yaml @@ -2,5 +2,5 @@ lovelace: mode: yaml shell_command: - lovelace_gen: 'cd /config && python /config/www/lovelace/homeassistant-lovelace-gen/lovelace-gen.py' + lovelace_gen: 'python /config/www/homeassistant-lovelace-gen/lovelace-gen.py'