-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathsensors.yaml
executable file
·196 lines (190 loc) · 7.54 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
- platform: mqtt
name: 阳台温度
device_class: temperature
state_topic: NodeMCU1/temperature
unit_of_measurement: °C
availability_topic: NodeMCU1/status
- platform: mqtt
name: 阳台湿度
device_class: humidity
state_topic: NodeMCU1/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU1/status
- platform: mqtt
name: 阳台颗粒物
icon: mdi:blur
state_topic: NodeMCU1/pm2dot5
unit_of_measurement: μg/m³
availability_topic: NodeMCU1/status
- platform: mqtt
name: 书房温度
device_class: temperature
state_topic: NodeMCU2/temperature
unit_of_measurement: °C
availability_topic: NodeMCU2/status
- platform: mqtt
name: 书房湿度
device_class: humidity
state_topic: NodeMCU2/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU2/status
- platform: mqtt
name: 书房二氧化碳
icon: mdi:molecule-co2
state_topic: NodeMCU2/co2
unit_of_measurement: ppm
availability_topic: NodeMCU2/status
- platform: mqtt
name: 书房亮度
device_class: illuminance
state_topic: NodeMCU2/lux
unit_of_measurement: lm
availability_topic: NodeMCU2/status
- platform: mqtt
name: 主卧亮度
device_class: illuminance
state_topic: NodeMCU5/analog
availability_topic: NodeMCU5/status
#unit_of_measurement: lm
- platform: mqtt
name: 儿童房温度
device_class: temperature
state_topic: NodeMCU6/temperature
unit_of_measurement: °C
availability_topic: NodeMCU6/status
- platform: mqtt
name: 儿童房湿度
device_class: humidity
state_topic: NodeMCU6/humidity
unit_of_measurement: '%'
availability_topic: NodeMCU6/status
- platform: mqtt
name: 儿童房颗粒物
icon: mdi:blur
state_topic: NodeMCU6/pm2dot5
unit_of_measurement: μg/m³
availability_topic: NodeMCU6/status
- platform: mqtt
name: 儿童房二氧化碳
icon: mdi:molecule-co2
state_topic: NodeMCU6/co2
unit_of_measurement: ppm
availability_topic: NodeMCU6/status
- platform: mqtt
name: 餐厅温度
device_class: temperature
state_topic: device/zm1/b0f8931ea148/sensor
value_template: '{{ value_json.temperature }}'
unit_of_measurement: °C
- platform: mqtt
name: 餐厅湿度
device_class: humidity
state_topic: device/zm1/b0f8931ea148/sensor
value_template: '{{ value_json.humidity }}'
unit_of_measurement: '%'
- platform: mqtt
name: 餐厅颗粒物
icon: mdi:blur
state_topic: device/zm1/b0f8931ea148/sensor
value_template: '{{ value_json.PM25 }}'
unit_of_measurement: μg/m³
- platform: mqtt
name: 餐厅甲醛
icon: mdi:biohazard
state_topic: device/zm1/b0f8931ea148/sensor
value_template: '{{ value_json.formaldehyde }}'
- platform: mqtt
name: 过道温度
device_class: temperature
state_topic: device/zm1/b0f893249132/sensor
value_template: '{{ value_json.temperature }}'
unit_of_measurement: °C
- platform: mqtt
name: 过道湿度
device_class: humidity
state_topic: device/zm1/b0f893249132/sensor
value_template: '{{ value_json.humidity }}'
unit_of_measurement: '%'
- platform: mqtt
name: 过道颗粒物
icon: mdi:blur
state_topic: device/zm1/b0f893249132/sensor
value_template: '{{ value_json.PM25 }}'
unit_of_measurement: μg/m³
- platform: mqtt
name: 过道甲醛
icon: mdi:biohazard
state_topic: device/zm1/b0f893249132/sensor
value_template: '{{ value_json.formaldehyde }}'
- platform: template
sensors:
ci_wo_wen_du:
friendly_name: 次卧温度
device_class: temperature
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "temperature") }}'
unit_of_measurement: °C
ci_wo_shi_du:
friendly_name: 次卧湿度
device_class: humidity
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "humidity") }}'
unit_of_measurement: '%'
ci_wo_ke_li_wu:
friendly_name: 次卧颗粒物
value_template: '{{ state_attr("fan.ci_wo_jing_hua_qi", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
ke_ting_wen_du:
friendly_name: 客厅温度
device_class: temperature
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "temperature") }}'
unit_of_measurement: °C
ke_ting_shi_du:
friendly_name: 客厅湿度
device_class: humidity
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "humidity") }}'
unit_of_measurement: '%'
ke_ting_ke_li_wu:
friendly_name: 客厅颗粒物
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
ke_ting_er_yang_hua_tan:
friendly_name: 客厅二氧化碳
value_template: '{{ state_attr("fan.ke_ting_xin_feng_ji", "co2") }}'
unit_of_measurement: ppm
icon_template: mdi:molecule-co2
zhu_wo_wen_du:
friendly_name: 主卧温度
device_class: temperature
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "temperature") }}'
unit_of_measurement: °C
zhu_wo_shi_du:
friendly_name: 主卧湿度
device_class: humidity
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "humidity") }}'
unit_of_measurement: '%'
zhu_wo_ke_li_wu:
friendly_name: 主卧颗粒物
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "aqi") }}'
unit_of_measurement: μg/m³
icon_template: mdi:blur
zhu_wo_er_yang_hua_tan:
friendly_name: 主卧二氧化碳
value_template: '{{ state_attr("fan.zhu_wo_xin_feng_ji", "co2") }}'
unit_of_measurement: ppm
icon_template: mdi:molecule-co2
# ke_ting_kong_diao_mo_shi:
# friendly_name: 客厅空调模式
# value_template: '{% set mode = state_attr("climate.ke_ting_kong_diao", "fan_mode") %}{% if is_state("climate.ke_ting_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# can_ting_kong_diao_mo_shi:
# friendly_name: 餐厅空调模式
# value_template: '{% set mode = state_attr("climate.can_ting_kong_diao", "fan_mode") %}{% if is_state("climate.can_ting_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# zhu_wo_kong_diao_mo_shi:
# friendly_name: 主卧空调模式
# value_template: '{% set mode = state_attr("climate.zhu_wo_kong_diao", "fan_mode") %}{% if is_state("climate.zhu_wo_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# er_tong_fang_kong_diao_mo_shi:
# friendly_name: 儿童房空调模式
# value_template: '{% set mode = state_attr("climate.er_tong_fang_kong_diao", "fan_mode") %}{% if is_state("climate.er_tong_fang_kong_diao", "off") %}off{% elif mode == "自动" %}自{% elif mode == "一档" %}一{% elif mode == "二档" %}二{% elif mode == "三档" %}三{% elif mode == "四档" %}四{% elif mode == "五档" %}五{% else %}{{ mode }}{% endif %}'
# shu_fang_kong_diao_mo_shi:
# friendly_name: 书房空调模式
# value_template: '{% set mode = state_attr("climate.shu_fang_kong_diao", "fan_mode") %}{% if is_state("climate.shu_fang_kong_diao", "off") %}off{% elif mode == "low" %}一{% elif mode == "mid" %}二{% elif mode == "high" %}三{% elif mode == "highest" %}四{% else %}{{ mode }}{% endif %}'