Modernize lovelace code for lovelace_gen, hacs
This commit is contained in:
parent
460b1d2937
commit
47b4d3d933
@ -11,9 +11,18 @@ entities:
|
|||||||
entity: switch.kaffebryggare
|
entity: switch.kaffebryggare
|
||||||
icon: mdi:coffee
|
icon: mdi:coffee
|
||||||
items:
|
items:
|
||||||
- input_boolean.cfe_on
|
- entity: input_boolean.cfe_on
|
||||||
- type: custom:time-input-row
|
style: |
|
||||||
entity: input_datetime.cfe_on
|
:host {
|
||||||
|
--paper-item-icon-color: {% if is_state(config.entity, 'on') %} var(--paper-item-active-color) {% else %} var(--paper-item-color) {% endif %};
|
||||||
|
}
|
||||||
|
|
||||||
|
- entity: input_datetime.cfe_on
|
||||||
- type: section
|
- type: section
|
||||||
- input_boolean.cfe_off
|
- entity: input_boolean.cfe_off
|
||||||
|
debug_cardmod: true
|
||||||
|
style: |
|
||||||
|
:host {
|
||||||
|
--paper-item-icon-color: {% if is_state(config.entity, 'on') %} var(--paper-item-active-color) {% else %} var(--paper-item-color) {% endif %};
|
||||||
|
}
|
||||||
- input_number.cfe_off
|
- input_number.cfe_off
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# lovelace_gen
|
||||||
type: picture-elements
|
type: picture-elements
|
||||||
image: !file /local/images/Bottenvåning.png
|
image: !file /local/images/Bottenvåning.png
|
||||||
elements:
|
elements:
|
||||||
@ -38,6 +39,7 @@ elements:
|
|||||||
{{ 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) }}
|
||||||
|
{{ badge('sensor.kontoret_temperature', 82, 80) }}
|
||||||
|
|
||||||
# Lilla hallen
|
# Lilla hallen
|
||||||
{{ dimlamp('light.lilla_hallen', 72, 53) }}
|
{{ dimlamp('light.lilla_hallen', 72, 53) }}
|
||||||
@ -76,6 +78,7 @@ elements:
|
|||||||
{{ icon('switch.ventilation', 27, 20) }}
|
{{ icon('switch.ventilation', 27, 20) }}
|
||||||
|
|
||||||
# Utomhus
|
# Utomhus
|
||||||
|
{{ badge('sensor.utomhus_temp', 5, 10) }}
|
||||||
{{ 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) }}
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
|
# lovelace_gen
|
||||||
|
|
||||||
- url: !file /local/lovelace-card-tools/card-tools.js
|
- url: !file /local/lovelace-card-tools/card-tools.js
|
||||||
type: js
|
type: js
|
||||||
- url: !file /local/lovelace-fold-entity-row/fold-entity-row.js
|
|
||||||
type: js
|
|
||||||
- url: !file /local/lovelace-time-input-row/time-input-row.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
|
|
||||||
- url: !file /local/lovelace-auto-entities/auto-entities.js
|
- url: !file /local/lovelace-auto-entities/auto-entities.js
|
||||||
type: js
|
type: js
|
||||||
- url: !file /local/lovelace-layout-card/layout-card.js
|
- url: !file /local/lovelace-layout-card/layout-card.js
|
||||||
type: js
|
type: js
|
||||||
- url: !file /local/lovelace-useful-markdown-card/useful-markdown-card.js
|
|
||||||
type: module
|
|
||||||
|
|
||||||
# Specially modified by helto
|
# Specially modified by helto
|
||||||
# https://github.com/helto4real/hassio/tree/master/www/custom_cards
|
# https://github.com/helto4real/hassio/tree/master/www/custom_cards
|
||||||
@ -22,3 +14,9 @@
|
|||||||
|
|
||||||
- url: !file /local/more-info-card.js
|
- url: !file /local/more-info-card.js
|
||||||
type: js
|
type: js
|
||||||
|
|
||||||
|
# Plugins installed through HACS
|
||||||
|
- url: !file /local/community/lovelace-card-mod/card-mod.js
|
||||||
|
type: module
|
||||||
|
- url: !file /local/community/lovelace-fold-entity-row/fold-entity-row.js
|
||||||
|
type: module
|
||||||
|
@ -6,22 +6,20 @@ entities:
|
|||||||
name: Tid
|
name: Tid
|
||||||
- entity: sensor.date
|
- entity: sensor.date
|
||||||
name: Datum
|
name: Datum
|
||||||
|
- entity: sensor.week
|
||||||
|
name: Vecka
|
||||||
- type: section
|
- type: section
|
||||||
label: Tid på dygnet
|
label: Tid på dygnet
|
||||||
- entity: input_select.tod
|
- entity: input_select.tod
|
||||||
name: ' '
|
name: ' '
|
||||||
- entity: input_datetime.tod_morning
|
- entity: input_datetime.tod_morning
|
||||||
name: Morgon
|
name: Morgon
|
||||||
type: custom:time-input-row
|
|
||||||
- entity: input_datetime.tod_day
|
- entity: input_datetime.tod_day
|
||||||
name: Dag
|
name: Dag
|
||||||
type: custom:time-input-row
|
|
||||||
- entity: input_datetime.tod_evening
|
- entity: input_datetime.tod_evening
|
||||||
name: Kväll
|
name: Kväll
|
||||||
type: custom:time-input-row
|
|
||||||
- entity: input_datetime.tod_night
|
- entity: input_datetime.tod_night
|
||||||
name: Natt
|
name: Natt
|
||||||
type: custom:time-input-row
|
|
||||||
|
|
||||||
- type: section
|
- type: section
|
||||||
- entity: switch.tod_dark
|
- entity: switch.tod_dark
|
||||||
|
@ -2,62 +2,6 @@ title: Dashboard
|
|||||||
path: dashboard
|
path: dashboard
|
||||||
icon: mdi:home-assistant
|
icon: mdi:home-assistant
|
||||||
panel: true
|
panel: true
|
||||||
popup_cards:
|
|
||||||
vacuum.xiaomi_vacuum_cleaner:
|
|
||||||
title: Dammsugare
|
|
||||||
card: !include vacuum_card.yaml
|
|
||||||
|
|
||||||
binary_sensor.door_open:
|
|
||||||
title: Öppna dörrar
|
|
||||||
card:
|
|
||||||
type: vertical-stack
|
|
||||||
cards:
|
|
||||||
- type: entities
|
|
||||||
entities: &door_entities
|
|
||||||
- binary_sensor.hall_ytterdorr
|
|
||||||
- binary_sensor.tvattstuga_ytterdorr
|
|
||||||
- binary_sensor.vardagsrum_ytterdorr
|
|
||||||
- binary_sensor.sovrum_ytterdorr
|
|
||||||
- type: history-graph
|
|
||||||
entities: *door_entities
|
|
||||||
|
|
||||||
device_tracker.thomas_presence:
|
|
||||||
title: Thomas
|
|
||||||
large: true
|
|
||||||
card:
|
|
||||||
type: vertical-stack
|
|
||||||
cards:
|
|
||||||
- type: entities
|
|
||||||
entities: &thomas_entities
|
|
||||||
- device_tracker.thomas_iphone_beta
|
|
||||||
- device_tracker.thomas_iphone_2
|
|
||||||
- sensor.thomas_iphone_bt
|
|
||||||
- sensor.thomas_iphone_bt2
|
|
||||||
- type: history-graph
|
|
||||||
entities:
|
|
||||||
- device_tracker.thomas_presence
|
|
||||||
- type: history-graph
|
|
||||||
entities: *thomas_entities
|
|
||||||
|
|
||||||
device_tracker.anneli_presence:
|
|
||||||
title: Anneli
|
|
||||||
large: true
|
|
||||||
card:
|
|
||||||
type: vertical-stack
|
|
||||||
cards:
|
|
||||||
- type: entities
|
|
||||||
entities: &anneli_entities
|
|
||||||
- device_tracker.anneli_lovn
|
|
||||||
- device_tracker.anneli_loven
|
|
||||||
- sensor.anneli_iphone_bt
|
|
||||||
- sensor.anneli_iphone_bt2
|
|
||||||
- sensor.anneli_klocka_bt
|
|
||||||
- sensor.anneli_klocka_bt2
|
|
||||||
- type: history-graph
|
|
||||||
entities:
|
|
||||||
- device_tracker.anneli_presence
|
|
||||||
- type: history-graph
|
|
||||||
entities: *anneli_entities
|
|
||||||
cards:
|
cards:
|
||||||
- type: custom:layout-card
|
- type: custom:layout-card
|
||||||
layout: vertical
|
layout: vertical
|
||||||
@ -87,7 +31,7 @@ cards:
|
|||||||
max_width: 960
|
max_width: 960
|
||||||
layout: vertical
|
layout: vertical
|
||||||
cards:
|
cards:
|
||||||
- type: custom:useful-markdown-card
|
- type: markdown
|
||||||
style: |
|
style: |
|
||||||
ha-card {
|
ha-card {
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
@ -95,13 +39,14 @@ cards:
|
|||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 6em;
|
font-size: 6em;
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
content: |
|
content: |
|
||||||
# [[ sensor.time ]]
|
# {{ states("sensor.time") }}
|
||||||
## [[ sensor.date ]]
|
## {{ states("sensor.date") }} V.{{ states("sensor.week") }}
|
||||||
- type: custom:weather-card
|
- type: custom:weather-card
|
||||||
entity: weather.smhi_home
|
entity: weather.smhi_home
|
||||||
icons: /local/weather_icons/
|
icons: /local/weather_icons/
|
||||||
|
@ -6,10 +6,9 @@ cards:
|
|||||||
- type: custom:layout-card
|
- type: custom:layout-card
|
||||||
rebuild: 1000
|
rebuild: 1000
|
||||||
cards:
|
cards:
|
||||||
- !include dev_card.yaml
|
- !include ../timeofday_card.yaml
|
||||||
- !include timeofday_card.yaml
|
|
||||||
- type: custom:browser-player
|
- type: custom:browser-player
|
||||||
- !include local_services.hidden.yaml
|
- !include ../local_services.hidden.yaml
|
||||||
- type: custom:auto-entities
|
- type: custom:auto-entities
|
||||||
card:
|
card:
|
||||||
type: entities
|
type: entities
|
||||||
@ -17,6 +16,9 @@ cards:
|
|||||||
filter:
|
filter:
|
||||||
include:
|
include:
|
||||||
- state: "unavailable"
|
- state: "unavailable"
|
||||||
|
exclude:
|
||||||
|
- attributes:
|
||||||
|
type: browser_mod
|
||||||
- type: custom:auto-entities
|
- type: custom:auto-entities
|
||||||
card:
|
card:
|
||||||
type: entities
|
type: entities
|
||||||
@ -51,6 +53,9 @@ cards:
|
|||||||
- domain: switch
|
- domain: switch
|
||||||
options:
|
options:
|
||||||
secondary_info: entity-id
|
secondary_info: entity-id
|
||||||
|
exclude:
|
||||||
|
- attributes:
|
||||||
|
type: browser_mod
|
||||||
- type: custom:auto-entities
|
- type: custom:auto-entities
|
||||||
card:
|
card:
|
||||||
type: entities
|
type: entities
|
||||||
@ -61,6 +66,19 @@ cards:
|
|||||||
device_class: "battery"
|
device_class: "battery"
|
||||||
options:
|
options:
|
||||||
secondary_info: entity-id
|
secondary_info: entity-id
|
||||||
|
style: |
|
||||||
|
{% if state_attr(config.entity, 'unit_of_measurement') == "%" %}
|
||||||
|
:host {
|
||||||
|
--paper-item-icon-color:
|
||||||
|
{% if states(config.entity)|float < 25 %}
|
||||||
|
red
|
||||||
|
{% elif states(config.entity)|float < 40 %}
|
||||||
|
orange
|
||||||
|
{% else %}
|
||||||
|
var(--text-light-color)
|
||||||
|
{% endif %};
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
- type: custom:auto-entities
|
- type: custom:auto-entities
|
||||||
card:
|
card:
|
||||||
type: entities
|
type: entities
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
title: Diverse
|
title: Diverse
|
||||||
icon: mdi:home-assistant
|
icon: mdi:home-assistant
|
||||||
cards:
|
cards:
|
||||||
- !include floorplan.yaml {"no_other":"true"}
|
- !include
|
||||||
- !include floorplan.yaml {"no_light":"true"}
|
- /config/lovelace/floorplan.yaml
|
||||||
- !include coffee_card.yaml
|
- {"no_other":"true"}
|
||||||
- !include temperatures_card.yaml
|
- !include
|
||||||
- !include power_card.yaml
|
- /config/lovelace/floorplan.yaml
|
||||||
|
- {"no_light":"true"}
|
||||||
|
- !include /config/lovelace/coffee_card.yaml
|
||||||
|
- !include /config/lovelace/temperatures_card.yaml
|
||||||
|
- !include /config/lovelace/power_card.yaml
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
title: Security
|
title: Security
|
||||||
icon: mdi:shield-home
|
icon: mdi:shield-home
|
||||||
cards:
|
cards:
|
||||||
- !include cameras/barnrum.yaml
|
- !include /config/lovelace/cameras/barnrum.yaml
|
||||||
- !include cameras/kontor.yaml
|
- !include /config/lovelace/cameras/kontor.yaml
|
||||||
- !include cameras/vardagsrum.yaml
|
- !include /config/lovelace/cameras/vardagsrum.yaml
|
||||||
- !include cameras/hallen.yaml
|
- !include /config/lovelace/cameras/hallen.yaml
|
||||||
- type: entities
|
- type: entities
|
||||||
entities:
|
entities:
|
||||||
- type: custom:hui-glance-card
|
- type: custom:hui-glance-card
|
||||||
|
Loading…
x
Reference in New Issue
Block a user