HA "Groups" VS MQTT "Topics" and scripting (Tasmota SetOption19...)

New to Home Assistant, MQTT, Tasmota… all of it.

I got some simple tasmota switches to work in home assistant. My end goal is to write a simple script that tells all the switches to blink 3x at 10pm.

I feel that I have 2 conflicting issues:

  1. The richness of integration is GREAT when I let tasmota enable auto discovery (setoption19=1). HA can see the buttons (“switches”) on the devices. The health of the switch is displayed as well. I like this and would like to keep these insights. I haven’t been able to manually configure the configuration.yaml to see more than just the power state. The problem is that the auto-discovery (Setoption19) kills custom topic definition.

  2. I was able to get the switches, in the rich default topic, into a “group” in the GUI… but I dont know how to write scrips to a “group”. I can’t find any script examples that command a “group”.

Writing parallel scripts for each device topic seems silly. Do I have to choose a bare-bones device view (deeply defined topic definition) to work with scripting of multiple devices? What is best practice? Perhaps I’m not clear on HA “groups” VS MQTT “topics”?

action:
  - service: homeassistant.toggle
    entity_id: group.your_group

There are also home assistant turn on and off services.

Note that you have not yet created a group. You have only placed the entities in a card to be displayed together. See the following docs:

Thanks for the reply and direction! Give me a couple days to implement… I’ll follow up.

Took me a bit, but I was able to implement! Thank you!

For other newbs (and my own reference):

  1. Put the specific devices in the goups.yaml file.
  2. Implemented the code above in the scripts.yaml:
  - service: homeassistant.toggle
    entity_id: group.your_group

…(but I utilized the GUI code generator, utilizing the “call service” action - same thing).

Worked great! Thank you!