lovelace - Add ability to controll each bulb of ceiling fan

This commit is contained in:
Thomas Lovén 2019-01-13 23:53:59 +01:00
parent ae14296af0
commit 924e714191
2 changed files with 112 additions and 84 deletions

View File

@ -1,94 +1,118 @@
type: picture-elements type: vertical-stack
image: !file /local/images/Bottenvåning.png cards:
elements: - type: picture-elements
image: !file /local/images/Bottenvåning.png
elements:
{% set lamp = """ {% set lamp = """
type: state-icon type: state-icon
tap_action: { action: toggle } tap_action: { action: toggle }
""" %} """ %}
{% set dimlamp = """ {% set dimlamp = """
type: state-icon type: state-icon
tap_action: { action: toggle } tap_action: { action: toggle }
hold_action: { action: more-info } hold_action: { action: more-info }
""" %} """ %}
# Kontoret # Kontoret
- entity: light.taklampa_kontoret - entity: light.taklampa_kontoret
style: { left: 82%, top: 68% } style: { left: 82%, top: 68% }
{{ dimlamp }} {{ dimlamp }}
- entity: light.kontor_fonster - entity: light.kontor_fonster
style: { left: 83%, top: 87% } style: { left: 83%, top: 87% }
{{ lamp }} {{ lamp }}
- entity: light.skrivbordslampa_1 - entity: light.skrivbordslampa_1
style: { left: 88%, top: 58% } style: { left: 88%, top: 58% }
{{ dimlamp }} {{ dimlamp }}
# Lilla hallen # Lilla hallen
- entity: light.lilla_hallen - entity: light.lilla_hallen
style: { left: 72%, top: 53% } style: { left: 72%, top: 53% }
{{ dimlamp }} {{ dimlamp }}
# Stora hallen # Stora hallen
- entity: light.stora_hallen - entity: light.stora_hallen
style: { left: 43%, top: 70% } style: { left: 43%, top: 70% }
{{ dimlamp }} {{ dimlamp }}
- entity: light.trappbelysning - entity: light.trappbelysning
style: { left: 49%, top: 61% } style: { left: 49%, top: 61% }
{{ lamp }} {{ lamp }}
# Köket # Köket
- entity: light.taklampa_koket - entity: light.taklampa_koket
style: { left: 32%, top: 76% } style: { left: 32%, top: 76% }
{{ dimlamp }} {{ dimlamp }}
- 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
- entity: light.vardagsrum - entity: light.vardagsrum
style: { left: 60%, top: 30% } style: { left: 60%, top: 30% }
{{ dimlamp }} {{ dimlamp }}
- entity: light.takflakt - entity: light.takflakt
style: { left: 43%, top: 30% } style: { left: 43%, top: 30% }
{{ dimlamp }} {{ dimlamp }}
- entity: light.bokhylla - entity: light.bokhylla
style: { left: 55%, top: 45% } style: { left: 55%, top: 45% }
{{ lamp }} {{ lamp }}
- 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
- entity: light.sovrum - entity: light.sovrum
style: { left: 81%, top: 30% } style: { left: 81%, top: 30% }
{{ dimlamp }} {{ dimlamp }}
# Tvättstuga # Tvättstuga
- entity: light.skotbord - entity: light.skotbord
style: { left: 21%, top: 15% } style: { left: 21%, top: 15% }
{{ lamp }} {{ lamp }}
# Utomhus # Utomhus
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 44%, top: 94% } style: { left: 44%, top: 94% }
{{ lamp }} {{ lamp }}
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 16%, top: 94% } style: { left: 16%, top: 94% }
{{ lamp }} {{ lamp }}
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 60%, top: 94% } style: { left: 60%, top: 94% }
{{ lamp }} {{ lamp }}
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 75%, top: 94% } style: { left: 75%, top: 94% }
{{ lamp }} {{ lamp }}
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 95%, top: 30% } style: { left: 95%, top: 30% }
{{ lamp }} {{ lamp }}
- entity: light.ute_framsidan - entity: light.ute_framsidan
style: { left: 95%, top: 70% } style: { left: 95%, top: 70% }
{{ lamp }} {{ lamp }}
- 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

@ -4,3 +4,7 @@
type: js type: js
- url: !file /local/lovelace-time-input-row/time-input-row.js - url: !file /local/lovelace-time-input-row/time-input-row.js
type: js type: js
- url: !file /local/lovelace-popup-card/popup-card.js
type: js
- url: !file /local/lovelace-slider-entity-row/slider-entity-row.js
type: js