MQTT Disable Deep Sleep not working

I’m trying to prevent deep sleep using my MQTT local server. It publishes my online message, but won’t prevent deep sleep. Here is my code:

deep_sleep:
  id: deep_sleep_1
  run_duration: 1min
  sleep_duration: 60min

mqtt:
  broker: 192.168.9.15
  port: 1883
  client_id: propane1
  discovery_retain: true
  discovery: true
  birth_message:
    topic: propane/available
    payload: online
  will_message:
    topic: propane/available
    payload: offline
  on_message:
    - topic: propane/sleep
      payload: 'disabled'
      then:
        - logger.log: 'OTA Mode ON - Deep sleep DISABLED'
        - deep_sleep.prevent: deep_sleep_1
    - topic: propane/sleep
      payload: 'enabled'
      then:
        - logger.log: 'OTA Mode ON - Deep sleep ENABLED'
        - deep_sleep.enter: deep_sleep_1

What am I missing?

Any thoughts as to what I’m doing wrong?

Prevent deep sleep was also not working for me. As a workaround, just use a global bool variable, set it in on_message, check it before entering sleep.

globals:
   - id: sleep_blocked
     type: bool
     restore_value: no
     initial_value: 'false'
mqtt:
  on_message:
    - topic: sensor/ota_mode
      payload: 'ON'
      then:
        - globals.set:
            id: sleep_blocked
            value: 'true' 
script:
 - id: enter_sleep
    mode: single
    then:
      - if:
          condition:
            - lambda: 'return id(sleep_blocked) == false;'
          then:
            - deep_sleep.enter: deep_sleep_1