Fix lgtm alerts

This commit is contained in:
Johannes
2022-10-01 00:48:30 +02:00
committed by GitHub
parent ae046a9d18
commit e47c72cecf

View File

@@ -201,7 +201,7 @@ class LuiPagesGen(object):
state = None state = None
self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state)) self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state))
def generate_entities_item(self, item, cardType, temp_unit): def generate_entities_item(self, item, cardType, temp_unit=""):
entityId = item.entityId entityId = item.entityId
icon = item.iconOverride icon = item.iconOverride
colorOverride = item.colorOverride colorOverride = item.colorOverride
@@ -361,7 +361,6 @@ class LuiPagesGen(object):
value = get_translation(self._locale, f"backend.component.person.state._.{entity.state}") value = get_translation(self._locale, f"backend.component.person.state._.{entity.state}")
elif entityType == "climate": elif entityType == "climate":
entityTypePanel = "text" entityTypePanel = "text"
hvac_action = get_attr_safe(entity, "hvac_action", "")
state_value = get_translation(self._locale, f"backend.component.climate.state._.{entity.state}") state_value = get_translation(self._locale, f"backend.component.climate.state._.{entity.state}")
temperature = get_attr_safe(entity, "temperature", "") temperature = get_attr_safe(entity, "temperature", "")
temperature_unit = "°C" if(temp_unit == "celsius") else "°F" temperature_unit = "°C" if(temp_unit == "celsius") else "°F"