I have a esp01 that runs on batteries and put to deep sleep.
I want it to send a mqtt message to a switch (switch change to on) at startup.
Can’t figure out how to do this on the esp. I now use the bith_message but there must be another way.
Feels like kind of dirty workaround…
on HA i have this:
- platform: mqtt
state_topic: "esp/iot03/binary_sensor/mailbox/state"
command_topic: "esp/iot03/binary_sensor/mailbox/state/set"
optimistic: true
name: Brevlåda
icon: mdi:mailbox
my esp:
mqtt:
broker: xxx
discovery: True
username: xxx
password: xxx
topic_prefix: esp/iot03
birth_message:
topic: "esp/iot03/binary_sensor/mailbox/state"
payload: "ON"
I need to set up the binary_sensor in esp. Not sure what to put there
binary_sensor:
- platform: