fix lock button text

This commit is contained in:
joBr99
2022-05-06 15:40:56 +02:00
parent dafd117ea5
commit c1a43e6284

View File

@@ -174,7 +174,7 @@ class LuiPagesGen(object):
if entityType == "lock":
icon_id = get_icon_id_ha("lock", state=entity.state, overwrite=icon)
icon_color = self.get_entity_color(entity)
text = get_translation(self._locale,"lock") if entity.state == "unlocked" else get_translation(self._locale,"lock")
text = get_translation(self._locale,"lock") if entity.state == "unlocked" else get_translation(self._locale,"unlock")
return f"~button~{entityId}~{icon_id}~{icon_color}~{name}~{text}"
if entityType == "number":
icon_id = get_icon_id_ha("number", overwrite=icon)