Tasmota and Setoption19 HA discovery

I hope this is an easy one and dont want to waste anyones time!
pretty new to all of this…
i have 2 freshly tasmotised devices a basic and a 4ch pro2
i have set set up the basic as switchmode 5 using the hold function. i also have a rule on the basic to toggle relay2 on the 4chpro when the switch is held.
it works fine… and i can also use the MQTT publish a packet in HA to control both devices.
but… when i setoption19 in home assistant i get home assistant control but the rule and even MQTT control from publish a packet doesn’t work.
am i forced to recreate this functionality within home assistant rules if i setoption19 or is there a way to make them play nicely together?
With thanks :slight_smile:

Did you mean to say “when I enabled SetOption19 in Tasmota”?

According to Tasmota’s documentation the option makes the devices discoverable by Home Assistant.

Home Assistant automatic discovery.
WARNING On version 6.4.1.x enabling may cause a watchdog reset if used on a device with a configured sensor
0 = disabled (default)
1 = enabled and also sets SetOption59 = 1
If you enable and then disable SetOption19 , doing so does not set SetOption59 = 0 and does not revert to default %prefix%/%topic%/ FullTopic

However, to allow Home Assistant to discover the Tasmota devices, via MQTT Discovery you have to add discovery: true to the mqtt: section of the configuration file.

mqtt:
  broker: <IP Address>
  discovery: true

If everything is working correctly, you will see your Tasmota-based devices appear as entities (switches) in Home Assistant’s States page.

Thanks for the reply 123, i found the issue. it was the prefix / topic switcharoo that occurs with setoption 19 (in tasmota :wink: )

i found the solution here Mqtt and rules for a 3 way switch

i guess the clue is the ‘does not revert’.
everyday’s a schoolin!
Thanks again :slight_smile:

You don’t need anything in config for mqtt if the broker is on the same device running HA. (Maybe also need hass.io) I have nothing - not even an mqtt: section. I use discovery and the MQTT integration is configured for discovery as well.

I believe the “don’t need to configure MQTT” is unique to hass.io (and a nice convenience).

I have two instances of Home Assistant, a venv and docker, and both require configuration in order to find the broker (and, in my case, account information to login to the broker). Nevertheless, good to learn more about Hass.io.

Yep, mentioned right there in Tasmota’s documentation. Glad to hear you got it resolved.

1 Like

6 posts were split to a new topic: Tasmota Question