From 05d80fc211a1031097001e87995960b98fb417e0 Mon Sep 17 00:00:00 2001 From: Torrell32 <69473130+horttorrell32@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:32:41 +0100 Subject: [PATCH] Fix latest_entry_xxx to allow filter entires by scheduler string This change Fix latest_entry_today and latest_entry_day_before to allow filter entires that contain scheduler string as part of scheduler_name.. Previous implementation is not right with the documentation of Heating Schedule Adjustments, because the scheduler must fully equal to 'Friendly Name' of scheduler selected. --- .../automation/panhans/advanced_heating_control.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprints/automation/panhans/advanced_heating_control.yaml b/blueprints/automation/panhans/advanced_heating_control.yaml index cde00b1..571cc85 100644 --- a/blueprints/automation/panhans/advanced_heating_control.yaml +++ b/blueprints/automation/panhans/advanced_heating_control.yaml @@ -2494,14 +2494,14 @@ variables: | list %} {% set selected_entries_days_and_schedule = plan | rejectattr('days','==',Undefined) | selectattr('days','search',current_day) - | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',[scheduler_name]) + | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',scheduler_name) | list %} {% set selected_entries_days = plan | rejectattr('days','==',Undefined) | selectattr('days','search',current_day) | selectattr('scheduler','in',[Undefined]) | list %} - {% set selected_entries_schedule = plan | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',[scheduler_name]) + {% set selected_entries_schedule = plan | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',scheduler_name) | selectattr('days','in',[Undefined]) | list %} @@ -2533,14 +2533,14 @@ variables: | list %} {% set selected_entries_days_and_schedule = plan | rejectattr('days','==',Undefined) | selectattr('days','search',current_day) - | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',[scheduler_name]) + | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',scheduler_name) | list %} {% set selected_entries_days = plan | rejectattr('days','==',Undefined) | selectattr('days','search',current_day) | selectattr('scheduler','in',[Undefined]) | list %} - {% set selected_entries_schedule = plan | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',[scheduler_name]) + {% set selected_entries_schedule = plan | rejectattr('scheduler','==',Undefined) | selectattr('scheduler','in',scheduler_name) | selectattr('days','in',[Undefined]) | list %}