added translation between states and loc

This commit is contained in:
joBr99
2022-05-28 23:01:23 +02:00
parent 492fe08618
commit 29ea5993e6

View File

@@ -1121,7 +1121,7 @@ def lookup(locale, inputstr):
def get_translation(locale, inputstr): def get_translation(locale, inputstr):
inputstr = inputstr.replace("heat", "heating").replace("dry", "drying").replace("cool", "cooling").replace("fan_only", "fan") inputstr = inputstr.replace("heat", "heating").replace("dry", "drying").replace("cool", "cooling").replace("fan_only", "fan")
if inputstr == "heat_cool": if inputstr == "heat_cool":
return f'{lookup(locale, "heating")}/{lookup(locale, "cooling")}}' return f'{lookup(locale, "heating")}/{lookup(locale, "cooling")}'
return lookup(locale, inputstr) return lookup(locale, inputstr)