forked from DigiLive/mushroom-strategy
add condition
This commit is contained in:
4
dist/mushroom-strategy.js
vendored
4
dist/mushroom-strategy.js
vendored
@@ -361,6 +361,8 @@ 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)
|
||||||
|
if (weatherEntity != null)
|
||||||
|
{
|
||||||
chips.push
|
chips.push
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
@@ -372,6 +374,8 @@ class MushroomStrategy {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Light count
|
// Light count
|
||||||
const lightCountTemplate = "{% set lights = [" + createListOfFilteredStates(entities, devices, definedAreas, "light.") + "] %} {{ lights | selectattr('state','eq','on') | list | count }}";
|
const lightCountTemplate = "{% set lights = [" + createListOfFilteredStates(entities, devices, definedAreas, "light.") + "] %} {{ lights | selectattr('state','eq','on') | list | count }}";
|
||||||
|
Reference in New Issue
Block a user