diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml index c39dcbf01..12acbe2d9 100644 --- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml +++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/popup_templates/popups/popup_thermostat_temperature.yaml @@ -64,13 +64,13 @@ popup_thermostat_temperature: card: type: "custom:button-card" variables: - ulm_card_thermostat_preset_mode: "[[[ return variables.ulm_card_thermostat_preset_mode; ]]]" + ulm_card_thermostat_preset_mode: "[[[ return variables?.ulm_card_thermostat_preset_mode; ]]]" styles: grid: - grid-template-areas: > [[[ var areas = []; - if (variables.ulm_card_thermostat_preset_mode){ + if (variables?.ulm_card_thermostat_preset_mode){ if (entity.attributes.preset_modes.includes("none")) { areas.push("none"); } @@ -114,7 +114,7 @@ popup_thermostat_temperature: - grid-template-columns: > [[[ var columns = []; - if (variables.ulm_card_thermostat_preset_mode){ + if (variables?.ulm_card_thermostat_preset_mode){ if (entity.attributes.preset_modes.includes("none")) { columns.push("1fr"); } @@ -166,7 +166,7 @@ popup_thermostat_temperature: auto: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("auto")) { + if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("auto")) { return "block"; } else { return "none"; @@ -175,7 +175,7 @@ popup_thermostat_temperature: heat: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat")) { + if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat")) { return "block"; } else { return "none"; @@ -184,7 +184,7 @@ popup_thermostat_temperature: cool: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("cool") ) { + if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("cool") ) { return "block"; } else { return "none"; @@ -193,7 +193,7 @@ popup_thermostat_temperature: dry: - display: > [[[ - if ( !variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("dry")) { + if ( !variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("dry")) { return "block"; } else { return "none"; @@ -202,7 +202,7 @@ popup_thermostat_temperature: fan_only: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("fan_only")) { + if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("fan_only")) { return "block"; } else { return "none"; @@ -211,7 +211,7 @@ popup_thermostat_temperature: heat_cool: - display: > [[[ - if (!variables.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat_cool")) { + if (!variables?.ulm_card_thermostat_preset_mode && entity.attributes.hvac_modes.includes("heat_cool")) { return "block"; } else { return "none"; @@ -220,7 +220,7 @@ popup_thermostat_temperature: none: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("none")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("none")) { return "block"; } else { return "none"; @@ -229,7 +229,7 @@ popup_thermostat_temperature: away: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("away")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("away")) { return "block"; } else { return "none"; @@ -238,7 +238,7 @@ popup_thermostat_temperature: comfort: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("comfort")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("comfort")) { return "block"; } else { return "none"; @@ -247,7 +247,7 @@ popup_thermostat_temperature: home: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("home")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("home")) { return "block"; } else { return "none"; @@ -256,7 +256,7 @@ popup_thermostat_temperature: sleep: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("sleep")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("sleep")) { return "block"; } else { return "none"; @@ -265,7 +265,7 @@ popup_thermostat_temperature: activity: - display: > [[[ - if (variables.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("activity")) { + if (variables?.ulm_card_thermostat_preset_mode && entity.attributes.preset_modes.includes("activity")) { return "block"; } else { return "none";