hello,
I am trying making make wall button with momentary buttons. so I pick d1 mini (because I had spares ) but how to write button in home assistant config. It reads button state quite well but command topic is not working.
- platform: mqtt
name: “Stalo Button”
command_topic: “cmnd/D1mini/power”
state_topic: “stat/D1mini/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: false
value_template: “{{ value_json.DHT11.POWER }}”
I suggest ditching MQTT for the ESPhome API. Makes things VERY easy
with auto-discovery makes things easy , but writing program its not appealing for that reason using tasmota
There is very little to program with ESPhome… You set up a switch using yaml code and that’s it. There is even a HassIO add-on with a wizard to guide you
oh thanks i didn’t know its in yaml. how add-on is called ?
You add the repository to the HassIO add-ons. Its in the ESPhome instructions