From 5c78f34a811281871d6c221ef80bab86f9c8df66 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 5 Jun 2022 09:03:44 +0200 Subject: [PATCH] fix path --- apps/nspanel-lovelace-ui/luibackend/localization.py | 2 +- apps/nspanel-lovelace-ui/luibackend/pages.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/localization.py b/apps/nspanel-lovelace-ui/luibackend/localization.py index dafa7265..183049ed 100644 --- a/apps/nspanel-lovelace-ui/luibackend/localization.py +++ b/apps/nspanel-lovelace-ui/luibackend/localization.py @@ -39,4 +39,4 @@ def get_translation(locale, lookupstr): res = lookup(path_frontend_file, path_backend_file, lookupstr) return res -#print(get_translation("en_US", "frontend.ui.card.button.press")) \ No newline at end of file +#print(get_translation("en_US", "frontend.state_attributes.climate.hvac_action.idle")) \ No newline at end of file diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 77ee4ca6..5c8edadd 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -290,9 +290,9 @@ class LuiPagesGen(object): hvac_action = get_attr_safe(entity, "hvac_action", "") state_value = "" if hvac_action != "": - state_value = get_translation(self._locale, f"state_attributes.climate.hvac_action.{hvac_action}") + state_value = get_translation(self._locale, f"frontend.state_attributes.climate.hvac_action.{hvac_action}") state_value += "\r\n(" - state_value += get_translation(self._locale, f"state_attributes.climate.hvac_action.{entity.state}") + state_value += get_translation(self._locale, f"backend.component.climate.state._.{entity.state}") if hvac_action != "": state_value += ")"