How do you render a topic that could have different payloads?
For example, I have a Shelly 2 that is using Tasmota and MQTT. There are 2 switches called POWER1 and POWER2. They are returned in the topic “stat/Shelly2_2/ RESULT” You can see the two differences in a screenshot at the bottom.
I am using the mqtt grouped per domain. The domain is a “switch” with a series of entities being defined. The example shelly for my question is in my shop. I have the lights divided between what is over the workbench and what lights the bays. Power1 is for the workbench and Power2 is for the bays.
Here is the YAML snippet.
This all works except I get a warning because the device only publishes one payload with the same topic. This triggers both templates, but only one payload is present, so we get a warning that the other is not there. So I published a cmd so it would send a result. This screenshot is where I sent a POWER1 then a POWER2, hence the POWER2 warning, then a POWER1 warning.
Are there some conditions I can add to the template so as not to get the warnings?
I am not sure if my OCD is bad enough to redo a lot just to hide them.
Sorry that I was not clear, I am using Tasmota.
If I understand the link correctly it is for Shelly running original software.
I have updated the original post.
Truth, ignorance. I am afraid of breaking all my automation. I guess, I can save the yaml and back up and see what smokes.
I wonder how the integration keeps from having the same issue. I am thinking I may have to change the Tasmota configuration. My resistance to that, is I have recompiled Tasmota with my configurations, so they will still work as a switch if for some reason they are factory reset. So I was trying to deal with it on the mqtt yaml side.
That seemed to work for me, I have 8 shelly 2 switches and I will make all those changes and see what happens. No news is good news.
Reading the thread where I got this from, seems like there was an issue with that. The thread is over a year old so it could have been a typo or something was fixed. Anyway thanks again.