-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensor.yaml
executable file
·179 lines (179 loc) · 6.34 KB
/
sensor.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
#
#
#Defaults: &defaults
# Company: foo
# Item: 123
#Computer:
# <<: *defaults
# Price: 3000
#
##- platform: command_line
## name: Air Purifier Humidity
## command: miio --control 192.168.1.61 --method get_prop --params '["humidity"]'
## unit_of_measurement: "%"
## value_template: '{{ value | replace("INFO","") | replace("Attempting to control 192.168.1.61","") | replace("Got result:","") | replace("[","") | replace("]","") | replace(" ","") }}'
## scan_interval: 120
##
##- platform: command_line
## name: Air Purifier PM 2.5
## command: miio --control 192.168.1.61 --method get_prop --params '["aqi"]'
## unit_of_measurement: "㎍/m³"
## value_template: '{{ value | replace("INFO","") | replace("Attempting to control 192.168.1.61","") | replace("Got result:","") | replace("[","") | replace("]","") | replace(" ","") }}'
## scan_interval: 120
##- platform: command_line
## name: Air Purifier Power
## command: miio --control 192.168.1.61 --method get_prop --params '["power"]'
## value_template: '{{ value | replace("INFO","") | replace("Attempting to control 192.168.1.61","") | replace("Got result:","") | replace("[","") | replace("]","") | replace(" ","") }}'
## scan_interval: 120
##- platform: command_line
## name: Air Purifier Mode
## command: miio --control 192.168.1.61 --method get_prop --params '["mode"]'
## value_template: '{{ value | replace("INFO","") | replace("Attempting to control 192.168.1.61","") | replace("Got result:","") | replace("[","") | replace("]","") | replace(" ","") }}'
## scan_interval: 120
#
- platform: command_line
name: rpi temp
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(2) }}'
#
#
- platform: template
sensors:
outsideweather_sensor_battery:
friendly_name: 'Outside Weather Sensor Battery'
value_template: '{{ states.sensor.temperature_158d0001563369.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
bedroomweather_sensor_battery:
friendly_name: 'Bedroom Weather Sensor Battery'
value_template: '{{ states.sensor.humidity_158d0001826d95.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
livingroomweather_sensor_battery:
friendly_name: 'Living Room Weather Sensor Battery'
value_template: '{{ states.sensor.temperature_158d0001561c0a.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
#
frontdooropenclose_sensor_battery:
friendly_name: 'Front Door Sensor Battery'
value_template: '{{ states.binary_sensor.switch_158d0001256414.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
#
kitchenmotion_sensor_battery:
friendly_name: 'Kitchen Motion Sensor Battery'
value_template: '{{ states.binary_sensor.motion_sensor_158d00015b5bab.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
livingroommotion_sensor_battery:
friendly_name: 'Living Room Motion Sensor Battery'
value_template: '{{ states.binary_sensor.motion_sensor_158d00015a912d.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
#
frontdoorswitch_sensor_battery:
friendly_name: 'Front Door Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d0001256414.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
kitchenswitch_sensor_battery:
friendly_name: 'Kitchen Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d00013ecdbf.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
bedroomswitch_sensor_battery:
friendly_name: 'Bedroom Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d00013ecde4.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
bathroomswitch_sensor_battery:
friendly_name: 'Bathroom Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d00016bdb80.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
sofaswitch_sensor_battery:
friendly_name: 'Sofa Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d00016bdbc5.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
bedswitch_sensor_battery:
friendly_name: 'Bed Switch Battery'
value_template: '{{ states.binary_sensor.switch_158d00016bdbdd.attributes.battery_level }}'
unit_of_measurement: '%'
icon_template: mdi:battery
#
purifier_motor_speed:
friendly_name: 'Motor Speed'
unit_of_measurement: 'rpm'
icon_template: mdi:gauge
value_template: '{{ states.fan.living_room_air_purifier.attributes.motor_speed | round(0) }}'
#
purifier_mode:
friendly_name: 'Mode'
value_template: '{{ states.fan.living_room_air_purifier.attributes.mode }}'
#
purifier_humidity:
unit_of_measurement: '%'
friendly_name: 'Humidity'
icon_template: mdi:water-percent
value_template: '{{ float(states.fan.living_room_air_purifier.attributes.humidity) }}'
#
purifier_temperature:
friendly_name: 'Temperature'
unit_of_measurement: '°C'
icon_template: mdi:thermometer
value_template: '{{ float(states.fan.living_room_air_purifier.attributes.temperature) }}'
#
purifier_aqi:
unit_of_measurement: '#'
friendly_name: 'AQI'
icon_template: mdi:texture
value_template: '{{ float(states.fan.living_room_air_purifier.attributes.aqi) }}'
#
#
purifier_led:
friendly_name: 'LED'
value_template: '{{ states.fan.living_room_air_purifier.attributes.led }}'
#
#
#
#- platform: speedtest
# minute:
# - 0
# - 30
# monitored_conditions:
# - ping
# - download
# - upload
#
#
- platform: darksky
api_key: !secret DARKSKY_API
monitored_conditions:
- summary
- precip_probability
- temperature
- apparent_temperature
- wind_speed
- humidity
#
- platform: time_date
hidden: true
display_options:
- 'time'
- 'date'
#
- platform: cpuspeed
name: CPU
#
- platform: systemmonitor
resources:
- type: memory_free
- type: memory_use_percent
- type: processor_use
- type: since_last_boot
#
#
# EOF