We have a Flexit balanced ventilation system.
Unfortunately it doesn’t have any smartness, so it stays on the same ventilation level if it’s hot or humid.
Fortunately it’s possible to control the system through relays and with the help of ESP (ESPHome) and Aqara Humidity sensors.

Since humidity is changing from day to day I have made an average humidity sensor for the whole house as a baseline to trigger changes in humidity in bathrooms.

ESP:

switch:
  - platform: gpio
    pin: 5
    name: "S1 fan speed 1"
    id: relay1
    interlock: &interlock_group [relay1, relay2, relay3, relay4]
  - platform: gpio
    pin: 4
    name: "S2 fan speed 2"
    id: relay2
    interlock: *interlock_group
  - platform: gpio
    pin: 0
    name: "S3 fan speed 3"
    id: relay3
    interlock: *interlock_group
  - platform: gpio
    pin: 14
    name: "S4 fan speed 4"
    id: relay4
    interlock: *interlock_group
  - platform: gpio
    pin: 12
    name: "Cooling recovery"
    id: relay5
  - platform: gpio
    pin: 13
    name: "Relay 6"
    id: relay6

Sensor:

# Humidity average house
- platform: template
  sensors:
    humidity_average_house:
      friendly_name: 'Humidity average house'
      value_template: "{{ ((state_attr('sensor.living_room1_humidity_air', 'value') + state_attr('sensor.living_room2_humidity_air', 'value') + state_attr('sensor.attic1_humidity_air', 'value') + state_attr('sensor.attic2_humidity_air', 'value') + state_attr('sensor.office_humidity_air', 'value')) /5) }}"
      unit_of_measurement: "%"

Binary sensor:

- platform: template
  sensors:
    high_humidity_main_bathroom:
      value_template: >-
        {{ (states('sensor.humidity_average_house') | float *1.2) < (states('sensor.main_bathroom_temperature_sensor_humidity')) | float}}
        
- platform: template
  sensors:
    high_humidity_bathroom:
      value_template: >-
        {{ (states('sensor.humidity_average_house') | float *1.2) < (states('sensor.bathroom_temperature_sensor_humidity')) | float}}

Automation:

# Ventilation state

- alias: Ventilation state
  id: ventilation_state
  trigger:
  - platform: homeassistant
    event: start
  - platform: time_pattern
    minutes: "/5"
  - platform: state
    entity_id: binary_sensor.high_humidity_main_bathroom
    to: 'on'
  - platform: state
    entity_id: binary_sensor.high_humidity_bathroom
    to: 'on'
  - platform: state
    entity_id: binary_sensor.high_humidity_main_bathroom
    to: 'off'
  - platform: state
    entity_id: binary_sensor.high_humidity_bathroom
    to: 'off'
  action:
  - choose:
  # Choice 0 - High temperature increase ventilation 
    - conditions:
        - condition: and
          conditions:
            - condition: numeric_state
              entity_id: sensor.garden_temperature
              above: 5
            - condition: numeric_state
              entity_id: sensor.living_room_1_temperature_air
              above: 24
            - condition: numeric_state
              entity_id: sensor.living_room_2_temperature_air
              above: 25
            - condition: numeric_state
              entity_id: sensor.living_room_3_temperature_air
              above: 25
            - condition: state
              entity_id: switch.s4_fan_speed_4
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_main_bathroom
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_bathroom
              state: 'off'
      sequence:
      - service: switch.turn_on
        data:
          entity_id: switch.s4_fan_speed_4
      - delay: '00:00:10'
      - service: switch.turn_on
        data:
          entity_id: switch.cooling_recovery
  # Choice 1 - Lower temperature decrease ventilation 
    - conditions:
        - condition: and
          conditions:
            - condition: numeric_state
              entity_id: sensor.living_room_1_temperature_air
              below: 23.9
            - condition: numeric_state
              entity_id: sensor.living_room_2_temperature_air
              below: 24.9
            - condition: numeric_state
              entity_id: sensor.living_room_3_temperature_air
              below: 24.9
            - condition: state
              entity_id: switch.s2_fan_speed_2
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_main_bathroom
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_bathroom
              state: 'off'
      sequence:
      - service: switch.turn_on
        data:
          entity_id: switch.s2_fan_speed_2
      - delay: '00:00:10'
      - service: switch.turn_off
        data:
          entity_id: switch.cooling_recovery
  # Choice 2 - Low temperature turn off cooling
    - conditions:
        - condition: and
          conditions:
            - condition: numeric_state
              entity_id: sensor.garden_temperature
              below: 5
            - condition: state
              entity_id: binary_sensor.high_humidity_main_bathroom
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_bathroom
              state: 'off'
      sequence:
      - service: switch.turn_off
        data:
          entity_id: switch.cooling_recovery
  # Choice 3 - High humidity increase ventilation 
    - conditions:
        - condition: and
          conditions:
            - condition: state
              entity_id: binary_sensor.high_humidity_main_bathroom
              state: 'on'
            - condition: state
              entity_id: switch.s4_fan_speed_4
              state: 'off'
      sequence:
      - service: switch.turn_on
        data:
          entity_id: switch.s4_fan_speed_4
  # Choice 4 - High humidity increase ventilation 
    - conditions:
        - condition: and
          conditions:
            - condition: state
              entity_id: binary_sensor.high_humidity_bathroom
              state: 'on'
            - condition: state
              entity_id: switch.s4_fan_speed_4
              state: 'off'
      sequence:
      - service: switch.turn_on
        data:
          entity_id: switch.s4_fan_speed_4
  # Choice 5 - Low humidity decrease ventilation 
    - conditions:
        - condition: and
          conditions:
            - condition: state
              entity_id: binary_sensor.high_humidity_main_bathroom
              state: 'off'
            - condition: state
              entity_id: binary_sensor.high_humidity_bathroom
              state: 'off'
            - condition: state
              entity_id: switch.s2_fan_speed_2
              state: 'off'
      sequence:
      - service: switch.turn_on
        data:
          entity_id: switch.s2_fan_speed_2