I have a 4 relay Itead board, running Tasmota.
Two of them are configured as “Momentary Switch” (like a pushbutton) and when activated have been deactivated after 0.5 s, they control the Home Gate.
Now I have configured these switches as buttons using the MQTT yaml files.
I would like to configure the switches using the tasmota integration, but using tasmota integration a switch can be configured as switch, outlet, cover, fan, light, lock, siren, or valve, but not button.
Could you add the ability to configure the switch as a button as well?
The problem is in Home Assistant a switch and a button are fundamentally different things. A switch is a physical entity with an actual state (on off).
A button has no state, it just creates an event. and the closest thing to a state is the timestamp of the last time it sent an event.
So no, HA is not built that way and changing that is VERY unlikely.
I’m clear what is a button ad what is a switch, but to open the front gate, with its own control board, I only need “an event”. The event is generated by a tasmota relay, configured to be deactivated 0.5s after the activation.
For this reason, now this relay is configured as button entity in configuration.yaml: