Automation not triggering for exhaust fan

New to HA and so far enjoying it.
Have configured Zigbee2mqtt and have a Xiaomi temp and humidity sensor and also a Aeotec Smart plug.
Im wanting the a bathroom exhaust fan to turn on/off when a certain humidity is reached.
For some reason i cant get either automation to turn fan on or off to fire automatically but clicking on run actions works even if though the humidity range is / isnt reached.
Code to turn fan on is below:
id: ‘1648764780061’
alias: Ensuite Exhaust Fan On
description: ‘’
trigger:

  • platform: time_pattern
    minutes: ‘5’
    condition:
  • condition: numeric_state
    entity_id: sensor.humidity_sensor_ens_humidity
    above: ‘54’
    attribute: humidity
  • condition: time
    before: ‘19:30:00’
    after: ‘07:00:00’
    weekday:
    • mon
    • tue
    • wed
    • thu
    • fri
    • sat
    • sun
  • condition: state
    entity_id: switch.power_plug_ens
    state: ‘off’
    action:
  • type: turn_on
    device_id: c36c9303739d7f06b9f6a73ec8316f23
    entity_id: switch.power_plug_ens
    domain: switch
    mode: single

Please paste yaml formatted, i.e. let it be preceded by 3 backquotes ```
Then, try to change condition in : after:07:00 followed by before 19:30 (change the order ), not 100% sure but mine are all showing first the early time then the late time.