> For the complete documentation index, see [llms.txt](https://homey.solweb.no/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://homey.solweb.no/aggregated-state/ventilation.md).

# Ventilation

I have a logic boolean variable `vent` which should result in ventilation running on **high** if `true`, and **medium** if `false`.

Then I use logic like:

```javascript
if (home) {
    if (vent) {
        fanmode = "High"
    } else {
        fanmode = "Medium"
    }
} else {
    fanmode = "Low"
}
```

The vent variable should be true if either there is a high CO2 level is high or there is high humidity in the bathroom.

The flow for updating the aggregated `vent` variable goes like this (and there is a duplicated trigger flow for each of the vent-.. variables.

![](/files/-Ltp8z_-VKg9tU3tRY6Q)
