Simple automation with script call did not work

I have an automation that calls a script as shown below.
I know the trigger works, because the action used to be to turn off the fan (switch.turn_off).
I wanted to add a delay and felt it was safer to have a delay in a script. But 10 minutes passed with no turn-off. I cannot see why this is not working.
Any thoughts are appreciated.

- alias: master humidity off
  trigger:
    - platform: numeric_state
      entity_id: sensor.master_shower_humidity
      below: 63
  action:
    - service: script.turn_on
      entity_id: master_humidity_off
master_humidity_off:
  description: "Turn off master bath" 
  sequence:
  - delay:
      minutes: 10
  - service: switch.turn_off
    entity_id: switch.master_bath

Did you restart or reload scripts while waiting in that delay?

Because that will stop the script running.

Traces are available for scripts too:

Check your entity, it has no domain prefix.

1 Like

Should probably be:

entity_id: script.master_humidity_off

I know that’s what you implied, but in case OP is new I’m just making it clear.