get button text for vacuum from frontend translations #470 (#495)

This commit is contained in:
joBr99
2022-10-01 10:00:27 +02:00
committed by GitHub
parent 4c5832ad44
commit c23e33e16b

View File

@@ -347,9 +347,9 @@ class LuiPagesGen(object):
elif entityType == "vacuum": elif entityType == "vacuum":
entityTypePanel = "button" entityTypePanel = "button"
if entity.state == "docked": if entity.state == "docked":
value = "Start" value = get_translation(self._locale, f"frontend.ui.card.vacuum.actions.start_cleaning")
else: else:
value = "Return" value = get_translation(self._locale, f"frontend.ui.card.vacuum.actions.return_to_base")
elif entityType == "alarm_control_panel": elif entityType == "alarm_control_panel":
entityTypePanel = "text" entityTypePanel = "text"
value = get_translation(self._locale, f"frontend.state_badge.alarm_control_panel.{entity.state}") value = get_translation(self._locale, f"frontend.state_badge.alarm_control_panel.{entity.state}")