diff --git a/upk2esphome/result.py b/upk2esphome/result.py index 40351df..d0ab44d 100644 --- a/upk2esphome/result.py +++ b/upk2esphome/result.py @@ -37,13 +37,9 @@ def text(self) -> str: text = re.sub(r"\n([a-z])", r"\n\n\1", text) text = text.replace("'", '"') # generate comments for quoted strings with _\d+ keys - text = re.sub( - r'_\d+: "(.+?)"', r"# \1", text - ) + text = re.sub(r'_\d+: "(.+?)"', r"# \1", text) # generate comments for unquoted strings _\d+ keys - text = re.sub( - r"_\d+: (.+?)", r"# \1", text - ) + text = re.sub(r"_\d+: (.+?)", r"# \1", text) text = text.replace(" {}", "") text = text.replace("{}", "") return text