New browser_mod popups
This commit is contained in:
parent
0120dea97d
commit
1efa41a2f7
38
lovelace/functions/car.yaml
Normal file
38
lovelace/functions/car.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# lovelace_gen
|
||||||
|
type: picture-elements
|
||||||
|
entity: sensor.{{car}}_bt
|
||||||
|
image: /local/images/{{car}}_clr.jpg
|
||||||
|
elements:
|
||||||
|
- type: image
|
||||||
|
image: /local/images/{{car}}_clr.jpg
|
||||||
|
entity: sensor.{{car}}_bt
|
||||||
|
tap_action:
|
||||||
|
action: call-service
|
||||||
|
service: homeassistant.toggle
|
||||||
|
service_data:
|
||||||
|
entity_id: switch.varme_{{car}}
|
||||||
|
style:
|
||||||
|
left: 50%
|
||||||
|
top: 50%
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
- type: state-icon
|
||||||
|
entity: switch.varme_{{car}}
|
||||||
|
style:
|
||||||
|
bottom: 0
|
||||||
|
left: 0
|
||||||
|
transform: translate(0,0)
|
||||||
|
background: rgba(0,0,0,0.5)
|
||||||
|
width: 100px
|
||||||
|
icon: mdi:fan
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
- type: state-label
|
||||||
|
entity: sensor.varme_{{car}}_power
|
||||||
|
graph: line
|
||||||
|
style:
|
||||||
|
bottom: 0
|
||||||
|
left: 30px
|
||||||
|
transform: translate(0,0)
|
||||||
|
--primary-text-color: white
|
||||||
|
color: white
|
10
lovelace/functions/popup.yaml
Normal file
10
lovelace/functions/popup.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# lovelace_gen
|
||||||
|
action: call-service
|
||||||
|
service: browser_mod.command
|
||||||
|
service_data:
|
||||||
|
command: popup
|
||||||
|
deviceID:
|
||||||
|
- this
|
||||||
|
title: {{ title }}
|
||||||
|
card: !include {{ card }}
|
||||||
|
large: {{ large | default("false") }}
|
40
lovelace/functions/presence.yaml
Normal file
40
lovelace/functions/presence.yaml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# lovelace_gen
|
||||||
|
type: picture-entity
|
||||||
|
entity: device_tracker.{{person}}_presence
|
||||||
|
image: /local/images/{{person}}_bw.png
|
||||||
|
show_name: false
|
||||||
|
show_state: false
|
||||||
|
state_image:
|
||||||
|
"home": /local/images/{{person}}_clr.png
|
||||||
|
"just_arrived": /local/images/{{person}}_clr.png
|
||||||
|
tap_action:
|
||||||
|
action: call-service
|
||||||
|
service: browser_mod.command
|
||||||
|
service_data:
|
||||||
|
command: popup
|
||||||
|
deviceID: [this]
|
||||||
|
title: {{ person|capitalize }}
|
||||||
|
large: true
|
||||||
|
card:
|
||||||
|
type: vertical-stack
|
||||||
|
cards:
|
||||||
|
- type: entities
|
||||||
|
entities: &entities
|
||||||
|
{% if person == "thomas" %}
|
||||||
|
- device_tracker.thomas_iphone_beta
|
||||||
|
- device_tracker.thomas_iphone_2
|
||||||
|
- sensor.thomas_iphone_bt
|
||||||
|
- sensor.thomas_iphone_bt2
|
||||||
|
{% elif person == "anneli" %}
|
||||||
|
- device_tracker.anneli_lovn
|
||||||
|
- device_tracker.anneli_loven
|
||||||
|
- sensor.anneli_iphone_bt
|
||||||
|
- sensor.anneli_iphone_bt2
|
||||||
|
- sensor.anneli_klocka_bt
|
||||||
|
- sensor.anneli_klocka_bt2
|
||||||
|
{% endif %}
|
||||||
|
- type: history-graph
|
||||||
|
entities:
|
||||||
|
- device_tracker.{{person}}_presence
|
||||||
|
- type: history-graph
|
||||||
|
entities: *entities
|
10
lovelace/popups/doors.yaml
Normal file
10
lovelace/popups/doors.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
@ -10,21 +10,15 @@ cards:
|
|||||||
rtl: true
|
rtl: true
|
||||||
cards:
|
cards:
|
||||||
- type: custom:layout-card
|
- type: custom:layout-card
|
||||||
column_width: 150
|
column_width: 200
|
||||||
max_width: 200
|
max_width: 300
|
||||||
cards:
|
cards:
|
||||||
- type: entity-button
|
- !include
|
||||||
entity: switch.varme_jst
|
- /config/lovelace/functions/car.yaml
|
||||||
name: JST
|
- car: peugeot
|
||||||
icon: mdi:fan
|
- !include
|
||||||
tap_action:
|
- /config/lovelace/functions/car.yaml
|
||||||
action: toggle
|
- car: golf
|
||||||
- type: entity-button
|
|
||||||
entity: switch.varme_mhr
|
|
||||||
name: MHR
|
|
||||||
icon: mdi:fan
|
|
||||||
tap_action:
|
|
||||||
action: toggle
|
|
||||||
- break
|
- break
|
||||||
- type: custom:layout-card
|
- type: custom:layout-card
|
||||||
column_width: 350
|
column_width: 350
|
||||||
@ -53,22 +47,12 @@ cards:
|
|||||||
- break
|
- break
|
||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: picture-entity
|
- !include
|
||||||
entity: device_tracker.thomas_presence
|
- /config/lovelace/functions/presence.yaml
|
||||||
image: /local/images/thomas_bw.jpg
|
- person: thomas
|
||||||
show_name: false
|
- !include
|
||||||
show_state: false
|
- /config/lovelace/functions/presence.yaml
|
||||||
state_image:
|
- person: anneli
|
||||||
"home": /local/images/thomas_clr.jpg
|
|
||||||
"just_arrived": /local/images/thomas_clr.jpg
|
|
||||||
- type: picture-entity
|
|
||||||
entity: device_tracker.anneli_presence
|
|
||||||
image: /local/images/anneli_bw.png
|
|
||||||
show_name: false
|
|
||||||
show_state: false
|
|
||||||
state_image:
|
|
||||||
"home": /local/images/anneli_clr.png
|
|
||||||
"just_arrived": /local/images/anneli_clr.png
|
|
||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: entity-button
|
- type: entity-button
|
||||||
@ -87,8 +71,16 @@ cards:
|
|||||||
- type: entity-button
|
- type: entity-button
|
||||||
entity: vacuum.xiaomi_vacuum_cleaner
|
entity: vacuum.xiaomi_vacuum_cleaner
|
||||||
name: Dammsugare
|
name: Dammsugare
|
||||||
|
tap_action: !include
|
||||||
|
- /config/lovelace/functions/popup.yaml
|
||||||
|
- title: Dammsugare
|
||||||
|
card: /config/lovelace/popups/vacuum.yaml
|
||||||
- type: entity-button
|
- type: entity-button
|
||||||
entity: binary_sensor.sopor
|
entity: binary_sensor.sopor
|
||||||
- type: entity-button
|
- type: entity-button
|
||||||
entity: binary_sensor.door_open
|
entity: binary_sensor.door_open
|
||||||
name: Öppen dörr
|
name: Öppen dörr
|
||||||
|
tap_action: !include
|
||||||
|
- /config/lovelace/functions/popup.yaml
|
||||||
|
- title: Öppna dörrar
|
||||||
|
card: /config/lovelace/popups/doors.yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user