Request up to date MQTT sensor data in automation condition

I have illuminance sensor connected to Sonoff Basic flashed with Tasmota firmware and MQTT sensor set up on HA side:

- platform: mqtt
  name: "Bedroom Illuminance"
  state_topic: "tele/sonoff9/SENSOR"
  unit_of_measurement: lx
  icon: mdi:brightness-7
  device_class: illuminance
  value_template: "{{ value_json.BH1750.Illuminance }}"

When using this sensot data as automation condition it is outdated because sonoff publishes to tele/sonoff9/SENSOR every 5 minutes (default period in Tasmota).

Is there a way to publish cmnd/sonoff9/Status 10 -> evaluate based on updated state of upper sensor in condition block of automation?

P.S. I am aware I can reduce teleperiod on Sonoff Basic side but would like to avoid creating such additional load on Sonoff and Mosquito broker because particular automation will trigger rarely.

You can use conditions in the action part of automations too.
So you can publish ‘10’ to cmnd/sonoff9/status, maybe a short delay and then use a condition with the value of a second mqtt sensor with topic stat/sonoff9/STATUS10

Thanks for hint.

I created automation I wanted with on demand BH1750 illumination sensor data as condition and after quick tests it seems to work.

For others that may be interested:
Sensor:

- platform: mqtt
  name: "On Demand Bedroom Illuminance"
  state_topic: "stat/sonoff9/STATUS10"
  unit_of_measurement: lx
  icon: mdi:brightness-7
  device_class: illuminance
  value_template: "{{ value_json.StatusSNS.BH1750.Illuminance }}"

Automation:

- alias: Ambilight enable when starting playback and it is dark enough
  trigger:
    - platform: state
      entity_id: media_player.kodi
      to: 'playing'
  action:
    - service: mqtt.publish
      data:
        topic: "cmnd/sonoff9/status"
        payload: "10"
    - delay:
        seconds: 10
    - condition: or
      conditions:
        - condition: numeric_state
          entity_id: sensor.on_demand_bedroom_illuminance
          below: 30
    - service: shell_command.tv_ambilight_on