New browser_mod popups

This commit is contained in:
2019-10-30 14:18:56 +01:00
parent 0120dea97d
commit 1efa41a2f7
6 changed files with 120 additions and 30 deletions

View 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

View 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") }}

View 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