-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathfloorplan.yaml
More file actions
executable file
·145 lines (129 loc) · 4.74 KB
/
floorplan.yaml
File metadata and controls
executable file
·145 lines (129 loc) · 4.74 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Home Floorplan
image: /local/custom_ui/floorplan/home.svg
stylesheet: /local/custom_ui/floorplan/home.css
# These options are optional
# warnings: # enable warnings (to find out why things might ot be working correctly)
# pan_zoom: # enable experimental panning / zooming
# hide_app_toolbar: # hide the application toolbar (when used as a custom panel)
last_motion_entity: sensor.template_last_motion
last_motion_class: last-motion
groups:
- name: Dark Sky Sensors
entities:
- sensor.weather_icon
image_template: '
var imageName = "";
switch (entity.state) {
case "clear-day":
imageName = "day";
break;
case "clear-night":
imageName = "night";
break;
case "partly-cloudy-day":
imageName = "cloudy-day-1";
break;
case "partly-cloudy-night":
imageName = "cloudy-night-1";
break;
case "cloudy":
imageName = "cloudy";
break;
case "rain":
imageName = "rainy-1";
break;
case "snow":
imageName = "snowy-1";
break;
}
return "/local/custom_ui/floorplan/images/weather/" + imageName + ".svg";
'
- name: Sensors
entities:
- sensor.fibaro_system_fgms001zw5_motion_sensor_temperature
- sensor.weather_temperature
text_template: '${entity.state ? entity.state : "unknown"}°C'
# An example of rounding up a number, i.e. a temperature of 90.1 becomes 91
# text_template: '${entity.state ? Math.ceil(entity.state) : "undefined"}'
class_template: '
var temp = parseFloat(entity.state.replace("°", ""));
if (temp < 10)
return "temp-very-low";
else if (temp < 15)
return "temp-below-average";
else if (temp < 22)
return "temp-medium";
else
return "temp-very-high";
'
- name: Text Sensors
entities:
- device_tracker.hauser_trent
- device_tracker.2c8a72bbc83c
- sensor.time
- sensor.date
text_template: '${entity.state ? entity.state : "unknown"}'
- name: Switches
entities:
- switch.living_room_lamp
- switch.bed_trent_lamp
- switch.bed_rachel_lamp
- switch.outside_heater
- input_boolean.ifttt_office_lamp
- light.entryway
states:
- state: 'on'
class: 'switch-on'
- state: 'off'
class: 'switch-off'
- name: Binary sensors
entities:
- binary_sensor.motion
states:
- state: 'off'
class: 'info-background'
- state: 'on'
class: 'warning-background'
state_transitions:
- name: On to off
from_state: 'on'
to_state: 'off'
duration: 10
- name: Cameras
entities:
- camera.front_door
- camera.back_deck
states:
- state: 'idle'
class: 'camera-idle'
- name: Media Players
entities:
- media_player.living_room_home
- media_player.tv_ua55ju6400
- media_player.living_room
- media_player.bed_room
- media_player.outside
states:
- state: 'off'
class: 'mediaplayer-off'
- state: 'idle'
class: 'mediaplayer-off'
- state: 'paused'
class: 'mediaplayer-on'
- state: 'playing'
class: 'mediaplayer-on'
# - name: thermostat_temp
# entities:
# - climate.downstairs
# - climate.upstairs
# text_template: '${entity.attributes.current_temperature ? entity.attributes.current_temperature : "undefined"}'
#
# The above text_template uses extended attributes from the climate.* objects to get current temperature.
# - name: text_states
# entities:
# - sensor.downstairs_thermostat_humidity
# - sensor.dark_sky_temperature
# - sensor.last_message
# text_template: '${entity.state ? entity.state.replace(/\s{2,}/g,"") : "undefined"}'
#
# The above text_template uses jQuery syntax to search and replace any instance of 2 consecutive (or more) spaces in a string of text.