>- {% set brita_filter = is_state('binary_sensor.brita_should_change_filter', 'on') | default(false) %} {% set purifier_filter = is_state('binary_sensor.purifier_filter_needs_change', 'on') | default(false) %} {% set purifier_water = is_state('binary_sensor.purifier_out_of_water', 'on') | default(false) %} {% set has_purifier_tasks = purifier_filter or purifier_water %} {% set vacuum_main_brush = states('sensor.roborock_vacuum_s5_main_brush_left')|int(-1) == 0 %} {% set vacuum_side_brush = states('sensor.roborock_vacuum_s5_side_brush_left')|int(-1) == 0 %} {% set vacuum_filter = states('sensor.roborock_vacuum_s5_filter_left')|int(-1) == 0 %} {% set vacuum_dirty = states('sensor.roborock_vacuum_s5_sensor_dirty_left')|int(-1) == 0 %} {% set has_vacuum_tasks = vacuum_main_brush or vacuum_side_brush or vacuum_filter or vacuum_dirty %} {% set has_tasks = brita_filter or has_purifier_tasks or has_vacuum_tasks %} {%- if has_tasks -%} {{ [ "You have some tasks.", "Here are the tasks for today.", "You have stuff to do." ] | random }} {%- endif -%} {% if brita_filter %} Brita needs filter change. {%- endif -%} {% if purifier_filter %} Purifier needs filter change. {%- endif -%} {% if purifier_water %} Purifier needs water. {%- endif -%} {% if vacuum_main_brush %} Vacuum main brush needs changing. {%- endif -%} {% if vacuum_side_brush %} Vacuum side brush needs changing. {%- endif -%} {% if vacuum_filter %} Vacuum filter needs changing. {%- endif -%} {% if vacuum_dirty %} Vacuum sensor needs cleaning. {%- endif -%}