add condition

This commit is contained in:
Aalian Khan
2023-04-04 02:33:17 -04:00
committed by GitHub
parent 870165951c
commit 3abee80090

View File

@@ -361,15 +361,19 @@ class MushroomStrategy {
} else } else
{ {
const weatherEntity = entities.find(entity => entity.entity_id.startsWith("weather.") && entity.disabled_by == null) const weatherEntity = entities.find(entity => entity.entity_id.startsWith("weather.") && entity.disabled_by == null)
chips.push if (weatherEntity != null)
( {
{ chips.push
type: "weather", (
entity: weatherEntity.entity_id, {
show_temperature: true, type: "weather",
show_conditions: true entity: weatherEntity.entity_id,
} show_temperature: true,
) show_conditions: true
}
)
}
} }