Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions full_config/ag-basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions full_config/ag-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
8 changes: 4 additions & 4 deletions full_config/ag-open-air-o-1ppt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down Expand Up @@ -454,11 +454,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions full_config/ag-open-air-o-1pst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions full_config/ag-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003_extended_life.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003t.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003t_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003t_2_extended_life.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sensor_pms5003t_extended_life.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ sensor:
} else if (pm_2_5_calibrated < 30.0) {
result = (0.524 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 50.0) {
result = (0.786 * (pm_2_5_calibrated / 20 - 3/2) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3/2))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
result = (0.786 * (pm_2_5_calibrated / 20 - 3.0/2.0) + 0.524 * (1 - (pm_2_5_calibrated / 20 - 3.0/2.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 210.0) {
result = (0.786 * pm_2_5_calibrated) - (0.0862 * id(humidity_raw).state) + 5.75;
} else if (pm_2_5_calibrated < 260.0) {
result = (0.69 * (pm_2_5_calibrated / 50 - 21/5) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21/5))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (2.966 * (pm_2_5_calibrated / 50 - 21/5)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21/5))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21/5));
result = (0.69 * (pm_2_5_calibrated / 50 - 21.0/5.0) + 0.786 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) * pm_2_5_calibrated - (0.0862 * id(humidity_raw).state * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (2.966 * (pm_2_5_calibrated / 50 - 21.0/5.0)) + (5.75 * (1 - (pm_2_5_calibrated / 50 - 21.0/5.0))) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2) * (pm_2_5_calibrated / 50 - 21.0/5.0));
} else {
result = 2.966 + (0.69 * pm_2_5_calibrated) + (8.84 * pow(10,-4) * pow(pm_2_5_calibrated,2));
}
Expand Down