Merge pull request #1542 from CCOSTAN:Vacuum-Scheduling-Dreame

Update Dreame Scheduling to be handled by HA
This commit is contained in:
Carlo Costanzo
2025-12-03 17:11:15 -05:00
committed by GitHub
10 changed files with 410 additions and 152 deletions

View File

@@ -88,31 +88,6 @@
The internal temperature of the refrigerator is currently {{ states('sensor.blink_blink1_temperature') }} degrees. The freezer temperature is {{ states('sensor.refrigerator_freezer_temp') }} degrees and the fridge temperature is {{ states('sensor.refrigerator_fridge_temp') }} degrees. {% if is_state('binary_sensor.refrigerator_door_open', 'on') %}The fridge door is currently open.{% endif %}
{%- endmacro -%}
{%- macro light_check() -%}
{% if states.group.all_lights.state != 'off' -%}
There are
{% for state in states.light if state.state == 'on' -%}
{%- if loop.last -%}
{{ loop.index }}
{%- endif -%}
{%- endfor %}
lights on right now.
{% set comma = joiner(', ') %}
The
{% for group in states.group|groupby('state') -%}
{%- for entity in group.list if entity.state == 'on'
and entity.name.split(' ')[1]|lower == 'lights'
and entity.name.split(' ')[0]|lower != 'all'
and entity.name.split(' ')[0]|lower != 'interior'
-%}
{{ 'and' if loop.last and not loop.first else comma() }}
{{ entity.name|replace('Lights','')}}
{%- endfor -%}
{%- endfor -%}
lights are on.
{%- endif -%}
{%- endmacro -%}
{%- macro window_check() -%}
{% if states.group.entry_points.state != 'off' -%}
{% set comma = joiner(', ') %}
@@ -165,6 +140,13 @@
{% endif -%}
{%- endmacro -%}
{%- macro vacuum_rooms_cleaned() -%}
{% set cleaned = states('input_text.l10s_vacuum_rooms_cleaned_today') %}
{% if cleaned | length > 0 %}
Vacuum cleaned: {{ cleaned }}.
{% endif %}
{%- endmacro -%}
{%- macro moon() -%}
{% if (now().hour == 17) %}
Current Moon phase: {{ states('sensor.moon') }} [Give a fact and mention today's phase]
@@ -320,10 +302,6 @@
{{ NewDevice | default }}
{% if call_light_check == 1 %}
{{ light_check() }}
{% endif %}
{% if call_garbage_day == 1 %}
{{ garbage_day() }}
{% endif %}
@@ -331,6 +309,12 @@
{% if now().strftime('%H')|int(0) > 21 %}
{{ medicine() }}
{% endif %}
{{ vacuum_rooms_cleaned() }}
{{ holiday() }}
{{ outside_weather }}
{% if value1 is not none %}
{{ value1 | default }}