Help me convert this piston with string manipulation to create a nice notification

Would it be easier to just modify Device Status Announcer to do what you want? I originally had something like that app in a rule, but I wrote the app because that rule was getting too complicated to create as I added more devices and wanted a more complex notification:

With what it can do nowadays, the rule would be even worse. :smiley: