Have you look for this feature in other issues and in the wiki?
yes
Is your feature request related to a problem? Please describe.
One need device specific rules to have consistent MQTT topic namings like "stat/my-sonoff/my-stat when publishing MQTT in rules. I have 10+ devices using same rules and run out of var/mem when working around.
Describe the solution you'd like
Allow usage of %topic%, %prefix" and %grouptopic% in rules.
Describe alternatives you've considered
Store %topic% in e.g. %mem1% allows same rules and easy update for a bunch of devices.
Additional context
_Add any other context or screenshots about the feature request here._
(Please, remember to close the issue when the problem has been addressed)
Storing a topic in %mem% won't be implemented any time soon as currently mem variables allow up to 10 characters while %topic% could be up to 33 characters. Mems were meant for numbers only.
That's why I currently need multiple mems to store topic. Sorry to not been precise enough, request is not to store %topic% in mem but to allow usage of %topic% in publish command.
This functionality is also needed. I have several identical devices with the same rules. It is necessary to distinguish them. The best way through the settings. Different rules are not the best choice.
Likewise - would be very useful for the same reason as mentioned by @il300
Yes, please, this would be a valuable feature. I also have multiple devices and want to use the same rules...
have a look at this tread =>https://github.com/arendst/Sonoff-Tasmota/issues/5689
its easy with a script
Please close this issue. Script is supported now by Tasmota
Closing this issue as there is now a workaround using scripting. Please, check the documentation for an example for doing this. Thanks
Merged PR #7106 for adding %topic% as a new variable for rules.
Most helpful comment
That's why I currently need multiple mems to store topic. Sorry to not been precise enough, request is not to store %topic% in mem but to allow usage of %topic% in publish command.