HA timer trigger sends MQTT command

I would like HA to send a MQTT topic/payload out based on a timer trigger.

Any examples?

Thanks in advance.

Like when a timer entity finishes and generates a timer.finished event (use an Event Trigger) or at a specific time (use a Time Trigger)?

Publish the payload using the mqtt.publish service call.


alias: example_1
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.your_timer
condition: []
action:
  - service: mqtt.publish
    data:
      topic: your/topic
      payload: 'Your payload'
mode: single
alias: example_2
trigger:
  - platform: time
    at: '08:30:00'
condition: []
action:
  - service: mqtt.publish
    data:
      topic: your/topic
      payload: 'Your payload'
mode: single

Thank you!! Example 2 looks like the ticket.
I’ll test it tomorrow and respond back.

Thank you, Thank you, Thanks you! Worked perfectly!

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.