Mqtt automation of all devices at the start of HA

Hello everyone, I’m new to the forum and my English is not the best, I have a problem with the creation of an automation, I would like all my MQTT devices at the start of HA, detect the correct state.
I managed to make it work only with a device with this automation:
automation:

  • alias: “Censimento stati MQTT”
    trigger:
    platform: homeassistant
    event: start
    action:
    • service: mqtt.publish
      data:
      topic: “cmnd/pianocottura/POWER”
      payload: “”

but I would like to be able to do it with everyone.
Someone could give me some advice?