Remove numeric from IAQ value
This just borked HomeAssistant so have separate numeric and textual values instead.
This commit is contained in:
parent
09bc88c259
commit
812e534fb9
@ -607,28 +607,28 @@ text_sensor:
|
|||||||
lambda: |-
|
lambda: |-
|
||||||
int iaq = int(id(bme680_iaq).state);
|
int iaq = int(id(bme680_iaq).state);
|
||||||
if (iaq <= 50) {
|
if (iaq <= 50) {
|
||||||
return {"Excellent (" + to_string(iaq) + ")"};
|
return {"Excellent"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 100) {
|
else if (iaq <= 100) {
|
||||||
return {"Good (" + to_string(iaq) + ")"};
|
return {"Good"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 150) {
|
else if (iaq <= 150) {
|
||||||
return {"Fair (" + to_string(iaq) + ")"};
|
return {"Fair"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 200) {
|
else if (iaq <= 200) {
|
||||||
return {"Moderate (" + to_string(iaq) + ")"};
|
return {"Moderate"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 250) {
|
else if (iaq <= 250) {
|
||||||
return {"Bad (" + to_string(iaq) + ")"};
|
return {"Bad"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 350) {
|
else if (iaq <= 350) {
|
||||||
return {"Very Bad (" + to_string(iaq) + ")"};
|
return {"Very Bad"};
|
||||||
}
|
}
|
||||||
else if (iaq <= 500) {
|
else if (iaq <= 600) {
|
||||||
return {"Terrible (" + to_string(iaq) + ")"};
|
return {"Terrible"};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return {"Unknown (" + to_string(iaq) + ")"};
|
return {"Unknown"};
|
||||||
}
|
}
|
||||||
|
|
||||||
- platform: wifi_info
|
- platform: wifi_info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user