Hello ESPHome users!
For a few days I’ve been implementing my first things with ESPHome and have managed it quite well so far. Unfortunately I can’t get any further at one point. I have an MQTT text sensor on which the desired text is also received. However, this text is URL coded so that the special characters %xx are hidden in the text. Now I’ve tried to clarify the whole thing with a text filter and “substitute”, which works quite well, but unfortunately not with the “spaces” in text. It’s just not clear to me how I should do it, the %20 (URL encodet) in the text is replaced by a space.
- platform: mqtt_subscribe
name: AudioTitel
id: AudioTitel
topic: lox2mqttms1/504F94A0FD49/1a8ffe02-034a-c73f-ffffbde3a5b0cf24
filters:
- substitute:
- "%20 -> _"
- "%21 -> !"
- "%22 -> '"
- "%23 -> #"
- "%24 -> $"
- "%25 -> %"
- "%26 -> &"
- "%27 -> '"
- "%28 -> ("
- "%29 -> )"
- "%2A -> *"
- "%2B -> +"
- "%2C -> ,"
- "%2D -> -"
- "%2E -> ."
- "%2F -> /"
- "%3A -> :"
- "%3B -> ;"
- "%3C -> <"
- "%3D -> ="
- "%3E -> >"
- "%3F -> ?"
- "%40 -> @"
- "%5B -> ["
- "%5D -> ]"
- "%7B -> {"
- "%7C -> |"
- "%7D -> }"
Thank you for your ideas!