Modernize lovelace code for lovelace_gen, hacs
This commit is contained in:
parent
460b1d2937
commit
47b4d3d933
@ -11,9 +11,18 @@ entities:
|
||||
entity: switch.kaffebryggare
|
||||
icon: mdi:coffee
|
||||
items:
|
||||
- input_boolean.cfe_on
|
||||
- type: custom:time-input-row
|
||||
entity: input_datetime.cfe_on
|
||||
- entity: input_boolean.cfe_on
|
||||
style: |
|
||||
: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
|
||||
- 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
|
||||
|
@ -1,3 +1,4 @@
|
||||
# lovelace_gen
|
||||
type: picture-elements
|
||||
image: !file /local/images/Bottenvåning.png
|
||||
elements:
|
||||
@ -38,6 +39,7 @@ elements:
|
||||
{{ 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) }}
|
||||
@ -76,6 +78,7 @@ elements:
|
||||
{{ 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) }}
|
||||
|
@ -1,19 +1,11 @@
|
||||
# lovelace_gen
|
||||
|
||||
- url: !file /local/lovelace-card-tools/card-tools.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
|
||||
type: js
|
||||
- url: !file /local/lovelace-layout-card/layout-card.js
|
||||
type: js
|
||||
- url: !file /local/lovelace-useful-markdown-card/useful-markdown-card.js
|
||||
type: module
|
||||
|
||||
# Specially modified by helto
|
||||
# https://github.com/helto4real/hassio/tree/master/www/custom_cards
|
||||
@ -22,3 +14,9 @@
|
||||
|
||||
- url: !file /local/more-info-card.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
|
||||
- entity: sensor.date
|
||||
name: Datum
|
||||
- entity: sensor.week
|
||||
name: Vecka
|
||||
- type: section
|
||||
label: Tid på dygnet
|
||||
- entity: input_select.tod
|
||||
name: ' '
|
||||
- entity: input_datetime.tod_morning
|
||||
name: Morgon
|
||||
type: custom:time-input-row
|
||||
- entity: input_datetime.tod_day
|
||||
name: Dag
|
||||
type: custom:time-input-row
|
||||
- entity: input_datetime.tod_evening
|
||||
name: Kväll
|
||||
type: custom:time-input-row
|
||||
- entity: input_datetime.tod_night
|
||||
name: Natt
|
||||
type: custom:time-input-row
|
||||
|
||||
- type: section
|
||||
- entity: switch.tod_dark
|
||||
|
@ -2,62 +2,6 @@ title: Dashboard
|
||||
path: dashboard
|
||||
icon: mdi:home-assistant
|
||||
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:
|
||||
- type: custom:layout-card
|
||||
layout: vertical
|
||||
@ -87,7 +31,7 @@ cards:
|
||||
max_width: 960
|
||||
layout: vertical
|
||||
cards:
|
||||
- type: custom:useful-markdown-card
|
||||
- type: markdown
|
||||
style: |
|
||||
ha-card {
|
||||
padding-top: 24px;
|
||||
@ -95,13 +39,14 @@ cards:
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 6em;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h2 {
|
||||
text-align: center;
|
||||
}
|
||||
content: |
|
||||
# [[ sensor.time ]]
|
||||
## [[ sensor.date ]]
|
||||
# {{ states("sensor.time") }}
|
||||
## {{ states("sensor.date") }} V.{{ states("sensor.week") }}
|
||||
- type: custom:weather-card
|
||||
entity: weather.smhi_home
|
||||
icons: /local/weather_icons/
|
||||
|
@ -6,10 +6,9 @@ cards:
|
||||
- type: custom:layout-card
|
||||
rebuild: 1000
|
||||
cards:
|
||||
- !include dev_card.yaml
|
||||
- !include timeofday_card.yaml
|
||||
- !include ../timeofday_card.yaml
|
||||
- type: custom:browser-player
|
||||
- !include local_services.hidden.yaml
|
||||
- !include ../local_services.hidden.yaml
|
||||
- type: custom:auto-entities
|
||||
card:
|
||||
type: entities
|
||||
@ -17,6 +16,9 @@ cards:
|
||||
filter:
|
||||
include:
|
||||
- state: "unavailable"
|
||||
exclude:
|
||||
- attributes:
|
||||
type: browser_mod
|
||||
- type: custom:auto-entities
|
||||
card:
|
||||
type: entities
|
||||
@ -51,6 +53,9 @@ cards:
|
||||
- domain: switch
|
||||
options:
|
||||
secondary_info: entity-id
|
||||
exclude:
|
||||
- attributes:
|
||||
type: browser_mod
|
||||
- type: custom:auto-entities
|
||||
card:
|
||||
type: entities
|
||||
@ -61,6 +66,19 @@ cards:
|
||||
device_class: "battery"
|
||||
options:
|
||||
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
|
||||
card:
|
||||
type: entities
|
||||
|
@ -1,8 +1,12 @@
|
||||
title: Diverse
|
||||
icon: mdi:home-assistant
|
||||
cards:
|
||||
- !include floorplan.yaml {"no_other":"true"}
|
||||
- !include floorplan.yaml {"no_light":"true"}
|
||||
- !include coffee_card.yaml
|
||||
- !include temperatures_card.yaml
|
||||
- !include power_card.yaml
|
||||
- !include
|
||||
- /config/lovelace/floorplan.yaml
|
||||
- {"no_other":"true"}
|
||||
- !include
|
||||
- /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
|
||||
icon: mdi:shield-home
|
||||
cards:
|
||||
- !include cameras/barnrum.yaml
|
||||
- !include cameras/kontor.yaml
|
||||
- !include cameras/vardagsrum.yaml
|
||||
- !include cameras/hallen.yaml
|
||||
- !include /config/lovelace/cameras/barnrum.yaml
|
||||
- !include /config/lovelace/cameras/kontor.yaml
|
||||
- !include /config/lovelace/cameras/vardagsrum.yaml
|
||||
- !include /config/lovelace/cameras/hallen.yaml
|
||||
- type: entities
|
||||
entities:
|
||||
- type: custom:hui-glance-card
|
||||
|
Loading…
x
Reference in New Issue
Block a user