-
Notifications
You must be signed in to change notification settings - Fork 5
/
sensors.yaml
230 lines (215 loc) · 8.14 KB
/
sensors.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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
- platform: yr
# check for ssl certificate expiration.
- platform: command_line
name: SSL cert expiry
unit_of_measurement: days
scan_interval: 10800
command: "ssl-cert-check -b -c /etc/letsencrypt/live/jardi.duckdns.org/cert.pem | awk '{ print $NF }'"
##############################################################################
## Weather Station Data ##
##############################################################################
- platform: rest
resource: http://dell-inspiron.local/weewx/daily.json
name: Weather Station
json_attributes:
- current
value_template: '{{ value_json.hardware }}'
- platform: template
sensors:
outside_temperature:
friendly_name: Outside Temperature
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['outTemp'] }}"
unit_of_measurement: '°F'
heat_index:
friendly_name: Heat Index
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['heatIndex'] }}"
unit_of_measurement: '°F'
icon_template: 'mdi:thermometer-lines'
wind_chill:
friendly_name: Wind Chill
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['windchill'] }}"
unit_of_measurement: '°F'
icon_template: 'mdi:thermometer-lines'
dew_point:
friendly_name: Dew Point
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['dewpoint'] }}"
unit_of_measurement: '°F'
icon_template: 'mdi:oil-temperature'
humidity:
friendly_name: Humidity
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['humidity'] }}"
unit_of_measurement: '%'
icon_template: 'mdi:water-percent'
barometer:
friendly_name: Barometer
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['barometer'] }}"
unit_of_measurement: 'inHg'
icon_template: 'mdi:gauge'
barometer_trend:
friendly_name: Barometer Trend
entity_id:
- sensor.weather_station
value_template: >
{% set trend_data = states.sensor.weather_station.attributes.current['barometerTrendData'] %}
{% set trend_delta = states.sensor.weather_station.attributes.current['barometerTrendDelta'] %}
{{ trend_data + ' (' + trend_delta + ')' }}
unit_of_measurement: 'inHg'
icon_template: >-
{% set val = states.sensor.weather_station.attributes.current['barometerTrendData'] %}
{% if val[0] == '-' %}
mdi:arrow-down-bold
{% else %}
mdi:arrow-up-bold
{% endif %}
wind:
friendly_name: Wind
entity_id:
- sensor.weather_station
value_template: >
{% set speed = states.sensor.weather_station.attributes.current['windSpeed'] %}
{% set direction = states.sensor.weather_station.attributes.current['windDirText'] %}
{{ speed + ' (' + direction + ')' }}
unit_of_measurement: 'mph'
icon_template: 'mdi:weather-windy'
rain_rate:
friendly_name: Rain Rate
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['rainRate'] }}"
unit_of_measurement: 'in/hr'
icon_template: 'mdi:water'
rain_today:
friendly_name: Rain Today
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['rainToday'] }}"
unit_of_measurement: 'in'
icon_template: 'mdi:cup-water'
utility_room_temperature:
friendly_name: Utility Room Temperature
entity_id:
- sensor.weather_station
value_template: "{{ states.sensor.weather_station.attributes.current['insideTemp'] }}"
unit_of_measurement: '°F'
# Template sensors for Xiaomi Vacuum
- platform: template
sensors:
vacuum_status:
friendly_name: Status
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Status: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status }}'
icon_template: >
{% set val = states.vacuum.xiaomi_vacuum_cleaner.attributes.status %}
{% if val == 'Charging' %}
mdi:battery-charging
{% elif val == 'Cleaning' %}
mdi:move-resize
{% elif val == 'Returning home' %}
mdi:keyboard-return
{% elif val == 'Idle' %}
mdi:dots-horizontal
{% elif val == 'Paused' %}
mdi:pause-circle
{% else %}
mdi:help-circle
{% endif %}
vacuum_fan_speed:
friendly_name: Fan Speed
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Mode: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.fan_speed }}'
icon_template: 'mdi:speedometer'
vacuum_battery:
friendly_name: Vacuum Battery
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Battery: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: '{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.battery_icon }}'
vacuum_cleaning_time:
friendly_name: Time of Last Cycle
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: '{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.cleaning_time }}'
icon_template: 'mdi:timer'
vacuum_cleaned_area:
friendly_name: Area of Last Cycle
unit_of_measurement: 'm ²'
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: '{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.cleaned_area }}'
icon_template: 'mdi:ruler'
vacuum_cleanmainbrush:
friendly_name: Replace main brush
unit_of_measurement: 'h'
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Main Brush: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.main_brush_left }}'
icon_template: 'mdi:screwdriver'
vacuum_cleansidebrush:
friendly_name: Replace side brush
unit_of_measurement: 'h'
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Side brush: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.side_brush_left }}'
icon_template: 'mdi:screwdriver'
vacuum_cleanfilter:
friendly_name: Replace filter
unit_of_measurement: 'h'
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Filter: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.filter_left }}'
icon_template: 'mdi:screwdriver'
vacuum_sensordirtyleft:
friendly_name: Clean sensor
unit_of_measurement: 'h'
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: 'Sensor: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.sensor_dirty_left }}'
icon_template: 'mdi:screwdriver'
vacuum_do_not_disturb:
friendly_name: Do Not Disturb
entity_id:
- vacuum.xiaomi_vacuum_cleaner
value_template: '{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.do_not_disturb }}'
icon_template: >
{% set val = states.vacuum.xiaomi_vacuum_cleaner.attributes.do_not_disturb %}
{% if val == 'on' %}
mdi:do-not-disturb
{% else %}
mdi:do-not-disturb-off
{% endif %}
vacuum_operation:
value_template: 'Operation'
vacuum_accessories:
value_template: 'Maintenance'
# Template sensor for Garbage collection
- platform: template
sensors:
garbage_main:
friendly_name: Garbage
value_template: "{{ states.calendar.trash_this_week.attributes.all_tasks[0] }}"
icon_template: mdi:delete-empty
garbage_byweekly:
friendly_name: Garbage Biweekly
value_template: "{{ states.calendar.trash_this_week.attributes.all_tasks[1] }}"
icon_template: >
{% set val = states.calendar.trash_this_week.attributes.all_tasks[1] %}
{% if val == 'Recycling' %}
mdi:recycle
{% else %}
mdi:food-apple
{% endif %}