Skip to content

Commit bb59ae1

Browse files
authored
4.0.7 full config update (#98)
1 parent 4067b1d commit bb59ae1

File tree

5 files changed

+41
-41
lines changed

5 files changed

+41
-41
lines changed

full_config/ag-basic.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.6
2+
config_version: 4.0.7
33
co2_offset: '0'
44
name: ag-basic
55
friendly_name: AG Basic
@@ -10,7 +10,7 @@ esphome:
1010
name_add_mac_suffix: false
1111
project:
1212
name: mallocarray.airgradient
13-
version: 4.0.6
13+
version: 4.0.7
1414
min_version: 2024.6.0
1515
on_boot:
1616
- priority: 200.0
@@ -138,13 +138,13 @@ sensor:
138138
if (x == 0.0) {
139139
result = 0.0;
140140
} else if (x < 30.0) {
141-
result = (0.524 * x) - (0.0862 * id(humidity).state) + 5.75;
141+
result = (0.524 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
142142
} else if (x < 50.0) {
143-
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity).state) + 5.75;
143+
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity_raw).state) + 5.75;
144144
} else if (x < 210.0) {
145-
result = (0.786 * x) - (0.0862 * id(humidity).state) + 5.75;
145+
result = (0.786 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
146146
} else if (x < 260.0) {
147-
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
147+
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity_raw).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
148148
} else {
149149
result = 2.966 + (0.69 * x) + (8.84 * pow(10,-4) * pow(x,2));
150150
}

full_config/ag-one.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.6
2+
config_version: 4.0.7
33
co2_offset: '0'
44
voc_learning_time_offset_hours: '12'
55
nox_learning_time_offset_hours: '12'
@@ -16,7 +16,7 @@ esphome:
1616
name_add_mac_suffix: false
1717
project:
1818
name: mallocarray.airgradient
19-
version: 4.0.6
19+
version: 4.0.7
2020
min_version: 2024.6.0
2121
on_boot:
2222
- priority: 200.0
@@ -150,13 +150,13 @@ sensor:
150150
if (x == 0.0) {
151151
result = 0.0;
152152
} else if (x < 30.0) {
153-
result = (0.524 * x) - (0.0862 * id(humidity).state) + 5.75;
153+
result = (0.524 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
154154
} else if (x < 50.0) {
155-
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity).state) + 5.75;
155+
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity_raw).state) + 5.75;
156156
} else if (x < 210.0) {
157-
result = (0.786 * x) - (0.0862 * id(humidity).state) + 5.75;
157+
result = (0.786 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
158158
} else if (x < 260.0) {
159-
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
159+
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity_raw).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
160160
} else {
161161
result = 2.966 + (0.69 * x) + (8.84 * pow(10,-4) * pow(x,2));
162162
}
@@ -802,7 +802,7 @@ display:
802802
lambda: !lambda |-
803803
it.printf(0, 0, id(open_sans_14), "ID:");
804804
it.printf(128, 0, id(open_sans_14), TextAlign::TOP_RIGHT, "%s", get_mac_address().c_str());
805-
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.6");
805+
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.7");
806806
it.printf(0, 42, id(open_sans_14), "AG One");
807807
- id: summary1
808808
lambda: !lambda |-
@@ -1262,9 +1262,9 @@ binary_sensor:
12621262
then:
12631263
- logger.log:
12641264
format: Toggling display betwen C and F
1265-
tag: main
1266-
args: []
12671265
level: DEBUG
1266+
args: []
1267+
tag: main
12681268
- switch.toggle:
12691269
id: display_in_f
12701270
invalid_cooldown: 1s
@@ -1277,9 +1277,9 @@ binary_sensor:
12771277
then:
12781278
- logger.log:
12791279
format: Starting manual CO2 calibration
1280-
tag: main
1281-
args: []
12821280
level: DEBUG
1281+
args: []
1282+
tag: main
12831283
- senseair.background_calibration:
12841284
id: senseair_s8
12851285
- delay: 70s

full_config/ag-open-air-o-1ppt.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.6
2+
config_version: 4.0.7
33
voc_learning_time_offset_hours: '12'
44
nox_learning_time_offset_hours: '12'
55
name: ag-open-air-o-1ppt
@@ -11,7 +11,7 @@ esphome:
1111
name_add_mac_suffix: false
1212
project:
1313
name: mallocarray.airgradient
14-
version: 4.0.6
14+
version: 4.0.7
1515
min_version: 2024.6.0
1616
on_boot:
1717
- priority: 200.0
@@ -240,13 +240,13 @@ sensor:
240240
if (id(pm_2_5_raw).state == 0.0) {
241241
result = 0.0;
242242
} else if (id(pm_2_5_raw).state < 30.0) {
243-
result = (0.524 * id(pm_2_5_raw).state) - (0.0862 * id(humidity).state) + 5.75;
243+
result = (0.524 * id(pm_2_5_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
244244
} else if (id(pm_2_5_raw).state < 50.0) {
245-
result = (0.786 * (id(pm_2_5_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_raw).state / 20 - 3/2))) * id(pm_2_5_raw).state - (0.0862 * id(humidity).state) + 5.75;
245+
result = (0.786 * (id(pm_2_5_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_raw).state / 20 - 3/2))) * id(pm_2_5_raw).state - (0.0862 * id(humidity_raw).state) + 5.75;
246246
} else if (id(pm_2_5_raw).state < 210.0) {
247-
result = (0.786 * id(pm_2_5_raw).state) - (0.0862 * id(humidity).state) + 5.75;
247+
result = (0.786 * id(pm_2_5_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
248248
} else if (id(pm_2_5_raw).state < 260.0) {
249-
result = (0.69 * (id(pm_2_5_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) * id(pm_2_5_raw).state - (0.0862 * id(humidity).state * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2) * (id(pm_2_5_raw).state / 50 - 21/5));
249+
result = (0.69 * (id(pm_2_5_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) * id(pm_2_5_raw).state - (0.0862 * id(humidity_raw).state * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2) * (id(pm_2_5_raw).state / 50 - 21/5));
250250
} else {
251251
result = 2.966 + (0.69 * id(pm_2_5_raw).state) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2));
252252
}
@@ -401,13 +401,13 @@ sensor:
401401
if (id(pm_2_5_2_raw).state == 0.0) {
402402
result = 0.0;
403403
} else if (id(pm_2_5_2_raw).state < 30.0) {
404-
result = (0.524 * id(pm_2_5_2_raw).state) - (0.0862 * id(humidity).state) + 5.75;
404+
result = (0.524 * id(pm_2_5_2_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
405405
} else if (id(pm_2_5_2_raw).state < 50.0) {
406-
result = (0.786 * (id(pm_2_5_2_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_2_raw).state / 20 - 3/2))) * id(pm_2_5_2_raw).state - (0.0862 * id(humidity).state) + 5.75;
406+
result = (0.786 * (id(pm_2_5_2_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_2_raw).state / 20 - 3/2))) * id(pm_2_5_2_raw).state - (0.0862 * id(humidity_raw).state) + 5.75;
407407
} else if (id(pm_2_5_2_raw).state < 210.0) {
408-
result = (0.786 * id(pm_2_5_2_raw).state) - (0.0862 * id(humidity).state) + 5.75;
408+
result = (0.786 * id(pm_2_5_2_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
409409
} else if (id(pm_2_5_2_raw).state < 260.0) {
410-
result = (0.69 * (id(pm_2_5_2_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) * id(pm_2_5_2_raw).state - (0.0862 * id(humidity).state * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_2_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_2_raw).state,2) * (id(pm_2_5_2_raw).state / 50 - 21/5));
410+
result = (0.69 * (id(pm_2_5_2_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) * id(pm_2_5_2_raw).state - (0.0862 * id(humidity_raw).state * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_2_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_2_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_2_raw).state,2) * (id(pm_2_5_2_raw).state / 50 - 21/5));
411411
} else {
412412
result = 2.966 + (0.69 * id(pm_2_5_2_raw).state) + (8.84 * pow(10,-4) * pow(id(pm_2_5_2_raw).state,2));
413413
}
@@ -511,7 +511,7 @@ sensor:
511511
id: humidity_avg
512512
name: Humidity (Average)
513513
lambda: !lambda |-
514-
return (id(humidity).state + id(humidity_2).state) / 2.0;
514+
return (id(humidity_raw).state + id(humidity_2).state) / 2.0;
515515
unit_of_measurement: '%'
516516
accuracy_decimals: 1
517517
device_class: humidity

full_config/ag-open-air-o-1pst.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.6
2+
config_version: 4.0.7
33
co2_offset: '0'
44
voc_learning_time_offset_hours: '12'
55
nox_learning_time_offset_hours: '12'
@@ -12,7 +12,7 @@ esphome:
1212
name_add_mac_suffix: false
1313
project:
1414
name: mallocarray.airgradient
15-
version: 4.0.6
15+
version: 4.0.7
1616
min_version: 2024.6.0
1717
on_boot:
1818
- priority: 200.0
@@ -241,13 +241,13 @@ sensor:
241241
if (id(pm_2_5_raw).state == 0.0) {
242242
result = 0.0;
243243
} else if (id(pm_2_5_raw).state < 30.0) {
244-
result = (0.524 * id(pm_2_5_raw).state) - (0.0862 * id(humidity).state) + 5.75;
244+
result = (0.524 * id(pm_2_5_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
245245
} else if (id(pm_2_5_raw).state < 50.0) {
246-
result = (0.786 * (id(pm_2_5_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_raw).state / 20 - 3/2))) * id(pm_2_5_raw).state - (0.0862 * id(humidity).state) + 5.75;
246+
result = (0.786 * (id(pm_2_5_raw).state / 20 - 3/2) + 0.524 * (1 - (id(pm_2_5_raw).state / 20 - 3/2))) * id(pm_2_5_raw).state - (0.0862 * id(humidity_raw).state) + 5.75;
247247
} else if (id(pm_2_5_raw).state < 210.0) {
248-
result = (0.786 * id(pm_2_5_raw).state) - (0.0862 * id(humidity).state) + 5.75;
248+
result = (0.786 * id(pm_2_5_raw).state) - (0.0862 * id(humidity_raw).state) + 5.75;
249249
} else if (id(pm_2_5_raw).state < 260.0) {
250-
result = (0.69 * (id(pm_2_5_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) * id(pm_2_5_raw).state - (0.0862 * id(humidity).state * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2) * (id(pm_2_5_raw).state / 50 - 21/5));
250+
result = (0.69 * (id(pm_2_5_raw).state / 50 - 21/5) + 0.786 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) * id(pm_2_5_raw).state - (0.0862 * id(humidity_raw).state * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (2.966 * (id(pm_2_5_raw).state / 50 - 21/5)) + (5.75 * (1 - (id(pm_2_5_raw).state / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2) * (id(pm_2_5_raw).state / 50 - 21/5));
251251
} else {
252252
result = 2.966 + (0.69 * id(pm_2_5_raw).state) + (8.84 * pow(10,-4) * pow(id(pm_2_5_raw).state,2));
253253
}

full_config/ag-pro.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 4.0.6
2+
config_version: 4.0.7
33
co2_offset: '0'
44
voc_learning_time_offset_hours: '12'
55
nox_learning_time_offset_hours: '12'
@@ -12,7 +12,7 @@ esphome:
1212
name_add_mac_suffix: false
1313
project:
1414
name: mallocarray.airgradient
15-
version: 4.0.6
15+
version: 4.0.7
1616
min_version: 2024.6.0
1717
on_boot:
1818
- priority: 200.0
@@ -140,13 +140,13 @@ sensor:
140140
if (x == 0.0) {
141141
result = 0.0;
142142
} else if (x < 30.0) {
143-
result = (0.524 * x) - (0.0862 * id(humidity).state) + 5.75;
143+
result = (0.524 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
144144
} else if (x < 50.0) {
145-
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity).state) + 5.75;
145+
result = (0.786 * (x / 20 - 3/2) + 0.524 * (1 - (x / 20 - 3/2))) * x - (0.0862 * id(humidity_raw).state) + 5.75;
146146
} else if (x < 210.0) {
147-
result = (0.786 * x) - (0.0862 * id(humidity).state) + 5.75;
147+
result = (0.786 * x) - (0.0862 * id(humidity_raw).state) + 5.75;
148148
} else if (x < 260.0) {
149-
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
149+
result = (0.69 * (x / 50 - 21/5) + 0.786 * (1 - (x / 50 - 21/5))) * x - (0.0862 * id(humidity_raw).state * (1 - (x / 50 - 21/5))) + (2.966 * (x / 50 - 21/5)) + (5.75 * (1 - (x / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(x,2) * (x / 50 - 21/5));
150150
} else {
151151
result = 2.966 + (0.69 * x) + (8.84 * pow(10,-4) * pow(x,2));
152152
}
@@ -747,7 +747,7 @@ display:
747747
lambda: !lambda |-
748748
it.printf(0, 0, id(open_sans_14), "ID:");
749749
it.printf(128, 0, id(open_sans_14), TextAlign::TOP_RIGHT, "%s", get_mac_address().c_str());
750-
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.6");
750+
it.printf(0, 21, id(open_sans_14), "Config Ver: 4.0.7");
751751
it.printf(0, 42, id(open_sans_14), "AG Pro");
752752
- id: blank
753753
lambda: !lambda |-

0 commit comments

Comments
 (0)