I'd like to automate an extractor fan based on humidity sensor, but have it trigger if the value is already above the indicated value, but have this work alongside a motion trigger

Hello, I’ve got 2 use cases here I am trying to satisfy. In my bathroom I have an extractor fan which has a Sonoff switch installed in the loft to trigger the fan. There is also a Sonoff motion sensor in there, 6 hue GU10 spotlights and an Aqara temp/humidity sensor

I’m trying to achieve;

  1. Motion sensor is triggered, lights and fan come on, timer set of 7 minutes, lights and fan go off. I set this to restart so if additional motion is detected, the timer starts again. Purpose of this was just for quick visits to the bathroom to trigger lights and fan.

  2. Humidity sensor detects humidity above 72%, turns fans on, then a separate automation to turn them off below 70%

What I am finding is that the humidity automation isn’t working if the lights time out (if for example in a bath and not enough motion to trigger it). As the humidity is then already above 70%, the fans only spin up once motion is detected again, but that will only last 7 minutes after motion, rather than achieving the 70% humidity target.

Is there a way to adjust the automation so that if the value is already >72, not tracking when it crosses 72, then it will trigger? Likewise the fan turning off automation. And is there any way to cleverly combine these two automations so that they’re not competing with each other?

This is the fan ON automation, with an identical reverse one for 70%

alias: Bathroom Fan ON
description: ""
trigger:
  - type: humidity
    platform: device
    device_id: f39ec06497e0b247aed101c31b4affb2
    entity_id: sensor.lumi_lumi_weather_humidity
    domain: sensor
    above: 72
condition: []
action:
  - type: turn_on
    device_id: 8241917184d2052de71c03acdfcee0fb
    entity_id: light.fan_bathroom
    domain: light
mode: single
alias: Bathroom Motion New
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 62dd418ab980a1d19f4119bc5a835800
    entity_id: binary_sensor.bathroom_motion_iaszone
    domain: binary_sensor
condition:
  - condition: time
    after: "07:00:00"
    before: "00:30:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
action:
  - type: turn_on
    device_id: 8241917184d2052de71c03acdfcee0fb
    entity_id: light.fan_bathroom
    domain: light
  - type: turn_on
    device_id: 54c3aecd65e633bdc25bc3f3f2978a91
    entity_id: light.bathroom
    domain: light
  - delay:
      hours: 0
      minutes: 7
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 8241917184d2052de71c03acdfcee0fb
    entity_id: light.fan_bathroom
    domain: light
  - type: turn_off
    device_id: 54c3aecd65e633bdc25bc3f3f2978a91
    entity_id: light.bathroom
    domain: light
mode: restart