Can’t save automation because it must contain at least one of below, above

There’s one issue I noticed now. It seems the filter sensor doesn’t check the air quality when the fan speed is set to 0. I need to figure out how to turn the fan off while still checking the quality. I’m sure this wasn’t an issue before.

Edit: I think I can do it by not setting the fan speed to 0 but by turning the filter off. For some Eason this way it continues to check the air quality. Thought I could do this with a simple choose that turns the filter off if the ID is 0 and the default action being your code but I can’t even figure out how to do a proper choose.

alias: Luftfilter nach PM25
description: ""
mode: single
triggers:
  - id: "0"
    trigger: numeric_state
    entity_id: sensor.filter_wz_pm25
    below: 5
    for:
      minutes: 1
  - id: "33"
    trigger: numeric_state
    entity_id: sensor.filter_wz_pm25
    above: 5
    below: 10
    for:
      minutes: 1
  - id: "66"
    trigger: numeric_state
    entity_id: sensor.filter_wz_pm25
    above: 10
    below: 50
    for:
      minutes: 1
  - id: "100"
    trigger: numeric_state
    entity_id: sensor.filter_wz_pm25
    above: 50
    for:
      minutes: 1
conditions: []
actions:
  - if: "{{ trigger.id | int(0) > 0 }}"
    then:
      - action: fan.set_percentage
        metadata: {}
        target:
          entity_id: fan.filter_wz_level
        data:
          percentage: "{{ trigger.id }}"
    else:
      - action: fan.turn_off
        metadata: {}
        target:
          entity_id: fan.filter_wz_level

I wanted to do some testing in the meantime to find where the issue comes from and now I’m even more confused.

To test I kept your original script as is except I changed the timer to 10 seconds. Then I turned it on manually to get it to read the actual quality. When the quality went below 5 the purifier turned off. I waited a while, then opened a window to get the value rising and even though the purifier was off it detected the change in air quality and the automation triggered as expected. I suspect it was only working because I kept the VeSync app open on my phone to watch the value and this somehow makes the purifier check the air? I don’t know why else the value sat at 5 for hours until I turned the purifier on manually and the value suddenly jumped above 50.

Seems like you need to do more experiments with the air purifier to learn all of its behavioral characteristics.