Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

MQTT Button as device for Automation

$
0
0

@dyfcom wrote:

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

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>