- type: template
entity: input_boolean.notifications
icon: mdi:bell
tap_action:
action: toggle
hold_action:
action: none
card_mod:
style: |
/* Notification indicator */
ha-card:after {
/* Turn on indicator if there is a notification */
{% set notifications = (expand(states.light.all_lights) | selectattr('state', 'eq', 'on') | list | count)
+ (expand(states.binary_sensor.all_windows) | selectattr( 'state', 'eq', 'on') | list | count)
+ states('sensor.devices_with_low_battery') | int (0) %}
+ states('sensor.devices_with_low_battery') | int (0) %}') | int %}
{% if notifications > 0 %}
content: "";
{% endif %}
/* Position & style notification */
position: absolute;
background: rgb(var(--rgb-red));
border-radius: 50%;
top: 6px;
right: 6px;
width: 8px;
height: 8px;
}
alignment: justify
i get this log error and i dont know what i have done wrong.
Error while processing template: Template<template=(/* Notification indicator / ha-card:after { / Turn on indicator if there is a notification / {% set notifications = (expand(states.light.all_lights) | selectattr(‘state’, ‘eq’, ‘on’) | list | count) + (expand(states.group.all_windows) | selectattr( ‘state’, ‘eq’, ‘on’) | list | count) + states(‘sensor.devices_with_low_battery’) | int %} + states(‘sensor.devices_with_low_battery’) | int %}') | int %} {% if notifications > 0 %} content: “”; {% endif %} / Position & style notification */ position: absolute; background: rgb(var(–rgb-red)); border-radius: 50%; top: 6px; right: 6px; width: 8px; height: 8px; }) renders=2>
if any one can help thanks alot.
thanks