MQTT Button as device for Automation

Hello,

I want to use a Wemos D1 mini with tasmota and a button to control other devices.

The button sends over MQTT ON or OFF.
Did I need a binary_sensor, switch or a sensor?

This is my current config for the button in my configuration.yaml:

binary_sensor:
#cap-button
  - platform: mqtt
    name: "CapButton"
    state_topic: "stat/WemosD1/POWER"
    payload_on: "ON"
    payload_off: "OFF"
    icon: 'mdi:electric-switch'
    retain: false

In my Automation I can’t see the Button under devices. Same with all my other MQTT-Devices except Devices from zigbee2mqtt. The zigbee2mqtt devices are listed under config->devices and config->integration->MQTT:configuration.yaml

The binary_sensor is showing in Automation under Status, but there are only option where I can use from-to values.

This is my MQTT Integration in configuration.yaml:

#MQTT Integration
mqtt:
  broker: 192.168.0.9
  username: #
  password: #
  discovery: true
  discovery_prefix: homeassistant

How can I add my MQTT-Devices into config->devices? I read that, the devices need an unique_id, but this didn’t work also.

Greetings

Ok, for Tasmota devices I can use this https://tasmota.github.io/docs/#/integrations/Home-Assistant

In the console from the Tasmota-Device:

  1. SetOption19 1
  2. ButtonTopic 0

EDIT:
When you are using a tasmota-device as a light use SetOption 30 1 to integrate as a light.