Dyson Pure Cool TP04 automation

I’m trying to trigger my fan to go on if there’s movement in the room with the condition that the air quality is poor or above. I’ve hacked together what I think should work but it doesn’t trigger the fan to start. It’s probably some thing simple I can’t figure out, any help would be much appreciated.

- alias: LR Fan - On - Air Quality Poor
  trigger:
  - platform: state
    entity_id: binary_sensor.motion_sensor_158d0002b7ef95
    from: 'off'
    to: 'on'
  condition:
  - condition: numeric_state
    entity_id: air_quality.living_room
    above: '10'
  action:
  - service: fan.turn_on
    entity_id: fan.living_room

- alias: LR Fan - Off - Air Quality Good
  trigger:
  - platform: state
    entity_id: binary_sensor.motion_sensor_158d0002b7ef95
    from: 'on'
    to: 'off'
  condition:
  - condition: numeric_state
    entity_id: air_quality.living_room
    below: '10'
  action:
  - service: fan.turn_off
    entity_id: fan.living_room