working \o/

This commit is contained in:
foosinn 2022-01-15 11:27:52 +01:00
parent ec8996f7b4
commit ddf33c62de
2 changed files with 10 additions and 4 deletions

View file

@ -52,6 +52,11 @@ light:
update_interval: 10ms
lambda: |-
int val = ((id(bme280_pressure).state - 900) * 0.08) - 4;
if (val < 0) {
val = 0;
} else if (val > 8) {
val = 8;
}
Color red = Color((uint8_t)192, (uint8_t)0, (uint8_t)0, (uint8_t)255);
Color yellow = Color((uint8_t)128, (uint8_t)128, (uint8_t)0, (uint8_t)255);