/
home.lovelace-view.yaml
88 lines (87 loc) · 3.83 KB
/
home.lovelace-view.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
- title: Floorplan
path: floorplan
theme: Google Dark Theme
badges: []
cards:
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: 'custom:floorplan-card'
full_height: true
config:
image: /local/floorplan/examples/home/home.svg
stylesheet: /local/floorplan/examples/home/home.css
log_level: info
console_log_level: info
defaults:
hover_action: hover-info
tap_action: more-info
rules:
- entity: light.garage
element: light.garage
state_action:
action: call-service
service: floorplan.image_set
service_data: '/local/floorplan/examples/home/light_${entity.state}.svg'
tap_action: toggle
- entity: light.garage
element: light.garage.button
state_action:
action: call-service
service: floorplan.class_set
service_data: 'button-${entity.state}'
tap_action:
action: call-service
service: homeassistant.toggle
- entity: light.garage
element: light.garage.text
state_action:
action: call-service
service: floorplan.text_set
service_data: '${entity.state}'
tap_action: false
- entity: switch.living_area_fan
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "spinning" : ""}'
- entity: switch.living_area_fan
element: switch.living_area_fan.button
state_action:
action: call-service
service: floorplan.class_set
service_data: 'button-${entity.state}'
hold_action:
action: call-service
service: homeassistant.toggle
service_data:
entity_id: switch.living_area_fan
- entity: switch.living_area_fan
element: switch.living_area_fan.text
state_action:
action: call-service
service: floorplan.text_set
service_data: '${entity.state}'
tap_action: false
- entity: camera.zagreb_ban_jelacic_square
state_action:
action: call-service
service: floorplan.image_set
service_data:
image: '${entity.attributes.entity_picture}'
image_refresh_interval: 10
- entities:
- binary_sensor.main_bedroom
- binary_sensor.living_area
state_action:
action: call-service
service: floorplan.style_set
service_data:
style: >
fill: ${ entity.state === "on" ? "#F9D27C" : "#7CB1F9"
};
transition: ${ entity.state === "off" ? "fill 5s ease"
: "" };