Skip to content

Instantly share code, notes, and snippets.

@FrankTub
Created January 1, 2026 19:37
Show Gist options
  • Select an option

  • Save FrankTub/8fc1400cd2e2166fdbe39ae7bf0a5846 to your computer and use it in GitHub Desktop.

Select an option

Save FrankTub/8fc1400cd2e2166fdbe39ae7bf0a5846 to your computer and use it in GitHub Desktop.
Forced closed deactivated but did not open even thought that was expected
{
"trace": {
"last_step": "action/6/choose/12/sequence/2/choose/0/sequence/5",
"run_id": "a919f7b652907a3610adb23d9b7a04fd",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2026-01-01T15:29:31.297741+00:00",
"finish": "2026-01-01T15:29:35.480965+00:00"
},
"domain": "automation",
"item_id": "1761849528191",
"trigger": "state of binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"trace": {
"trigger/14": [
{
"path": "trigger/14",
"timestamp": "2026-01-01T15:29:31.311637+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.woonkamer_gordijnen",
"state": "on",
"attributes": {
"id": "1761849528191",
"last_triggered": "2026-01-01T15:03:00.399256+00:00",
"mode": "queued",
"current": 0,
"max": 10,
"friendly_name": "Woonkamer gordijnen"
},
"last_changed": "2026-01-01T13:25:49.270590+00:00",
"last_reported": "2026-01-01T15:03:02.509303+00:00",
"last_updated": "2026-01-01T15:03:02.509303+00:00",
"context": {
"id": "01KDX1ARGX5CK3G9KBG6FZG5VZ",
"parent_id": "01KDX1ARGX5F1GK4WD4MGGZ1EV",
"user_id": null
}
},
"trigger": {
"id": "t_force_disabled_close",
"idx": "14",
"alias": null,
"platform": "state",
"entity_id": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"from_state": {
"entity_id": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"state": "on",
"attributes": {
"icon": "mdi:curtains-closed",
"friendly_name": "Woonkamer gordijnen geforceerd dicht"
},
"last_changed": "2026-01-01T15:03:00.381380+00:00",
"last_reported": "2026-01-01T15:03:00.381380+00:00",
"last_updated": "2026-01-01T15:03:00.381380+00:00",
"context": {
"id": "01KDX1ARGX5F1GK4WD4MGGZ1EV",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"state": "off",
"attributes": {
"icon": "mdi:curtains-closed",
"friendly_name": "Woonkamer gordijnen geforceerd dicht"
},
"last_changed": "2026-01-01T15:29:31.293784+00:00",
"last_reported": "2026-01-01T15:29:31.293784+00:00",
"last_updated": "2026-01-01T15:29:31.293784+00:00",
"context": {
"id": "01KDX2VA4KA7CGCXNVRZTP8ARM",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of binary_sensor.woonkamer_gordijnen_geforceerd_dicht"
},
"blind": "cover.woonkamer_gordijnen",
"cover_type": "blind",
"is_awning": false,
"resident_sensor": [],
"position_source": "current_position_attr",
"custom_position_sensor": [],
"open_position": 100,
"close_position": 0,
"ventilate_position": 40,
"shading_position": 25,
"position_tolerance": 3,
"open_tilt_position": 50,
"close_tilt_position": 50,
"ventilate_tilt_position": 50,
"shading_tilt_elevation_1": 20,
"shading_tilt_elevation_2": 30,
"shading_tilt_elevation_3": 48,
"shading_tilt_position_0": 0,
"shading_tilt_position_1": 20,
"shading_tilt_position_2": 37,
"shading_tilt_position_3": 50,
"auto_options": [
"auto_up_enabled",
"auto_down_enabled",
"auto_sun_enabled",
"auto_ventilate_enabled"
],
"cover_tilt_config": "cover_tilt_disabled",
"cover_tilt_reposition_config": "cover_tilt_reposition_disabled",
"is_cover_tilt_enabled": false,
"tilt_wait_mode": "fixed_delay",
"tilt_wait_timeout": 30,
"is_tilt_wait_idle_mode": false,
"time_up_early": "06:00:00",
"time_up_early_non_workday": "06:00:00",
"time_up_late": "09:15:00",
"time_up_late_non_workday": "09:15:00",
"time_down_early": "16:30:00",
"time_down_early_non_workday": "16:30:00",
"time_down_late": "21:30:00",
"time_down_late_non_workday": "21:30:00",
"workday_sensor_today": "binary_sensor.workday_sensor",
"workday_sensor_tomorrow": "binary_sensor.workday_tomorrow",
"time_control": "time_control_input",
"calendar_entity": [],
"calendar_open_title": "Open Cover",
"calendar_close_title": "Close Cover",
"calendar_open_title_lc": "open cover",
"calendar_close_title_lc": "close cover",
"is_calendar_enabled": false,
"default_brightness_sensor": [],
"brightness_up": 0,
"brightness_down": 0,
"brightness_hysteresis": 0,
"default_sun_sensor": "sun.sun",
"sun_elevation_mode": "fixed",
"sun_elevation_up": 0,
"sun_elevation_down": 0,
"sun_elevation_up_sensor": [],
"sun_elevation_down_sensor": [],
"contact_window_opened": [],
"contact_window_tilted": "binary_sensor.woonkamer_pui_open_of_net_dicht",
"lockout_tilted_options": [
"lockout_tilted_closing"
],
"shading_azimuth_start": 95,
"shading_azimuth_end": 265,
"shading_elevation_min": 25,
"shading_elevation_max": 90,
"shading_sun_brightness_start": 35000,
"shading_sun_brightness_end": 25000,
"shading_sun_brightness_hysteresis": 0,
"shading_brightness_sensor": [],
"shading_temperatur_sensor1": [],
"shading_temperatur_sensor2": [],
"shading_min_temperatur1": 18,
"shading_min_temperatur2": 18,
"shading_temperature_hysteresis1": 0.2,
"shading_temperature_hysteresis2": 0.2,
"shading_forecast_sensor": [],
"shading_forecast_temp_sensor": [],
"shading_forecast_type": "daily",
"shading_forecast_temp": [],
"shading_forecast_temp_hysteresis": 0,
"shading_weather_conditions": [],
"shading_conditions_start_and": [
"cond_azimuth",
"cond_elevation",
"cond_brightness",
"cond_temp1",
"cond_temp2",
"cond_forecast_temp",
"cond_forecast_weather"
],
"shading_conditions_start_or": [],
"shading_conditions_end_and": [],
"shading_conditions_end_or": [
"cond_azimuth",
"cond_elevation",
"cond_brightness",
"cond_temp1",
"cond_temp2",
"cond_forecast_temp",
"cond_forecast_weather"
],
"lockout_tilted_when_closing": true,
"lockout_tilted_when_shading_starts": false,
"lockout_tilted_when_shading_ends": false,
"is_shading_enabled": false,
"is_up_enabled": true,
"is_down_enabled": true,
"is_brightness_enabled": false,
"is_sun_elevation_enabled": true,
"is_time_field_enabled": true,
"is_time_control_disabled": false,
"is_ventilation_enabled": true,
"reset_override_config": "reset_disabled",
"reset_override_time": "00:01:00",
"reset_override_timeout": 5,
"is_reset_disabled": true,
"is_reset_fixed_time": false,
"is_reset_timeout": false,
"auto_up_force": [],
"auto_down_force": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"auto_ventilate_force": [],
"auto_shading_start_force": [],
"cover_status_options": "cover_helper_enabled",
"cover_status_helper": "input_text.woonkamer_gordijnen_helper",
"prevent_opening_movement": [],
"invalid_states": [
"",
"unavailable",
"unknown",
"none",
"None",
"null",
"query failed",
[]
],
"version": "2025.12.30",
"blind_entities": [
"cover.woonkamer_gordijnen"
],
"current_position": 0,
"current_tilt_position": 101,
"position_comparisons": {
"current_above_open": false,
"current_above_close": false,
"current_above_shading": false,
"current_above_ventilate": false,
"current_below_open": true,
"current_below_close": false,
"current_below_shading": true,
"current_below_ventilate": true,
"open_above_close": true,
"open_above_ventilate": true,
"shading_above_close": true,
"shading_below_open": true,
"ventilate_above_close": true
},
"current_sun_azimuth": 229.89,
"current_sun_elevation": 0.99,
"sun_elevation_up_current": 0,
"sun_elevation_down_current": 0,
"is_today_off": true,
"is_tomorrow_off": false,
"is_tomorrow_on": true,
"is_cover_tilt_enabled_and_possible": false,
"is_cover_tilt_reposition_enabled": false,
"drive_delay_fix": 0,
"drive_delay_random": 5,
"drive_time": 30,
"time_up_early_today": "06:00:00",
"time_up_late_today": "09:15:00",
"time_down_early_today": "16:30:00",
"time_down_late_today": "21:30:00",
"shading_tilt_position": 0,
"in_open_position": false,
"in_close_position": true,
"in_shading_position": false,
"in_ventilate_position": false,
"brightness_time_duration": 30,
"sun_time_duration": 30,
"shading_waitingtime_start": 300,
"shading_waitingtime_end": 300,
"shading_start_max_duration": 7200,
"shading_end_max_duration": 7200,
"shading_config": [],
"shading_end_immediate_by_sun_position": false,
"is_shading_end_immediate_by_sun_position": false,
"forecast_source": {
"use_sensor": false,
"use_weather": false,
"prevent_service": false
},
"shading_start_condition_enabled": {
"azimuth": true,
"elevation": true,
"brightness": true,
"temp1": true,
"temp2": true,
"forecast_temp": true,
"forecast_weather": true
},
"shading_end_condition_enabled": {
"azimuth": true,
"elevation": true,
"brightness": true,
"temp1": true,
"temp2": true,
"forecast_temp": true,
"forecast_weather": true
},
"is_status_helper_enabled": true,
"helper_json": {
"open": {
"a": 0,
"t": 1767278107
},
"close": {
"a": 1,
"t": 1767279780
},
"shading": {
"a": 0,
"t": 0,
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": 1767117607
},
"vfull": {
"a": 0,
"t": 0
},
"manual": {
"a": 0,
"t": 1766216320
},
"v": 5,
"t": 1767279780
},
"helper_status": {
"open": false,
"closed": true,
"shaded": false,
"shading_start_pending": false,
"shading_end_pending": false,
"vpart": false,
"vfull": false,
"manual": false
},
"helper_ts": {
"open": 1767278107,
"closed": 1767279780,
"shaded": 0,
"vpart": 1767117607,
"vfull": 0,
"manual": 1766216320
},
"is_cover_movement_blocked": {
"open": false,
"opening_movement": false,
"close": false,
"ventilate": false,
"shading": false,
"any": false
},
"resident_config": [],
"resident_flags": {
"opening_enabled": false,
"closing_enabled": false,
"allow_shading": false,
"allow_opening": false,
"allow_ventilation": false
},
"ignore_after_manual_config": [],
"override_flags": {
"opening": false,
"closing": false,
"ventilation": false,
"shading": false
},
"auto_ventilate_options": [
"ventilation_delay_enabled"
],
"contact_delay_trigger": 2,
"contact_delay_status": 3,
"ventilation_flags": {
"delay_enabled": true,
"if_lower_enabled": false,
"after_shading_end": false
},
"prevent_config": [],
"prevent_flags": {
"higher_position_closing": false,
"lowering_when_closing_if_shaded": false,
"shading_end_if_closed": false,
"opening_after_shading_end": false,
"opening_after_ventilation_end": false,
"default_cover_actions": false,
"shading_multiple_times": false,
"opening_multiple_times": false,
"closing_multiple_times": false,
"opening_movement": false
},
"auto_recover_after_force": "auto_recover_enabled",
"is_auto_recover_enabled": true,
"check_config": false,
"check_config_debuglevel": "info",
"check_status_helper_length": 254
}
}
],
"condition/0": [
{
"path": "condition/0",
"timestamp": "2026-01-01T15:29:31.311712+00:00",
"result": {
"result": true
}
}
],
"condition/1": [
{
"path": "condition/1",
"timestamp": "2026-01-01T15:29:31.311792+00:00",
"result": {
"result": true
}
}
],
"condition/1/conditions/0": [
{
"path": "condition/1/conditions/0",
"timestamp": "2026-01-01T15:29:31.311845+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"condition/1/conditions/1": [
{
"path": "condition/1/conditions/1",
"timestamp": "2026-01-01T15:29:31.312064+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"condition/2": [
{
"path": "condition/2",
"timestamp": "2026-01-01T15:29:31.312296+00:00",
"result": {
"result": true
}
}
],
"condition/2/conditions/0": [
{
"path": "condition/2/conditions/0",
"timestamp": "2026-01-01T15:29:31.312350+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"condition/2/conditions/1": [
{
"path": "condition/2/conditions/1",
"timestamp": "2026-01-01T15:29:31.312631+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"condition/3": [
{
"path": "condition/3",
"timestamp": "2026-01-01T15:29:31.312847+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2026-01-01T15:29:31.313553+00:00",
"changed_variables": {
"context": {
"id": "01KDX2VA51CQ24H9G7EKYA0EBZ",
"parent_id": "01KDX2VA4KA7CGCXNVRZTP8ARM",
"user_id": null
},
"cover_move_action": {
"sequence": [
{
"condition": "template",
"value_template": true
},
{
"repeat": {
"for_each": [
"cover.woonkamer_gordijnen"
],
"sequence": [
{
"choose": [
{
"conditions": false,
"sequence": [
{
"service": "cover.close_cover",
"target": {
"entity_id": ""
}
}
]
},
{
"conditions": false,
"sequence": [
{
"service": "cover.open_cover",
"target": {
"entity_id": ""
}
}
]
},
{
"conditions": false,
"sequence": [
{
"service": "cover.set_cover_position",
"data": {
"position": 101
},
"target": {
"entity_id": ""
}
}
]
}
]
},
{
"delay": {
"seconds": 1
}
}
]
}
}
]
},
"tilt_move_action": {
"sequence": [
{
"condition": "template",
"value_template": false
},
{
"repeat": {
"for_each": [
"cover.woonkamer_gordijnen"
],
"sequence": [
{
"if": true,
"then": [
{
"if": false,
"then": [
{
"service": "cover.set_cover_tilt_position",
"data": {
"tilt_position": 0
},
"target": {
"entity_id": ""
}
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": false,
"sequence": [
{
"wait_template": false,
"timeout": 30,
"continue_on_timeout": true
},
{
"if": "",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"service": "cover.set_cover_tilt_position",
"data": {
"tilt_position": 101
},
"target": {
"entity_id": ""
}
},
{
"delay": {
"seconds": 2
}
}
]
}
]
}
}
]
},
"helper_update": {
"if": [
true
],
"then": [
{
"service": "input_text.set_value",
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": {
"open": {
"a": 0,
"t": 1767278107
},
"close": {
"a": 1,
"t": 1767279780
},
"shading": {
"a": 0,
"t": 0,
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": 1767117607
},
"vfull": {
"a": 0,
"t": 0
},
"manual": {
"a": 0,
"t": 1766216320
},
"v": 5,
"t": 1767279780
}
}
}
]
}
}
}
],
"action/1": [
{
"path": "action/1",
"timestamp": "2026-01-01T15:29:31.319798+00:00"
}
],
"action/1/if": [
{
"path": "action/1/if",
"timestamp": "2026-01-01T15:29:31.320078+00:00",
"result": {
"result": false
}
}
],
"action/1/if/condition/0": [
{
"path": "action/1/if/condition/0",
"timestamp": "2026-01-01T15:29:31.320657+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/2": [
{
"path": "action/2",
"timestamp": "2026-01-01T15:29:31.321990+00:00"
}
],
"action/2/if": [
{
"path": "action/2/if",
"timestamp": "2026-01-01T15:29:31.322223+00:00",
"result": {
"result": false
}
}
],
"action/2/if/condition/0": [
{
"path": "action/2/if/condition/0",
"timestamp": "2026-01-01T15:29:31.322786+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/3": [
{
"path": "action/3",
"timestamp": "2026-01-01T15:29:31.323975+00:00",
"changed_variables": {
"forecast_temp_raw": null,
"forecast_weather_condition_raw": null,
"shading_start_condition_states": {
"azimuth_valid": true,
"elevation_valid": true,
"brightness_valid": true,
"temp1_valid": true,
"temp2_valid": true,
"forecast_temp_valid": true,
"forecast_weather_valid": true
},
"shading_start_and_result": true,
"shading_start_or_result": true,
"shading_start_conditions_met": false,
"shading_end_condition_states": {
"azimuth_invalid": false,
"elevation_invalid": false,
"brightness_invalid": false,
"temp1_invalid": false,
"temp2_invalid": false,
"forecast_temp_invalid": false,
"forecast_weather_invalid": false
},
"shading_end_and_result": false,
"shading_end_or_result": false,
"shading_end_conditions_met": false,
"calendar_open_event": {
"found": false,
"start": null,
"end": null
},
"calendar_close_event": {
"found": false,
"start": null,
"end": null
},
"now_ts": 1767281371.328085,
"calendar_open_start": null,
"calendar_open_end": null,
"calendar_close_start": null,
"calendar_close_end": null,
"is_opening_phase": false,
"is_daytime_phase": true,
"is_closing_phase": false,
"is_evening_phase": false,
"is_time_up_late": true,
"is_time_down_late": false,
"is_shading_allowed_window": true,
"environment_allows_opening": true,
"environment_allows_closing": false,
"should_be_open_now": true,
"should_be_closed_now": false
}
}
],
"action/4": [
{
"path": "action/4",
"timestamp": "2026-01-01T15:29:31.330893+00:00"
}
],
"action/4/if": [
{
"path": "action/4/if",
"timestamp": "2026-01-01T15:29:31.331168+00:00",
"result": {
"result": false
}
}
],
"action/4/if/condition/0": [
{
"path": "action/4/if/condition/0",
"timestamp": "2026-01-01T15:29:31.331827+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/4/if/condition/1": [
{
"path": "action/4/if/condition/1",
"timestamp": "2026-01-01T15:29:31.332945+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/4/if/condition/2": [
{
"path": "action/4/if/condition/2",
"timestamp": "2026-01-01T15:29:31.334081+00:00",
"result": {
"result": false
}
}
],
"action/4/if/condition/2/conditions/0": [
{
"path": "action/4/if/condition/2/conditions/0",
"timestamp": "2026-01-01T15:29:31.334774+00:00",
"result": {
"result": false,
"entities": [
"input_text.woonkamer_gordijnen_helper"
]
}
}
],
"action/4/if/condition/2/conditions/1": [
{
"path": "action/4/if/condition/2/conditions/1",
"timestamp": "2026-01-01T15:29:31.335940+00:00",
"result": {
"result": false,
"entities": [
"input_text.woonkamer_gordijnen_helper"
]
}
}
],
"action/5": [
{
"path": "action/5",
"timestamp": "2026-01-01T15:29:31.337462+00:00"
}
],
"action/5/if": [
{
"path": "action/5/if",
"timestamp": "2026-01-01T15:29:31.337775+00:00",
"result": {
"result": false
}
}
],
"action/5/if/condition/0": [
{
"path": "action/5/if/condition/0",
"timestamp": "2026-01-01T15:29:31.338453+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/5/if/condition/1": [
{
"path": "action/5/if/condition/1",
"timestamp": "2026-01-01T15:29:31.339622+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6": [
{
"path": "action/6",
"timestamp": "2026-01-01T15:29:31.341339+00:00",
"changed_variables": {
"background_is_open": false,
"background_is_closed": true,
"background_is_shaded": false,
"background_is_vpart": false,
"background_is_vfull": false,
"target_position": 0,
"target_tilt_position": 50
},
"result": {
"choice": 12
}
}
],
"action/6/choose/0": [
{
"path": "action/6/choose/0",
"timestamp": "2026-01-01T15:29:31.341627+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/0/conditions/0": [
{
"path": "action/6/choose/0/conditions/0",
"timestamp": "2026-01-01T15:29:31.342377+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/0/conditions/1": [
{
"path": "action/6/choose/0/conditions/1",
"timestamp": "2026-01-01T15:29:31.343621+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/0/conditions/2": [
{
"path": "action/6/choose/0/conditions/2",
"timestamp": "2026-01-01T15:29:31.344866+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/0/conditions/3": [
{
"path": "action/6/choose/0/conditions/3",
"timestamp": "2026-01-01T15:29:31.346143+00:00",
"result": {
"result": true
}
}
],
"action/6/choose/0/conditions/4": [
{
"path": "action/6/choose/0/conditions/4",
"timestamp": "2026-01-01T15:29:31.346799+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/0/conditions/4/conditions/0": [
{
"path": "action/6/choose/0/conditions/4/conditions/0",
"timestamp": "2026-01-01T15:29:31.347438+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/0/conditions/4/conditions/1": [
{
"path": "action/6/choose/0/conditions/4/conditions/1",
"timestamp": "2026-01-01T15:29:31.348619+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/1": [
{
"path": "action/6/choose/1",
"timestamp": "2026-01-01T15:29:31.349944+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/1/conditions/0": [
{
"path": "action/6/choose/1/conditions/0",
"timestamp": "2026-01-01T15:29:31.350614+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/1/conditions/1": [
{
"path": "action/6/choose/1/conditions/1",
"timestamp": "2026-01-01T15:29:31.351771+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/1/conditions/2": [
{
"path": "action/6/choose/1/conditions/2",
"timestamp": "2026-01-01T15:29:31.353041+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/1/conditions/3": [
{
"path": "action/6/choose/1/conditions/3",
"timestamp": "2026-01-01T15:29:31.354240+00:00",
"result": {
"result": true
}
}
],
"action/6/choose/1/conditions/4": [
{
"path": "action/6/choose/1/conditions/4",
"timestamp": "2026-01-01T15:29:31.354903+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/1/conditions/4/conditions/0": [
{
"path": "action/6/choose/1/conditions/4/conditions/0",
"timestamp": "2026-01-01T15:29:31.355552+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/1/conditions/4/conditions/1": [
{
"path": "action/6/choose/1/conditions/4/conditions/1",
"timestamp": "2026-01-01T15:29:31.356752+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/2": [
{
"path": "action/6/choose/2",
"timestamp": "2026-01-01T15:29:31.357959+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/2/conditions/0": [
{
"path": "action/6/choose/2/conditions/0",
"timestamp": "2026-01-01T15:29:31.358615+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/3": [
{
"path": "action/6/choose/3",
"timestamp": "2026-01-01T15:29:31.359791+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/3/conditions/0": [
{
"path": "action/6/choose/3/conditions/0",
"timestamp": "2026-01-01T15:29:31.360447+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/4": [
{
"path": "action/6/choose/4",
"timestamp": "2026-01-01T15:29:31.361581+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/4/conditions/0": [
{
"path": "action/6/choose/4/conditions/0",
"timestamp": "2026-01-01T15:29:31.362251+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/5": [
{
"path": "action/6/choose/5",
"timestamp": "2026-01-01T15:29:31.363411+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/5/conditions/0": [
{
"path": "action/6/choose/5/conditions/0",
"timestamp": "2026-01-01T15:29:31.364071+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/1": [
{
"path": "action/6/choose/5/conditions/1",
"timestamp": "2026-01-01T15:29:31.365289+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/2": [
{
"path": "action/6/choose/5/conditions/2",
"timestamp": "2026-01-01T15:29:31.366551+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/3": [
{
"path": "action/6/choose/5/conditions/3",
"timestamp": "2026-01-01T15:29:31.367773+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/4": [
{
"path": "action/6/choose/5/conditions/4",
"timestamp": "2026-01-01T15:29:31.368998+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/5": [
{
"path": "action/6/choose/5/conditions/5",
"timestamp": "2026-01-01T15:29:31.370467+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/5/conditions/6": [
{
"path": "action/6/choose/5/conditions/6",
"timestamp": "2026-01-01T15:29:31.371721+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/5/conditions/6/conditions/0": [
{
"path": "action/6/choose/5/conditions/6/conditions/0",
"timestamp": "2026-01-01T15:29:31.372371+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/5/conditions/6/conditions/1": [
{
"path": "action/6/choose/5/conditions/6/conditions/1",
"timestamp": "2026-01-01T15:29:31.373520+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/6": [
{
"path": "action/6/choose/6",
"timestamp": "2026-01-01T15:29:31.374817+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/6/conditions/0": [
{
"path": "action/6/choose/6/conditions/0",
"timestamp": "2026-01-01T15:29:31.375478+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/6/conditions/1": [
{
"path": "action/6/choose/6/conditions/1",
"timestamp": "2026-01-01T15:29:31.376580+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/7": [
{
"path": "action/6/choose/7",
"timestamp": "2026-01-01T15:29:31.377712+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/7/conditions/0": [
{
"path": "action/6/choose/7/conditions/0",
"timestamp": "2026-01-01T15:29:31.378359+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/7/conditions/1": [
{
"path": "action/6/choose/7/conditions/1",
"timestamp": "2026-01-01T15:29:31.379456+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/8": [
{
"path": "action/6/choose/8",
"timestamp": "2026-01-01T15:29:31.380570+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/8/conditions/0": [
{
"path": "action/6/choose/8/conditions/0",
"timestamp": "2026-01-01T15:29:31.381214+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/8/conditions/1": [
{
"path": "action/6/choose/8/conditions/1",
"timestamp": "2026-01-01T15:29:31.382320+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/9": [
{
"path": "action/6/choose/9",
"timestamp": "2026-01-01T15:29:31.383428+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/9/conditions/0": [
{
"path": "action/6/choose/9/conditions/0",
"timestamp": "2026-01-01T15:29:31.384067+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/9/conditions/1": [
{
"path": "action/6/choose/9/conditions/1",
"timestamp": "2026-01-01T15:29:31.385157+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/10": [
{
"path": "action/6/choose/10",
"timestamp": "2026-01-01T15:29:31.386275+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/10/conditions/0": [
{
"path": "action/6/choose/10/conditions/0",
"timestamp": "2026-01-01T15:29:31.386914+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/10/conditions/1": [
{
"path": "action/6/choose/10/conditions/1",
"timestamp": "2026-01-01T15:29:31.388007+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/11": [
{
"path": "action/6/choose/11",
"timestamp": "2026-01-01T15:29:31.389119+00:00",
"result": {
"result": false
}
}
],
"action/6/choose/11/conditions/0": [
{
"path": "action/6/choose/11/conditions/0",
"timestamp": "2026-01-01T15:29:31.389778+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/11/conditions/1": [
{
"path": "action/6/choose/11/conditions/1",
"timestamp": "2026-01-01T15:29:31.390874+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/12": [
{
"path": "action/6/choose/12",
"timestamp": "2026-01-01T15:29:31.391984+00:00",
"result": {
"result": true
}
}
],
"action/6/choose/12/conditions/0": [
{
"path": "action/6/choose/12/conditions/0",
"timestamp": "2026-01-01T15:29:31.392623+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/conditions/1": [
{
"path": "action/6/choose/12/conditions/1",
"timestamp": "2026-01-01T15:29:31.393716+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/conditions/2": [
{
"path": "action/6/choose/12/conditions/2",
"timestamp": "2026-01-01T15:29:31.394854+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/conditions/3": [
{
"path": "action/6/choose/12/conditions/3",
"timestamp": "2026-01-01T15:29:31.395986+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/conditions/4": [
{
"path": "action/6/choose/12/conditions/4",
"timestamp": "2026-01-01T15:29:31.397078+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/0": [
{
"path": "action/6/choose/12/sequence/0",
"timestamp": "2026-01-01T15:29:31.398491+00:00",
"result": {
"delay": 3,
"done": true
}
}
],
"action/6/choose/12/sequence/1": [
{
"path": "action/6/choose/12/sequence/1",
"timestamp": "2026-01-01T15:29:34.400202+00:00",
"changed_variables": {
"background_is_open": false,
"background_is_closed": true,
"background_is_shaded": false,
"background_is_vpart": false,
"background_is_vfull": false
}
}
],
"action/6/choose/12/sequence/2": [
{
"path": "action/6/choose/12/sequence/2",
"timestamp": "2026-01-01T15:29:34.402074+00:00",
"changed_variables": {
"target_position": 0,
"target_tilt_position": 50
},
"result": {
"choice": 0
}
}
],
"action/6/choose/12/sequence/2/choose/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0",
"timestamp": "2026-01-01T15:29:34.402594+00:00",
"result": {
"result": true
}
}
],
"action/6/choose/12/sequence/2/choose/0/conditions/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/conditions/0",
"timestamp": "2026-01-01T15:29:34.403305+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/conditions/1": [
{
"path": "action/6/choose/12/sequence/2/choose/0/conditions/1",
"timestamp": "2026-01-01T15:29:34.404535+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/conditions/2": [
{
"path": "action/6/choose/12/sequence/2/choose/0/conditions/2",
"timestamp": "2026-01-01T15:29:34.405722+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/0",
"timestamp": "2026-01-01T15:29:34.407087+00:00",
"result": {
"choice": "default"
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/1": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/1",
"timestamp": "2026-01-01T15:29:34.407775+00:00",
"changed_variables": {
"target_position": 0,
"target_tilt_position": 50
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2",
"timestamp": "2026-01-01T15:29:34.408824+00:00"
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/0",
"timestamp": "2026-01-01T15:29:34.409185+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1",
"timestamp": "2026-01-01T15:29:34.410286+00:00"
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0",
"timestamp": "2026-01-01T15:29:34.411180+00:00",
"changed_variables": {
"repeat": {
"first": true,
"index": 1,
"last": true,
"item": "cover.woonkamer_gordijnen"
}
},
"result": {
"choice": 0
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0",
"timestamp": "2026-01-01T15:29:34.411831+00:00",
"result": {
"result": true
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0/conditions/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0/conditions/0",
"timestamp": "2026-01-01T15:29:34.412847+00:00",
"result": {
"result": true,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0/sequence/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/0/choose/0/sequence/0",
"timestamp": "2026-01-01T15:29:34.414652+00:00",
"child_id": {
"domain": "automation",
"item_id": "1745343451841",
"run_id": "735875707ae55f601bf06ca2e7b73251"
},
"result": {
"params": {
"domain": "cover",
"service": "close_cover",
"service_data": {},
"target": {
"entity_id": [
"cover.woonkamer_gordijnen"
]
}
},
"running_script": false
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/1": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/2/sequence/1/repeat/sequence/1",
"timestamp": "2026-01-01T15:29:34.472559+00:00",
"result": {
"delay": 1,
"done": true
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/3": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/3",
"timestamp": "2026-01-01T15:29:35.476494+00:00"
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/3/sequence/0": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/3/sequence/0",
"timestamp": "2026-01-01T15:29:35.476990+00:00",
"result": {
"result": false,
"entities": []
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/4": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/4",
"timestamp": "2026-01-01T15:29:35.478595+00:00",
"result": {
"choice": "default"
}
}
],
"action/6/choose/12/sequence/2/choose/0/sequence/5": [
{
"path": "action/6/choose/12/sequence/2/choose/0/sequence/5",
"timestamp": "2026-01-01T15:29:35.479297+00:00",
"result": {
"stop": "Return to Close executed",
"error": false
}
}
]
},
"config": {
"trigger_variables": {
"blind": "cover.woonkamer_gordijnen",
"cover_type": "blind",
"is_awning": "{{ cover_type == 'awning' }}",
"resident_sensor": [],
"position_source": "current_position_attr",
"custom_position_sensor": [],
"open_position": 100,
"close_position": 0,
"ventilate_position": 40,
"shading_position": 25,
"position_tolerance": 3,
"open_tilt_position": 50,
"close_tilt_position": 50,
"ventilate_tilt_position": 50,
"shading_tilt_elevation_1": 20,
"shading_tilt_elevation_2": 30,
"shading_tilt_elevation_3": 48,
"shading_tilt_position_0": 0,
"shading_tilt_position_1": 20,
"shading_tilt_position_2": 37,
"shading_tilt_position_3": 50,
"auto_options": [
"auto_up_enabled",
"auto_down_enabled",
"auto_sun_enabled",
"auto_ventilate_enabled"
],
"cover_tilt_config": "cover_tilt_disabled",
"cover_tilt_reposition_config": "cover_tilt_reposition_disabled",
"is_cover_tilt_enabled": "{{ not is_awning and 'cover_tilt_enabled' in cover_tilt_config }}",
"tilt_wait_mode": "fixed_delay",
"tilt_wait_timeout": 30,
"is_tilt_wait_idle_mode": "{{ tilt_wait_mode == 'wait_idle' }}",
"time_up_early": "06:00:00",
"time_up_early_non_workday": "06:00:00",
"time_up_late": "09:15:00",
"time_up_late_non_workday": "09:15:00",
"time_down_early": "16:30:00",
"time_down_early_non_workday": "16:30:00",
"time_down_late": "21:30:00",
"time_down_late_non_workday": "21:30:00",
"workday_sensor_today": "binary_sensor.workday_sensor",
"workday_sensor_tomorrow": "binary_sensor.workday_tomorrow",
"time_control": "time_control_input",
"calendar_entity": [],
"calendar_open_title": "Open Cover",
"calendar_close_title": "Close Cover",
"calendar_open_title_lc": "{{ (calendar_open_title | default('')) | lower | trim }}",
"calendar_close_title_lc": "{{ (calendar_close_title | default('')) | lower | trim }}",
"is_calendar_enabled": "{{ 'time_control_calendar' in time_control and calendar_entity != [] }}",
"default_brightness_sensor": [],
"brightness_up": 0,
"brightness_down": 0,
"brightness_hysteresis": 0,
"default_sun_sensor": "sun.sun",
"sun_elevation_mode": "fixed",
"sun_elevation_up": 0,
"sun_elevation_down": 0,
"sun_elevation_up_sensor": [],
"sun_elevation_down_sensor": [],
"contact_window_opened": [],
"contact_window_tilted": "binary_sensor.woonkamer_pui_open_of_net_dicht",
"lockout_tilted_options": [
"lockout_tilted_closing"
],
"shading_azimuth_start": 95,
"shading_azimuth_end": 265,
"shading_elevation_min": 25,
"shading_elevation_max": 90,
"shading_sun_brightness_start": 35000,
"shading_sun_brightness_end": 25000,
"shading_sun_brightness_hysteresis": 0,
"shading_brightness_sensor": [],
"shading_temperatur_sensor1": [],
"shading_temperatur_sensor2": [],
"shading_min_temperatur1": 18,
"shading_min_temperatur2": 18,
"shading_temperature_hysteresis1": 0.2,
"shading_temperature_hysteresis2": 0.2,
"shading_forecast_sensor": [],
"shading_forecast_temp_sensor": [],
"shading_forecast_type": "daily",
"shading_forecast_temp": [],
"shading_forecast_temp_hysteresis": 0,
"shading_weather_conditions": [],
"shading_conditions_start_and": [
"cond_azimuth",
"cond_elevation",
"cond_brightness",
"cond_temp1",
"cond_temp2",
"cond_forecast_temp",
"cond_forecast_weather"
],
"shading_conditions_start_or": [],
"shading_conditions_end_and": [],
"shading_conditions_end_or": [
"cond_azimuth",
"cond_elevation",
"cond_brightness",
"cond_temp1",
"cond_temp2",
"cond_forecast_temp",
"cond_forecast_weather"
],
"lockout_tilted_when_closing": "{{ 'lockout_tilted_closing' in lockout_tilted_options }}",
"lockout_tilted_when_shading_starts": "{{ 'lockout_tilted_shading_start' in lockout_tilted_options }}",
"lockout_tilted_when_shading_ends": "{{ 'lockout_tilted_shading_end' in lockout_tilted_options }}",
"is_shading_enabled": "{{ 'auto_shading_enabled' in auto_options }}",
"is_up_enabled": "{{ 'auto_up_enabled' in auto_options }}",
"is_down_enabled": "{{ 'auto_down_enabled' in auto_options }}",
"is_brightness_enabled": "{{ 'auto_brightness_enabled' in auto_options }}",
"is_sun_elevation_enabled": "{{ 'auto_sun_enabled' in auto_options }}",
"is_time_field_enabled": "{{ 'time_control_input' in time_control }}",
"is_time_control_disabled": "{{ 'time_control_disabled' in time_control }}",
"is_ventilation_enabled": "{{ not is_awning and 'auto_ventilate_enabled' in auto_options }}",
"reset_override_config": "reset_disabled",
"reset_override_time": "00:01:00",
"reset_override_timeout": 5,
"is_reset_disabled": "{{ 'reset_disabled' in reset_override_config }}",
"is_reset_fixed_time": "{{ 'reset_fixed_time' in reset_override_config }}",
"is_reset_timeout": "{{ 'reset_timeout' in reset_override_config }}",
"auto_up_force": [],
"auto_down_force": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"auto_ventilate_force": [],
"auto_shading_start_force": [],
"cover_status_options": "cover_helper_enabled",
"cover_status_helper": "input_text.woonkamer_gordijnen_helper",
"prevent_opening_movement": [],
"invalid_states": [
"",
"unavailable",
"unknown",
"none",
"None",
"null",
"query failed",
[]
]
},
"variables": {
"version": "2025.12.30",
"blind_entities": "{{ expand(blind) | map(attribute='entity_id') | list }}",
"current_position": "{% set source = position_source %} {% if source == 'current_position_attr' %}\n {{ state_attr(blind, 'current_position') | int(default=101) }}\n{% elif source == 'position_attr' %}\n {{ state_attr(blind, 'position') | int(default=101) }}\n{% elif source == 'custom_sensor' and custom_position_sensor != [] %}\n {{ states(custom_position_sensor) | int(default=101) }}\n{% else %}\n {{ 101 }}\n{% endif %}",
"current_tilt_position": "{{ state_attr(blind, 'current_tilt_position') | int(default=101) }}",
"position_comparisons": {
"current_above_open": "{{ current_position < open_position if is_awning else current_position > open_position }}",
"current_above_close": "{{ current_position < close_position if is_awning else current_position > close_position }}",
"current_above_shading": "{{ current_position < shading_position if is_awning else current_position > shading_position }}",
"current_above_ventilate": "{{ current_position < ventilate_position if is_awning else current_position > ventilate_position }}",
"current_below_open": "{{ current_position > open_position if is_awning else current_position < open_position }}",
"current_below_close": "{{ current_position > close_position if is_awning else current_position < close_position }}",
"current_below_shading": "{{ current_position > shading_position if is_awning else current_position < shading_position }}",
"current_below_ventilate": "{{ current_position > ventilate_position if is_awning else current_position < ventilate_position }}",
"open_above_close": "{{ open_position < close_position if is_awning else open_position > close_position }}",
"open_above_ventilate": "{{ open_position < ventilate_position if is_awning else open_position > ventilate_position }}",
"shading_above_close": "{{ shading_position < close_position if is_awning else shading_position > close_position }}",
"shading_below_open": "{{ shading_position > open_position if is_awning else shading_position < open_position }}",
"ventilate_above_close": "{{ ventilate_position < close_position if is_awning else ventilate_position > close_position }}"
},
"current_sun_azimuth": "{{ state_attr(default_sun_sensor, 'azimuth') }}",
"current_sun_elevation": "{{ state_attr(default_sun_sensor, 'elevation') }}",
"sun_elevation_up_current": "{% set mode = sun_elevation_mode %} {% set sensor = sun_elevation_up_sensor %} {% set fixed_value = sun_elevation_up | float %} {% set sensor_valid = sensor != [] and states(sensor) not in invalid_states and is_number(states(sensor)) %} {% if mode == 'dynamic' %}\n {% if sensor_valid %}\n {{ states(sensor) | float }}\n {% else %}\n {{ fixed_value }}\n {% endif %}\n{% elif mode == 'hybrid' %}\n {% if sensor_valid %}\n {{ (states(sensor) | float) + fixed_value }}\n {% else %}\n {{ fixed_value }}\n {% endif %}\n{% else %}\n {{ fixed_value }}\n{% endif %}",
"sun_elevation_down_current": "{% set mode = sun_elevation_mode %} {% set sensor = sun_elevation_down_sensor %} {% set fixed_value = sun_elevation_down | float %} {% set sensor_valid = sensor != [] and states(sensor) not in invalid_states and is_number(states(sensor)) %} {% if mode == 'dynamic' %}\n {% if sensor_valid %}\n {{ states(sensor) | float }}\n {% else %}\n {{ fixed_value }}\n {% endif %}\n{% elif mode == 'hybrid' %}\n {% if sensor_valid %}\n {{ (states(sensor) | float) + fixed_value }}\n {% else %}\n {{ fixed_value }}\n {% endif %}\n{% else %}\n {{ fixed_value }}\n{% endif %}",
"is_today_off": "{{ workday_sensor_today != [] and is_state(workday_sensor_today, 'off') }}",
"is_tomorrow_off": "{{ workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'off') }}",
"is_tomorrow_on": "{{ workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'on') }}",
"is_cover_tilt_enabled_and_possible": "{{ is_cover_tilt_enabled and state_attr(blind, 'current_tilt_position') != none }}",
"is_cover_tilt_reposition_enabled": "{{ 'cover_tilt_reposition_enabled' in cover_tilt_reposition_config }}",
"drive_delay_fix": 0,
"drive_delay_random": 5,
"drive_time": 30,
"time_up_early_today": "{{ time_up_early_non_workday if is_today_off else time_up_early }}",
"time_up_late_today": "{{ time_up_late_non_workday if is_today_off else time_up_late }}",
"time_down_early_today": "{{\n time_down_early_non_workday if is_tomorrow_off else\n time_down_early if is_tomorrow_on else\n time_down_early_non_workday if is_today_off else\n time_down_early\n}}",
"time_down_late_today": "{{\n time_down_late_non_workday if is_tomorrow_off else\n time_down_late if is_tomorrow_on else\n time_down_late_non_workday if is_today_off else\n time_down_late\n}}",
"shading_tilt_position": "{% set elevation = current_sun_elevation | int(default=0) %} {% if elevation >= shading_tilt_elevation_3 | int %}\n {{ shading_tilt_position_3 | int }}\n{% elif elevation >= shading_tilt_elevation_2 | int %}\n {{ shading_tilt_position_2 | int }}\n{% elif elevation >= shading_tilt_elevation_1 | int %}\n {{ shading_tilt_position_1 | int }}\n{% else %}\n {{ shading_tilt_position_0 | int }}\n{% endif %}",
"in_open_position": "{% set min = open_position - position_tolerance %} {% set max = open_position + position_tolerance %} {{\n (current_position >= min and current_position <= max)\n and (\n (not is_cover_tilt_enabled_and_possible) or\n (is_cover_tilt_enabled_and_possible and current_tilt_position == open_tilt_position | int)\n )\n}}",
"in_close_position": "{% set min = close_position - position_tolerance %} {% set max = close_position + position_tolerance %} {{\n (current_position >= min and current_position <= max)\n and (\n (not is_cover_tilt_enabled_and_possible) or\n (is_cover_tilt_enabled_and_possible and current_tilt_position == close_tilt_position | int)\n )\n}}",
"in_shading_position": "{% set min = shading_position - position_tolerance %} {% set max = shading_position + position_tolerance %} {{\n is_shading_enabled\n and (current_position >= min and current_position <= max)\n and (\n (not is_cover_tilt_enabled_and_possible) or\n (current_tilt_position == shading_tilt_position | int)\n )\n}}",
"in_ventilate_position": "{% set min = ventilate_position - position_tolerance %} {% set max = ventilate_position + position_tolerance %} {{\n is_ventilation_enabled\n and (current_position >= min and current_position <= max)\n and (\n (not is_cover_tilt_enabled_and_possible) or\n (current_tilt_position == ventilate_tilt_position | int)\n )\n}}",
"brightness_time_duration": 30,
"sun_time_duration": 30,
"shading_waitingtime_start": 300,
"shading_waitingtime_end": 300,
"shading_start_max_duration": 7200,
"shading_end_max_duration": 7200,
"shading_config": [],
"shading_end_immediate_by_sun_position": false,
"is_shading_end_immediate_by_sun_position": "{{ shading_end_immediate_by_sun_position }}",
"forecast_source": {
"use_sensor": "{{ shading_forecast_temp_sensor != [] }}",
"use_weather": "{{ shading_forecast_sensor != [] and shading_forecast_temp_sensor == [] }}",
"prevent_service": "{{ 'weather_attributes' in shading_forecast_type }}"
},
"shading_start_condition_enabled": {
"azimuth": "{{ 'cond_azimuth' in shading_conditions_start_and or 'cond_azimuth' in shading_conditions_start_or }}",
"elevation": "{{ 'cond_elevation' in shading_conditions_start_and or 'cond_elevation' in shading_conditions_start_or }}",
"brightness": "{{ 'cond_brightness' in shading_conditions_start_and or 'cond_brightness' in shading_conditions_start_or }}",
"temp1": "{{ 'cond_temp1' in shading_conditions_start_and or 'cond_temp1' in shading_conditions_start_or }}",
"temp2": "{{ 'cond_temp2' in shading_conditions_start_and or 'cond_temp2' in shading_conditions_start_or }}",
"forecast_temp": "{{ 'cond_forecast_temp' in shading_conditions_start_and or 'cond_forecast_temp' in shading_conditions_start_or }}",
"forecast_weather": "{{ 'cond_forecast_weather' in shading_conditions_start_and or 'cond_forecast_weather' in shading_conditions_start_or }}"
},
"shading_end_condition_enabled": {
"azimuth": "{{ 'cond_azimuth' in shading_conditions_end_and or 'cond_azimuth' in shading_conditions_end_or }}",
"elevation": "{{ 'cond_elevation' in shading_conditions_end_and or 'cond_elevation' in shading_conditions_end_or }}",
"brightness": "{{ 'cond_brightness' in shading_conditions_end_and or 'cond_brightness' in shading_conditions_end_or }}",
"temp1": "{{ 'cond_temp1' in shading_conditions_end_and or 'cond_temp1' in shading_conditions_end_or }}",
"temp2": "{{ 'cond_temp2' in shading_conditions_end_and or 'cond_temp2' in shading_conditions_end_or }}",
"forecast_temp": "{{ 'cond_forecast_temp' in shading_conditions_end_and or 'cond_forecast_temp' in shading_conditions_end_or }}",
"forecast_weather": "{{ 'cond_forecast_weather' in shading_conditions_end_and or 'cond_forecast_weather' in shading_conditions_end_or }}"
},
"is_status_helper_enabled": "{{\n 'cover_helper_enabled' in cover_status_options and\n cover_status_helper != [] and\n states(cover_status_helper) not in invalid_states and\n states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\")\n}}",
"helper_json": "{% if is_status_helper_enabled %}\n {{ states(cover_status_helper) | from_json }}\n{% else %}\n {{\n {\n 'open': {'a': 0, 't': 0},\n 'close': {'a': 0, 't': 0},\n 'shading': {'a': 0, 't': 0, 'p': 0, 'q': 0},\n 'vpart': {'a': 0, 't': 0},\n 'vfull': {'a': 0, 't': 0},\n 'manual': {'a': 0, 't': 0},\n 'v': 5,\n 't': as_timestamp(now()) | round(0)\n } | to_json | from_json\n }}\n{% endif %}\n",
"helper_status": {
"open": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('open')) and (helper_json.open.a | default(false) | bool) }}",
"closed": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('close')) and (helper_json.close.a | default(false) | bool) }}",
"shaded": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('shading')) and (helper_json.shading.a | default(false) | bool) and not (helper_json.shading.p | default(false) | bool) }}",
"shading_start_pending": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('shading')) and (helper_json.shading.p | default(false) | bool) }}",
"shading_end_pending": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('shading')) and (helper_json.shading.q | default(false) | bool) }}",
"vpart": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('vpart')) and (helper_json.vpart.a | default(false) | bool) }}",
"vfull": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('vfull')) and (helper_json.vfull.a | default(false) | bool) }}",
"manual": "{{ (is_status_helper_enabled | default(false)) and (helper_json | regex_search('manual')) and (helper_json.manual.a | default(false) | bool) }}"
},
"helper_ts": {
"open": "{{ (helper_json.open.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('open'))) else 0 }}",
"closed": "{{ (helper_json.close.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('close'))) else 0 }}",
"shaded": "{{ (helper_json.shading.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('shading'))) else 0 }}",
"vpart": "{{ (helper_json.vpart.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('vpart'))) else 0 }}",
"vfull": "{{ (helper_json.vfull.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('vfull'))) else 0 }}",
"manual": "{{ (helper_json.manual.t | default(0)) if ((is_status_helper_enabled | default(false)) and (helper_json | regex_search('manual'))) else 0 }}"
},
"is_cover_movement_blocked": {
"open": "{{ (auto_down_force != [] and states(auto_down_force) in ['on', 'true']) or (auto_ventilate_force != [] and states(auto_ventilate_force) in ['on', 'true']) or (auto_shading_start_force != [] and states(auto_shading_start_force) in ['on', 'true']) or (prevent_opening_movement != [] and states(prevent_opening_movement) in ['true', 'on']) }}",
"opening_movement": "{{ prevent_opening_movement != [] and states(prevent_opening_movement) in ['true', 'on'] }}",
"close": "{{ (auto_up_force != [] and states(auto_up_force) in ['on', 'true']) or (auto_ventilate_force != [] and states(auto_ventilate_force) in ['on', 'true']) or (auto_shading_start_force != [] and states(auto_shading_start_force) in ['on', 'true']) }}",
"ventilate": "{{ (auto_up_force != [] and states(auto_up_force) in ['on', 'true']) or (auto_down_force != [] and states(auto_down_force) in ['on', 'true']) or (auto_shading_start_force != [] and states(auto_shading_start_force) in ['on', 'true']) or (prevent_opening_movement != [] and states(prevent_opening_movement) in ['true', 'on']) }}",
"shading": "{{ (auto_up_force != [] and states(auto_up_force) in ['on', 'true']) or (auto_down_force != [] and states(auto_down_force) in ['on', 'true']) or (auto_ventilate_force != [] and states(auto_ventilate_force) in ['on', 'true']) }}",
"any": "{{ (auto_up_force != [] and states(auto_up_force) in ['on', 'true']) or (auto_down_force != [] and states(auto_down_force) in ['on', 'true']) or (auto_ventilate_force != [] and states(auto_ventilate_force) in ['on', 'true']) or (auto_shading_start_force != [] and states(auto_shading_start_force) in ['on', 'true']) or (prevent_opening_movement != [] and states(prevent_opening_movement) in ['true', 'on']) }}"
},
"resident_config": [],
"resident_flags": {
"opening_enabled": "{{ 'resident_opening_enabled' in resident_config }}",
"closing_enabled": "{{ 'resident_closing_enabled' in resident_config }}",
"allow_shading": "{{ 'resident_allow_shading' in resident_config }}",
"allow_opening": "{{ 'resident_allow_opening' in resident_config }}",
"allow_ventilation": "{{ 'resident_allow_ventilation' in resident_config }}"
},
"ignore_after_manual_config": [],
"override_flags": {
"opening": "{{ 'ignore_opening_after_manual' in ignore_after_manual_config }}",
"closing": "{{ 'ignore_closing_after_manual' in ignore_after_manual_config }}",
"ventilation": "{{ 'ignore_ventilation_after_manual' in ignore_after_manual_config }}",
"shading": "{{ 'ignore_shading_after_manual' in ignore_after_manual_config }}"
},
"auto_ventilate_options": [
"ventilation_delay_enabled"
],
"contact_delay_trigger": 2,
"contact_delay_status": 3,
"ventilation_flags": {
"delay_enabled": "{{ 'ventilation_delay_enabled' in auto_ventilate_options }}",
"if_lower_enabled": "{{ 'ventilation_if_lower_enabled' in auto_ventilate_options }}",
"after_shading_end": "{{ 'ventilation_after_shading_end' in auto_ventilate_options }}"
},
"prevent_config": [],
"prevent_flags": {
"higher_position_closing": "{{ 'prevent_higher_position_closing' in prevent_config }}",
"lowering_when_closing_if_shaded": "{{ 'prevent_lowering_when_closing_if_shaded' in prevent_config }}",
"shading_end_if_closed": "{{ 'prevent_shading_end_if_closed' in prevent_config }}",
"opening_after_shading_end": "{{ 'prevent_opening_after_shading_end' in prevent_config }}",
"opening_after_ventilation_end": "{{ 'prevent_opening_after_ventilation_end' in prevent_config }}",
"default_cover_actions": "{{ 'prevent_default_cover_actions' in prevent_config }}",
"shading_multiple_times": "{{ 'prevent_shading_multiple_times' in prevent_config }}",
"opening_multiple_times": "{{ 'prevent_opening_multiple_times' in prevent_config }}",
"closing_multiple_times": "{{ 'prevent_closing_multiple_times' in prevent_config }}",
"opening_movement": "{{ prevent_opening_movement != [] and states(prevent_opening_movement) in ['true', 'on'] }}"
},
"auto_recover_after_force": "auto_recover_enabled",
"is_auto_recover_enabled": "{{ 'auto_recover_enabled' in auto_recover_after_force }}",
"check_config": false,
"check_config_debuglevel": "info",
"check_status_helper_length": "{{ state_attr(cover_status_helper, 'max') if cover_status_helper != [] else None }}"
},
"mode": "queued",
"max": 10,
"max_exceeded": "warning",
"triggers": [
{
"trigger": "template",
"value_template": "{% set is_today_off = workday_sensor_today != [] and is_state(workday_sensor_today, 'off') %} {% set time_compare = time_up_early_non_workday if is_today_off else time_up_early %} {{ now() >= today_at(time_compare) }}",
"enabled": "{{ is_time_field_enabled }}",
"id": "t_open_1"
},
{
"trigger": "template",
"value_template": "{% set is_today_off = workday_sensor_today != [] and is_state(workday_sensor_today, 'off') %} {% set early = time_up_early_non_workday if is_today_off else time_up_early %} {% set late = time_up_late_non_workday if is_today_off else time_up_late %} {{ early != late and now() >= today_at(late) }}",
"enabled": "{{ is_time_field_enabled }}",
"id": "t_open_2"
},
{
"trigger": "template",
"value_template": "{{ states(default_brightness_sensor) | float(default=brightness_up) > (brightness_up + brightness_hysteresis) }}",
"for": {
"seconds": 30
},
"enabled": "{{ is_brightness_enabled and default_brightness_sensor != [] }}",
"id": "t_open_4"
},
{
"trigger": "template",
"value_template": "{% set sensor = sun_elevation_up_sensor %} {% set current_elevation = state_attr(default_sun_sensor, 'elevation') | float(0) %} {% if sensor != [] and states(sensor) not in invalid_states and is_number(states(sensor)) %}\n {{ current_elevation > (states(sensor) | float) }}\n{% else %}\n {{ current_elevation > sun_elevation_up }}\n{% endif %}",
"for": {
"seconds": 30
},
"enabled": "{{ is_sun_elevation_enabled and default_sun_sensor != [] }}",
"id": "t_open_5"
},
{
"trigger": "state",
"entity_id": [],
"from": "on",
"to": "off",
"enabled": "{{ resident_sensor != [] }}",
"id": "t_open_6"
},
{
"platform": "state",
"entity_id": [],
"from": "on",
"to": "off",
"enabled": "{{ prevent_opening_movement != [] }}",
"id": "t_open_7"
},
{
"trigger": "state",
"entity_id": [],
"from": "off",
"to": "on",
"enabled": "{{ auto_up_force != [] }}",
"id": "t_force_enabled_open"
},
{
"trigger": "state",
"entity_id": [],
"from": "on",
"to": "off",
"enabled": "{{ auto_up_force != [] }}",
"id": "t_force_disabled_open"
},
{
"trigger": "template",
"value_template": "{% set is_tomorrow_off = workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'off') %} {% set is_tomorrow_on = workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'on') %} {% set is_today_off = workday_sensor_today != [] and is_state(workday_sensor_today, 'off') %} {% set time_compare =\n time_down_early_non_workday if is_tomorrow_off else\n time_down_early if is_tomorrow_on else\n time_down_early_non_workday if is_today_off else\n time_down_early %}\n{{ now() >= today_at(time_compare) }}",
"enabled": "{{ is_time_field_enabled }}",
"id": "t_close_1"
},
{
"trigger": "template",
"value_template": "{% set is_tomorrow_off = workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'off') %} {% set is_tomorrow_on = workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'on') %} {% set is_today_off = workday_sensor_today != [] and is_state(workday_sensor_today, 'off') %} {% set time_compare =\n time_down_late_non_workday if is_tomorrow_off else\n time_down_late if is_tomorrow_on else\n time_down_late_non_workday if is_today_off else\n time_down_late %}\n{{ (time_down_early_non_workday != time_compare and time_down_early != time_compare) and now() >= today_at(time_compare) }}",
"enabled": "{{ is_time_field_enabled }}",
"id": "t_close_2"
},
{
"trigger": "template",
"value_template": "{{ states(default_brightness_sensor) | float(default=brightness_down) < (brightness_down - brightness_hysteresis) }}",
"for": {
"seconds": 30
},
"enabled": "{{ is_brightness_enabled and default_brightness_sensor != [] }}",
"id": "t_close_4"
},
{
"trigger": "template",
"value_template": "{% set sensor = sun_elevation_down_sensor %} {% set current_elevation = state_attr(default_sun_sensor, 'elevation') | float(0) %} {% if sensor != [] and states(sensor) not in invalid_states and is_number(states(sensor)) %}\n {{ current_elevation < (states(sensor) | float) }}\n{% else %}\n {{ current_elevation < sun_elevation_down }}\n{% endif %}",
"for": {
"seconds": 30
},
"enabled": "{{ is_sun_elevation_enabled and default_sun_sensor != [] }}",
"id": "t_close_5"
},
{
"trigger": "state",
"entity_id": [],
"from": "off",
"to": "on",
"enabled": "{{ resident_sensor != [] }}",
"id": "t_close_6"
},
{
"trigger": "state",
"entity_id": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"from": "off",
"to": "on",
"enabled": "{{ auto_down_force != [] }}",
"id": "t_force_enabled_close"
},
{
"trigger": "state",
"entity_id": "binary_sensor.woonkamer_gordijnen_geforceerd_dicht",
"from": "on",
"to": "off",
"enabled": "{{ auto_down_force != [] }}",
"id": "t_force_disabled_close"
},
{
"trigger": "state",
"entity_id": [],
"to": "on",
"enabled": "{{ is_calendar_enabled }}",
"id": "t_calendar_event_start"
},
{
"trigger": "state",
"entity_id": [],
"to": "off",
"enabled": "{{ is_calendar_enabled }}",
"id": "t_calendar_event_end"
},
{
"trigger": "state",
"entity_id": "binary_sensor.woonkamer_pui_open_of_net_dicht",
"enabled": "{{ is_ventilation_enabled and contact_window_tilted != [] }}",
"id": "t_contact_tilted_changed",
"for": {
"seconds": 2
}
},
{
"trigger": "state",
"entity_id": [],
"enabled": "{{ is_ventilation_enabled and contact_window_opened != [] }}",
"id": "t_contact_opened_changed",
"for": {
"seconds": 2
}
},
{
"trigger": "state",
"entity_id": [],
"from": "off",
"to": "on",
"enabled": "{{ auto_ventilate_force != [] }}",
"id": "t_force_enabled_ventilate"
},
{
"trigger": "state",
"entity_id": [],
"from": "on",
"to": "off",
"enabled": "{{ auto_ventilate_force != [] }}",
"id": "t_force_disabled_ventilate"
},
{
"trigger": "template",
"value_template": "{{\n state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_start) > shading_azimuth_start and\n state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_end) < shading_azimuth_end and\n state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_min) > shading_elevation_min and\n state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_max) < shading_elevation_max\n}}",
"enabled": "{{ is_shading_enabled and default_sun_sensor != [] }}",
"id": "t_shading_start_pending_1"
},
{
"trigger": "template",
"value_template": "{{ states(shading_brightness_sensor) not in invalid_states and states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > (shading_sun_brightness_start + shading_sun_brightness_hysteresis) }}",
"enabled": "{{ is_shading_enabled and shading_brightness_sensor != [] }}",
"id": "t_shading_start_pending_2"
},
{
"trigger": "template",
"value_template": "{{ states(shading_temperatur_sensor1) not in invalid_states and states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > (shading_min_temperatur1 + shading_temperature_hysteresis1) }}",
"enabled": "{{ is_shading_enabled and shading_temperatur_sensor1 != [] }}",
"id": "t_shading_start_pending_3"
},
{
"trigger": "template",
"value_template": "{{ states(shading_temperatur_sensor2) not in invalid_states and states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > (shading_min_temperatur2 + shading_temperature_hysteresis2) }}",
"enabled": "{{ is_shading_enabled and shading_temperatur_sensor2 != [] }}",
"id": "t_shading_start_pending_4"
},
{
"trigger": "template",
"value_template": "{{ states(shading_forecast_sensor) not in invalid_states and states(shading_forecast_sensor) in shading_weather_conditions }}",
"enabled": "{{ is_shading_enabled and shading_forecast_sensor != [] }}",
"id": "t_shading_start_pending_5"
},
{
"trigger": "template",
"value_template": "{{ now() >= today_at([time_up_early, time_up_early_non_workday] | min) - timedelta(hours = 1) }}",
"enabled": "{{ is_shading_enabled }}",
"id": "t_shading_start_pending_6"
},
{
"trigger": "template",
"value_template": "{% set helper_state = states(cover_status_helper) %} {{\n helper_state not in invalid_states and\n helper_state | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n helper_state | from_json | regex_search('shading') and\n (helper_state | from_json).shading.p is defined and\n (helper_state | from_json).shading.p > 0 and\n now() >= ((helper_state | from_json).shading.p) | as_datetime | as_local\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] }}",
"id": "t_shading_start_execution"
},
{
"trigger": "state",
"entity_id": [],
"from": "off",
"to": "on",
"enabled": "{{ auto_shading_start_force != [] }}",
"id": "t_force_enabled_shading"
},
{
"trigger": "state",
"entity_id": [],
"from": "on",
"to": "off",
"enabled": "{{ auto_shading_start_force != [] }}",
"id": "t_force_disabled_shading"
},
{
"trigger": "template",
"value_template": "{{\n states(cover_status_helper) not in invalid_states and\n states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n state_attr(default_sun_sensor, 'elevation') < shading_tilt_elevation_1\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
"id": "t_shading_tilt_1"
},
{
"trigger": "template",
"value_template": "{{\n states(cover_status_helper) not in invalid_states and\n states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n state_attr(default_sun_sensor, 'elevation') < shading_tilt_elevation_2 and\n state_attr(default_sun_sensor, 'elevation') >= shading_tilt_elevation_1\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
"id": "t_shading_tilt_2"
},
{
"trigger": "template",
"value_template": "{{\n states(cover_status_helper) not in invalid_states and\n states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n state_attr(default_sun_sensor, 'elevation') < shading_tilt_elevation_3 and\n state_attr(default_sun_sensor, 'elevation') >= shading_tilt_elevation_2\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
"id": "t_shading_tilt_3"
},
{
"trigger": "template",
"value_template": "{{\n states(cover_status_helper) not in invalid_states and\n states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n state_attr(default_sun_sensor, 'elevation') >= shading_tilt_elevation_3\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
"id": "t_shading_tilt_4"
},
{
"trigger": "template",
"value_template": "{{ states(shading_temperatur_sensor1) not in invalid_states and states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) < (shading_min_temperatur1 - shading_temperature_hysteresis1) }}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_temperatur_sensor1 != [] }}",
"id": "t_shading_end_pending_1"
},
{
"trigger": "template",
"value_template": "{{ states(shading_temperatur_sensor2) not in invalid_states and states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) < (shading_min_temperatur2 - shading_temperature_hysteresis2) }}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_temperatur_sensor2 != [] }}",
"id": "t_shading_end_pending_2"
},
{
"trigger": "template",
"value_template": "{{ states(shading_brightness_sensor) not in invalid_states and states(shading_brightness_sensor) | float(default=shading_sun_brightness_end) < (shading_sun_brightness_end - shading_sun_brightness_hysteresis) }}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_brightness_sensor != [] }}",
"id": "t_shading_end_pending_3"
},
{
"trigger": "template",
"value_template": "{{ states(shading_forecast_sensor) not in shading_weather_conditions }}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_weather_conditions != [] and shading_forecast_sensor != [] }}",
"id": "t_shading_end_pending_4"
},
{
"trigger": "template",
"value_template": "{{\n (state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_start) < shading_azimuth_start) or\n (state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_end) > shading_azimuth_end) or\n (state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_max) > shading_elevation_max) or\n (state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_min) < shading_elevation_min)\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] and default_sun_sensor != [] }}",
"id": "t_shading_end_pending_5"
},
{
"trigger": "template",
"value_template": "{% set helper_state = states(cover_status_helper) %} {{\n helper_state not in invalid_states and\n helper_state | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n helper_state | from_json | regex_search('shading') and\n (helper_state | from_json).shading.q is defined and\n (helper_state | from_json).shading.q > 0 and\n now() >= ((helper_state | from_json).shading.q) | as_datetime | as_local\n}}",
"enabled": "{{ is_shading_enabled and cover_status_helper != [] }}",
"id": "t_shading_end_execution"
},
{
"trigger": "template",
"value_template": "{{ now() >= today_at('23:55:00') }}",
"id": "t_shading_reset",
"enabled": "{{ is_shading_enabled }}"
},
{
"trigger": "template",
"value_template": "{% if position_source == 'current_position_attr' %}\n {{ state_attr(blind, 'current_position') }}\n{% elif position_source == 'position_attr' %}\n {{ state_attr(blind, 'position') }}\n{% elif position_source == 'custom_sensor' and custom_position_sensor != [] %}\n {{ states(custom_position_sensor) }}\n{% else %}\n none\n{% endif %}",
"id": "t_manual_position",
"for": {
"minutes": 2
}
},
{
"trigger": "state",
"entity_id": "cover.woonkamer_gordijnen",
"attribute": "current_tilt_position",
"id": "t_manual_tilt",
"for": {
"minutes": 1
},
"enabled": "{{ is_cover_tilt_enabled }}"
},
{
"trigger": "template",
"value_template": "{{ now() >= today_at(reset_override_time) }}",
"enabled": "{{ is_reset_fixed_time }}",
"id": "t_reset_fixedtime",
"for": {
"minutes": 2
}
},
{
"trigger": "template",
"value_template": "{% set helper_state = states(cover_status_helper) %} {{\n helper_state not in invalid_states and\n helper_state | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n helper_state | from_json | regex_search('manual') and\n (helper_state | from_json).manual.t is defined and\n (helper_state | from_json).manual.a is defined and\n (helper_state | from_json).manual.a | bool is true and\n now() >= ((helper_state | from_json).manual.t + 60 * reset_override_timeout) | as_datetime | as_local\n}}",
"enabled": "{{ is_reset_timeout and cover_status_helper != [] }}",
"id": "t_reset_timeout",
"for": {
"seconds": 2
}
}
],
"conditions": [
{
"condition": []
},
{
"or": [
"{{ trigger.to_state is not defined }}",
"{{ trigger.to_state is defined and trigger.to_state.state not in invalid_states }}"
]
},
{
"or": [
"{{ trigger.id is not defined }}",
"{{ not trigger.id | regex_match('^t_calendar_event') }}",
{
"and": [
"{{ trigger.id | regex_match('^t_calendar_event') }}",
"{{ state_attr(calendar_entity, 'message') is not none }}",
"{{\n calendar_open_title_lc in (state_attr(calendar_entity, 'message') | lower) or\n calendar_close_title_lc in (state_attr(calendar_entity, 'message') | lower)\n}}"
]
}
]
},
{
"condition": "template",
"value_template": "{% if is_status_helper_enabled %}\n {% if trigger.id is match('^t_shading_start_pending_[1-5]$') %}\n {{ states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*0') }}\n {% elif trigger.id is match('^t_shading_end_pending_[1-5]$') %}\n {{ states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') }}\n {% else %}\n true\n {% endif %}\n{% else %}\n true\n{% endif %}"
}
],
"actions": [
{
"variables": {
"cover_move_action": {
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"service": "cover.close_cover",
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
}
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"service": "cover.open_cover",
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
}
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"service": "cover.set_cover_position",
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
}
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
"tilt_move_action": {
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"service": "cover.set_cover_tilt_position",
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
}
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"service": "cover.set_cover_tilt_position",
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
}
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
"helper_update": {
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"service": "input_text.set_value",
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
}
}
]
}
}
},
{
"if": [
"{{ is_shading_enabled }}",
"{{ forecast_source.use_weather and not forecast_source.prevent_service }}",
"{{ states(shading_forecast_sensor) not in invalid_states }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_shading_start|t_open_1|t_open_3)') }}"
],
"then": [
{
"action": "weather.get_forecasts",
"target": {
"entity_id": []
},
"data": {
"type": "daily"
},
"response_variable": "weather_forecast",
"continue_on_error": true
}
]
},
{
"if": [
"{{ is_calendar_enabled }}",
"{{ calendar_entity != [] }}",
"{{ states(calendar_entity) not in invalid_states }}",
"{{ trigger.id is defined }}",
{
"or": [
"{{ trigger.id | regex_match('^t_open') }}",
"{{ trigger.id | regex_match('^t_close') }}",
"{{ trigger.id | regex_match('^t_shading_start') }}",
"{{ trigger.id | regex_match('^t_calendar_event') }}",
"{{ trigger.id.startswith('t_force_disabled') }}"
]
}
],
"then": [
{
"action": "calendar.get_events",
"target": {
"entity_id": []
},
"data": {
"start_date_time": "{{ today_at('00:00:00').isoformat() }}",
"end_date_time": "{{ (today_at('23:59:59') + timedelta(seconds=1)).isoformat() }}"
},
"response_variable": "calendar_events",
"continue_on_error": true
}
]
},
{
"variables": {
"forecast_temp_raw": "{% set sensor = shading_forecast_temp_sensor %} {% set weather = shading_forecast_sensor %} {% if sensor != [] and states(sensor) not in invalid_states %}\n {{ states(sensor) | float(default=None) }}\n{% elif weather == [] or states(weather) in invalid_states %}\n {{ None }}\n{% elif 'weather_attributes' in shading_forecast_type %}\n {{ state_attr(weather, 'temperature') | float(default=None) }}\n{% elif weather_forecast is defined and weather in weather_forecast %}\n {{ weather_forecast[weather].forecast[0].temperature | default(None) | float(default=None) }}\n{% else %}\n {{ None }}\n{% endif %}",
"forecast_weather_condition_raw": "{% set weather = shading_forecast_sensor %} {% if weather == [] or states(weather) in invalid_states %}\n {{ None }}\n{% elif 'weather_attributes' in shading_forecast_type %}\n {{ state_attr(weather, 'condition') }}\n{% elif weather_forecast is defined and weather in weather_forecast %}\n {{ weather_forecast[weather].forecast[0].condition | default(None) }}\n{% else %}\n {{ None }}\n{% endif %}",
"shading_start_condition_states": {
"azimuth_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.azimuth or\n default_sun_sensor == [] or\n (\n current_sun_azimuth | float(default=0) > shading_azimuth_start and\n current_sun_azimuth | float(default=0) < shading_azimuth_end\n )\n}}",
"elevation_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.elevation or\n default_sun_sensor == [] or\n (\n current_sun_elevation | float(default=0) > shading_elevation_min and\n current_sun_elevation | float(default=0) < shading_elevation_max\n )\n}}",
"brightness_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.brightness or\n shading_brightness_sensor == [] or\n (\n states(shading_brightness_sensor) not in invalid_states and\n states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > (shading_sun_brightness_start + shading_sun_brightness_hysteresis)\n )\n}}",
"temp1_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.temp1 or\n shading_temperatur_sensor1 == [] or\n (\n states(shading_temperatur_sensor1) not in invalid_states and\n states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > (shading_min_temperatur1 + shading_temperature_hysteresis1)\n )\n}}",
"temp2_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.temp2 or\n shading_temperatur_sensor2 == [] or\n (\n states(shading_temperatur_sensor2) not in invalid_states and\n states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > (shading_min_temperatur2 + shading_temperature_hysteresis2)\n )\n}}",
"forecast_temp_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.forecast_temp or\n shading_forecast_temp == [] or\n (\n forecast_temp_raw is not none and\n forecast_temp_raw > (shading_forecast_temp + shading_forecast_temp_hysteresis)\n ) or\n (\n 'shading_compare_forecast_with_sensor2' in shading_config and\n shading_temperatur_sensor2 != [] and\n shading_forecast_temp != [] and\n (states(shading_temperatur_sensor2) | float(default=0) > (shading_forecast_temp + shading_forecast_temp_hysteresis))\n )\n}}",
"forecast_weather_valid": "{{\n not is_shading_enabled or\n not shading_start_condition_enabled.forecast_weather or\n shading_weather_conditions == [] or\n forecast_source.use_sensor or\n (\n forecast_weather_condition_raw is not none and\n forecast_weather_condition_raw not in invalid_states and\n forecast_weather_condition_raw in shading_weather_conditions\n )\n}}"
},
"shading_start_and_result": "{{\n (\n ('cond_azimuth' not in shading_conditions_start_and or\n default_sun_sensor == [] or\n shading_start_condition_states.azimuth_valid)\n and\n ('cond_elevation' not in shading_conditions_start_and or\n default_sun_sensor == [] or\n shading_start_condition_states.elevation_valid)\n and\n ('cond_brightness' not in shading_conditions_start_and or\n shading_brightness_sensor == [] or\n shading_start_condition_states.brightness_valid)\n and\n ('cond_temp1' not in shading_conditions_start_and or\n shading_temperatur_sensor1 == [] or\n shading_start_condition_states.temp1_valid)\n and\n ('cond_temp2' not in shading_conditions_start_and or\n shading_temperatur_sensor2 == [] or\n shading_start_condition_states.temp2_valid)\n and\n ('cond_forecast_temp' not in shading_conditions_start_and or\n shading_forecast_temp == [] or\n shading_start_condition_states.forecast_temp_valid)\n and\n ('cond_forecast_weather' not in shading_conditions_start_and or\n shading_weather_conditions == [] or\n shading_start_condition_states.forecast_weather_valid)\n )\n}}",
"shading_start_or_result": "{{\n (shading_conditions_start_or | count == 0) or\n (\n ('cond_azimuth' in shading_conditions_start_or and\n default_sun_sensor != [] and\n shading_start_condition_states.azimuth_valid)\n or\n ('cond_elevation' in shading_conditions_start_or and\n default_sun_sensor != [] and\n shading_start_condition_states.elevation_valid)\n or\n ('cond_brightness' in shading_conditions_start_or and\n shading_brightness_sensor != [] and\n shading_start_condition_states.brightness_valid)\n or\n ('cond_temp1' in shading_conditions_start_or and\n shading_temperatur_sensor1 != [] and\n shading_start_condition_states.temp1_valid)\n or\n ('cond_temp2' in shading_conditions_start_or and\n shading_temperatur_sensor2 != [] and\n shading_start_condition_states.temp2_valid)\n or\n ('cond_forecast_temp' in shading_conditions_start_or and\n shading_forecast_temp != [] and\n shading_start_condition_states.forecast_temp_valid)\n or\n ('cond_forecast_weather' in shading_conditions_start_or and\n shading_weather_conditions != [] and\n shading_start_condition_states.forecast_weather_valid)\n )\n}}",
"shading_start_conditions_met": "{{\n is_shading_enabled and\n shading_start_and_result and\n shading_start_or_result\n}}",
"shading_end_condition_states": {
"azimuth_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.azimuth and\n default_sun_sensor != [] and\n (\n current_sun_azimuth | float(default=999) <= shading_azimuth_start or\n current_sun_azimuth | float(default=0) >= shading_azimuth_end\n )\n}}",
"elevation_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.elevation and\n default_sun_sensor != [] and\n (\n current_sun_elevation | float(default=999) <= shading_elevation_min or\n current_sun_elevation | float(default=0) >= shading_elevation_max\n )\n}}",
"brightness_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.brightness and\n shading_brightness_sensor != [] and\n states(shading_brightness_sensor) not in invalid_states and\n states(shading_brightness_sensor) | float(default=999999) < (shading_sun_brightness_end - shading_sun_brightness_hysteresis)\n}}",
"temp1_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.temp1 and\n shading_temperatur_sensor1 != [] and\n states(shading_temperatur_sensor1) not in invalid_states and\n states(shading_temperatur_sensor1) | float(default=999) < (shading_min_temperatur1 - shading_temperature_hysteresis1)\n}}",
"temp2_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.temp2 and\n shading_temperatur_sensor2 != [] and\n states(shading_temperatur_sensor2) not in invalid_states and\n states(shading_temperatur_sensor2) | float(default=999) < (shading_min_temperatur2 - shading_temperature_hysteresis2)\n}}",
"forecast_temp_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.forecast_temp and\n shading_forecast_temp != [] and\n forecast_temp_raw is not none and\n forecast_temp_raw < (shading_forecast_temp - shading_forecast_temp_hysteresis)\n}}",
"forecast_weather_invalid": "{{\n is_shading_enabled and\n shading_end_condition_enabled.forecast_weather and\n shading_weather_conditions != [] and\n (\n forecast_weather_condition_raw is none or\n forecast_weather_condition_raw in invalid_states or\n forecast_weather_condition_raw not in shading_weather_conditions\n )\n}}"
},
"shading_end_and_result": "{{\n shading_conditions_end_and | count > 0 and\n (\n ('cond_azimuth' not in shading_conditions_end_and or shading_end_condition_states.azimuth_invalid)\n and\n ('cond_elevation' not in shading_conditions_end_and or shading_end_condition_states.elevation_invalid)\n and\n ('cond_brightness' not in shading_conditions_end_and or shading_end_condition_states.brightness_invalid)\n and\n ('cond_temp1' not in shading_conditions_end_and or shading_end_condition_states.temp1_invalid)\n and\n ('cond_temp2' not in shading_conditions_end_and or shading_end_condition_states.temp2_invalid)\n and\n ('cond_forecast_temp' not in shading_conditions_end_and or shading_end_condition_states.forecast_temp_invalid)\n and\n ('cond_forecast_weather' not in shading_conditions_end_and or shading_end_condition_states.forecast_weather_invalid)\n )\n}}",
"shading_end_or_result": "{{\n shading_conditions_end_or | count > 0 and\n (\n shading_end_condition_states.azimuth_invalid or\n shading_end_condition_states.elevation_invalid or\n shading_end_condition_states.brightness_invalid or\n shading_end_condition_states.temp1_invalid or\n shading_end_condition_states.temp2_invalid or\n shading_end_condition_states.forecast_temp_invalid or\n shading_end_condition_states.forecast_weather_invalid\n )\n}}",
"shading_end_conditions_met": "{{\n is_shading_enabled and\n (\n shading_end_and_result or\n shading_end_or_result\n )\n}}",
"calendar_open_event": "{% set result = namespace(found=false, start=none, end=none) %} {% if is_calendar_enabled and calendar_events is defined and calendar_entity in calendar_events %}\n {% set events = calendar_events[calendar_entity].events | default([]) %}\n {% for event in events %}\n {% set summary = (event.summary | default('')) | lower | trim %}\n {% if calendar_open_title_lc != '' and calendar_open_title_lc in summary %}\n {% set result.found = true %}\n {% set result.start = event.start %}\n {% set result.end = event.end %}\n {% endif %}\n {% endfor %}\n{% endif %} {{ {\n 'found': result.found,\n 'start': result.start,\n 'end': result.end\n} }}",
"calendar_close_event": "{% set result = namespace(found=false, start=none, end=none) %} {% if is_calendar_enabled and calendar_events is defined and calendar_entity in calendar_events %}\n {% set events = calendar_events[calendar_entity].events | default([]) %}\n {% for event in events %}\n {% set summary = (event.summary | default('')) | lower | trim %}\n {% if calendar_close_title_lc != '' and calendar_close_title_lc in summary %}\n {% set result.found = true %}\n {% set result.start = event.start %}\n {% set result.end = event.end %}\n {% endif %}\n {% endfor %}\n{% endif %} {{ {\n 'found': result.found,\n 'start': result.start,\n 'end': result.end\n} }}",
"now_ts": "{{ as_timestamp(now()) }}",
"calendar_open_start": "{% if calendar_open_event.found and calendar_open_event.start is not none %}\n {{ as_timestamp(calendar_open_event.start) }}\n{% else %}\n {{ none }}\n{% endif %}",
"calendar_open_end": "{% if calendar_open_event.found and calendar_open_event.end is not none %}\n {{ as_timestamp(calendar_open_event.end) }}\n{% else %}\n {{ none }}\n{% endif %}",
"calendar_close_start": "{% if calendar_close_event.found and calendar_close_event.start is not none %}\n {{ as_timestamp(calendar_close_event.start) }}\n{% else %}\n {{ none }}\n{% endif %}",
"calendar_close_end": "{% if calendar_close_event.found and calendar_close_event.end is not none %}\n {{ as_timestamp(calendar_close_event.end) }}\n{% else %}\n {{ none }}\n{% endif %}",
"is_opening_phase": "{{\n (\n is_time_field_enabled and\n now() >= today_at(time_up_early_today) and\n now() < today_at(time_up_late_today)\n ) or\n (\n is_calendar_enabled and\n calendar_open_start is not none and\n calendar_open_end is not none and\n now_ts >= calendar_open_start and\n now_ts < calendar_open_end\n )\n}}",
"is_daytime_phase": "{{\n is_time_control_disabled or\n (\n is_time_field_enabled and\n now() >= today_at(time_up_early_today) and\n now() < today_at(time_down_early_today)) or\n (\n is_calendar_enabled and\n calendar_open_start is not none and\n calendar_close_start is not none and\n now_ts >= calendar_open_start and\n now_ts < calendar_close_start)\n}}",
"is_closing_phase": "{{\n (\n is_time_field_enabled and\n now() >= today_at(time_down_early_today) and\n now() < today_at(time_down_late_today)\n ) or\n (\n is_calendar_enabled and\n calendar_close_start is not none and\n calendar_close_end is not none and\n now_ts >= calendar_close_start and\n now_ts < calendar_close_end\n )\n}}",
"is_evening_phase": "{{\n not is_time_control_disabled and\n (\n (\n is_time_field_enabled and\n now() >= today_at(time_down_early_today)\n ) or\n (\n is_calendar_enabled and\n calendar_close_start is not none and\n now_ts >= calendar_close_start\n )\n )\n}}",
"is_time_up_late": "{{\n (\n is_time_field_enabled and\n now() >= today_at(time_up_late_today) and\n now() < today_at(time_down_early_today)\n ) or\n (\n is_calendar_enabled and\n calendar_open_end is not none and\n calendar_close_start is not none and\n now_ts >= calendar_open_end and\n now_ts < calendar_close_start\n )\n}}",
"is_time_down_late": "{{\n (\n is_time_field_enabled and\n now() >= today_at(time_down_late_today)\n ) or\n (\n is_calendar_enabled and\n calendar_close_end is not none and\n now_ts >= calendar_close_end\n )\n}}",
"is_shading_allowed_window": "{{\n is_time_control_disabled or\n (\n is_time_field_enabled and\n now() >= today_at(time_up_early_today) and\n now() <= today_at(time_down_late_today) + timedelta(seconds = 5)\n ) or\n (\n is_calendar_enabled and\n calendar_open_start is not none and\n calendar_close_end is not none and\n now_ts >= calendar_open_start and\n now_ts <= calendar_close_end\n )\n}}",
"environment_allows_opening": "{{\n (\n not is_brightness_enabled or\n default_brightness_sensor == [] or\n states(default_brightness_sensor) | float(default=brightness_up) > (brightness_up + brightness_hysteresis)\n ) and\n (\n not is_sun_elevation_enabled or\n default_sun_sensor == [] or\n current_sun_elevation | float(default=sun_elevation_up_current) > sun_elevation_up_current\n )\n}}",
"environment_allows_closing": "{{\n (\n is_brightness_enabled and\n (\n default_brightness_sensor == [] or\n states(default_brightness_sensor) | float(default=brightness_down) < (brightness_down - brightness_hysteresis)\n )\n ) or\n (\n is_sun_elevation_enabled and\n (\n default_sun_sensor == [] or\n current_sun_elevation | float(default=sun_elevation_down_current) < sun_elevation_down_current\n )\n )\n}}",
"should_be_open_now": "{{\n is_daytime_phase and\n not is_evening_phase and\n (\n (not is_brightness_enabled and not is_sun_elevation_enabled) or\n environment_allows_opening\n )\n}}",
"should_be_closed_now": "{{\n is_evening_phase and\n (\n (not is_brightness_enabled and not is_sun_elevation_enabled) or\n environment_allows_closing\n )\n}}"
}
},
{
"if": [
"{{ 'cover_helper_enabled' in cover_status_options }}",
"{{ cover_status_helper != [] }}",
{
"or": [
"{{ states(cover_status_helper) in invalid_states }}",
"{{ not states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") }}"
]
}
],
"then": [
{
"action": "input_text.set_value",
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{{ helper_json | to_json }}"
}
}
]
},
{
"if": [
"{{ is_status_helper_enabled }}",
"{{ helper_json.v != 5 }}"
],
"then": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}"
}
},
{
"variables": {
"update_values": {
"open": {
"a": "{{ helper_status.open | int | default(0) }}",
"t": "{{ helper_ts.open | default(ts_now) }}"
},
"close": {
"a": "{{ helper_status.closed | int | default(0) }}",
"t": "{{ helper_ts.closed | default(ts_now) }}"
},
"shading": {
"a": "{{ helper_status.shaded | int | default(0) }}",
"t": "{{ helper_ts.shaded | default(ts_now) }}",
"p": 0,
"q": 0
},
"vpart": {
"a": "{{ helper_status.vpart | int | default(0) }}",
"t": "{{ helper_ts.vpart | default(ts_now) }}"
},
"vfull": {
"a": "{{ helper_status.vfull | int | default(0) }}",
"t": "{{ helper_ts.vfull | default(ts_now) }}"
},
"manual": {
"a": "{{ helper_status.manual | int | default(0) }}",
"t": "{{ helper_ts.manual | default(ts_now) }}"
},
"v": 5,
"t": "{{ helper_json.t | round(0) }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"choose": [
{
"alias": "Check for opening",
"conditions": [
"{{ is_up_enabled }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_open|t_force_disabled|t_calendar_event)') }}",
{
"condition": []
},
{
"or": [
"{{ not trigger.id.startswith('t_force_disabled') }}",
"{{ not is_auto_recover_enabled }}"
]
},
{
"or": [
"{{ is_auto_recover_enabled }}",
"{{ not is_cover_movement_blocked.open }}"
]
},
{
"or": [
"{{ is_status_helper_enabled and not helper_status.open }}",
"{{ not in_open_position }}"
]
},
"{{ not (is_status_helper_enabled and helper_status.manual and override_flags.opening) }}",
{
"or": [
"{{ not is_status_helper_enabled }}",
"{{ not prevent_flags.opening_multiple_times }}",
"{{ is_status_helper_enabled and prevent_flags.opening_multiple_times and ((now().day != helper_ts.open|timestamp_custom('%-d')|int) or helper_ts.manual <= helper_ts.open) }}"
]
},
{
"or": [
"{{ trigger.id != 't_open_6' }}",
{
"and": [
"{{ trigger.id == 't_open_6' }}",
"{{ resident_flags.opening_enabled }}",
"{{ should_be_open_now }}"
]
}
]
},
{
"or": [
"{{ resident_sensor == [] }}",
"{{ states(resident_sensor) in ['false', 'off'] }}",
{
"and": [
"{{ resident_flags.allow_opening }}",
"{{ states(resident_sensor) in ['true', 'on'] }}"
]
}
]
},
{
"or": [
"{{ is_time_control_disabled }}",
{
"and": [
"{{ is_time_up_late }}",
"{{ not trigger.id.startswith('t_force_disabled') }}"
]
},
{
"and": [
"{{ is_opening_phase or is_daytime_phase }}",
"{{ not is_evening_phase }}",
"{{ environment_allows_opening }}"
]
}
]
}
],
"sequence": [
{
"delay": {
"seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
}
},
{
"choose": [
{
"alias": "Shading detected. Move to shading position",
"conditions": [
"{{ is_status_helper_enabled }}",
"{{ helper_status.shaded }}",
"{{ not in_shading_position }}"
],
"sequence": [
{
"choose": [],
"default": []
},
{
"variables": {
"target_position": 25,
"target_tilt_position": "{{ shading_tilt_position | int }}",
"current_above_target_position": "{{ current_position < target_position if is_awning else current_position > target_position }}",
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 1,
"t": "{{ ts_now }}"
},
"close": {
"a": 0,
"t": "{{ helper_json.close.t }}"
},
"shading": {
"a": 1,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": "{{ not is_cover_movement_blocked.shading and (not is_cover_movement_blocked.opening_movement or current_above_target_position) }}",
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.close_cover"
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.open_cover"
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_position"
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"choose": [],
"default": []
}
]
},
{
"if": [
"{{ is_auto_recover_enabled or (not is_cover_movement_blocked.shading and (not is_cover_movement_blocked.opening_movement or current_above_target_position)) }}"
],
"then": [
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"stop": "Opening skipped: Shading detected"
}
]
},
{
"alias": "Normal opening of the cover",
"conditions": [
"{{ not in_shading_position }}",
{
"or": [
"{{ is_status_helper_enabled and not helper_status.open }}",
"{{ not in_open_position }}"
]
}
],
"sequence": [
{
"choose": [],
"default": []
},
{
"variables": {
"target_position": 100,
"target_tilt_position": "{{ open_tilt_position | int }}",
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 1,
"t": "{{ ts_now }}"
},
"close": {
"a": 0,
"t": "{{ helper_json.close.t }}"
},
"shading": {
"a": 0,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": "{{ not is_cover_movement_blocked.open }}",
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.close_cover"
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.open_cover"
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_position"
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"choose": [],
"default": []
}
]
},
{
"if": [
"{{ is_auto_recover_enabled or not is_cover_movement_blocked.open }}"
],
"then": [
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"stop": "Opening executed"
}
]
}
]
}
]
},
{
"alias": "Check for closing cover",
"conditions": [
"{{ is_down_enabled }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_close|t_force_disabled|t_calendar_event)') }}",
{
"condition": []
},
{
"or": [
"{{ not trigger.id.startswith('t_force_disabled') }}",
"{{ not is_auto_recover_enabled }}"
]
},
{
"or": [
"{{ is_auto_recover_enabled }}",
"{{ not is_cover_movement_blocked.close }}"
]
},
{
"or": [
"{{ is_status_helper_enabled and not helper_status.closed }}",
"{{ not in_close_position }}"
]
},
"{{ not (is_status_helper_enabled and helper_status.manual and override_flags.closing) }}",
{
"or": [
"{{ not is_status_helper_enabled }}",
"{{ not prevent_flags.closing_multiple_times }}",
"{{ is_status_helper_enabled and prevent_flags.closing_multiple_times and ((helper_ts.closed < today_at(time_down_early_today) | as_timestamp) or helper_ts.manual <= helper_ts.closed) }}"
]
},
{
"or": [
"{{ is_time_control_disabled }}",
{
"and": [
"{{ is_time_down_late }}",
"{{ not trigger.id.startswith('t_force_disabled') }}"
]
},
{
"and": [
"{{ trigger.id == 't_close_6' }}",
"{{ resident_sensor != [] }}",
"{{ states(resident_sensor) in ['true', 'on'] }}",
"{{ resident_flags.closing_enabled }}"
]
},
{
"and": [
"{{ is_closing_phase or is_evening_phase }}",
"{{ environment_allows_closing }}"
]
}
]
}
],
"sequence": [
{
"choose": [
{
"alias": "Lockout protection when closing",
"conditions": [
"{{ is_ventilation_enabled }}",
"{{ is_status_helper_enabled }}",
{
"or": [
{
"and": [
"{{ contact_window_opened != [] }}",
"{{ states(contact_window_opened) in ['true', 'on'] }}"
]
},
{
"and": [
"{{ lockout_tilted_when_closing }}",
"{{ contact_window_tilted != [] }}",
"{{ states(contact_window_tilted) in ['true', 'on'] }}"
]
}
]
}
],
"sequence": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 0,
"t": "{{ helper_json.open.t }}"
},
"close": {
"a": 1,
"t": "{{ ts_now }}"
},
"shading": {
"a": 0,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 1,
"t": "{{ ts_now }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Closing skipped: Lockout enabled"
}
]
},
{
"alias": "Window tilted. No lockout. Move to ventilation position instead of closing",
"conditions": [
"{{ is_ventilation_enabled }}",
"{{ is_status_helper_enabled }}",
"{{ contact_window_tilted != [] }}",
"{{ states(contact_window_tilted) in ['true', 'on'] }}",
"{{ not lockout_tilted_when_closing }}",
{
"or": [
"{{ contact_window_opened == [] }}",
"{{ states(contact_window_opened) in ['false', 'off'] }}"
]
}
],
"sequence": [
{
"choose": [],
"default": []
},
{
"delay": {
"seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
}
},
{
"variables": {
"target_position": 40,
"target_tilt_position": 50,
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 1,
"t": "{{ ts_now }}"
},
"close": {
"a": 0,
"t": "{{ helper_json.close.t }}"
},
"shading": {
"a": 0,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 1,
"t": "{{ ts_now }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": "{{ not is_cover_movement_blocked.ventilate }}",
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.close_cover"
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.open_cover"
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_position"
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"choose": [],
"default": []
}
]
},
{
"if": [
"{{ is_auto_recover_enabled or not is_cover_movement_blocked.ventilate }}"
],
"then": [
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"stop": "Closing skipped: Window tilted (Ventilation activated)"
}
]
},
{
"alias": "Only status change if cover is already 'near' the close position",
"conditions": [
{
"or": [
{
"and": [
"{{ is_status_helper_enabled }}",
"{{ prevent_flags.lowering_when_closing_if_shaded }}",
"{{ helper_status.shaded }}",
"{{ not position_comparisons.shading_above_close }}"
]
},
{
"and": [
"{{ prevent_flags.lowering_when_closing_if_shaded }}",
"{{ in_shading_position }}",
"{{ not position_comparisons.shading_above_close }}"
]
},
{
"and": [
"{{ prevent_flags.higher_position_closing }}",
"{{ position_comparisons.current_below_close or current_position == close_position }}"
]
}
]
}
],
"sequence": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 0,
"t": "{{ helper_json.open.t }}"
},
"close": {
"a": 1,
"t": "{{ ts_now }}"
},
"shading": {
"a": 0,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Closing skipped: Cover is already at or near targeted position (or lowering blocked by shading settings)"
}
]
}
],
"default": [
{
"choose": [],
"default": []
},
{
"alias": "Normal closing of the cover",
"delay": {
"seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
}
},
{
"variables": {
"target_position": 0,
"target_tilt_position": 50,
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 0,
"t": "{{ helper_json.open.t }}"
},
"close": {
"a": 1,
"t": "{{ ts_now }}"
},
"shading": {
"a": 0,
"t": "{{ helper_json.shading.t }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": "{{ not is_cover_movement_blocked.close }}",
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.close_cover"
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.open_cover"
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_position"
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"choose": [],
"default": []
}
]
},
{
"if": [
"{{ is_auto_recover_enabled or not is_cover_movement_blocked.close }}"
],
"then": [
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"stop": "Closing executed"
}
]
}
]
},
{
"alias": "Check for shading start",
"conditions": [
"{{ is_shading_enabled }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_shading_start|t_open_1|t_open_3|t_force_disabled)') }}",
"{{ is_status_helper_enabled }}",
{
"condition": []
},
{
"or": [
"{{ not trigger.id.startswith('t_force_disabled') }}",
"{{ not is_auto_recover_enabled }}"
]
},
{
"or": [
"{{ is_auto_recover_enabled }}",
"{{ not is_cover_movement_blocked.shading }}"
]
},
{
"or": [
"{{ not helper_status.shaded }}",
"{{ not (helper_status.vpart or helper_status.vfull) }}"
]
},
{
"or": [
"{{ not is_cover_tilt_enabled_and_possible and not in_shading_position }}",
"{{ is_cover_tilt_enabled_and_possible }}"
]
},
"{{ not (helper_status.manual and override_flags.shading) }}",
{
"or": [
"{{ not prevent_flags.shading_multiple_times }}",
"{{ prevent_flags.shading_multiple_times and ((now().day != helper_ts.shaded|timestamp_custom('%-d') | int) or helper_ts.manual <= helper_ts.shaded) }}",
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}"
]
}
],
"sequence": [
{
"if": [
{
"or": [
{
"and": [
"{{ 'shading_temp_comparison_independent' in shading_config }}",
"{{ shading_start_condition_states.forecast_temp_valid }}"
]
},
"{{ shading_start_conditions_met }}"
]
}
],
"then": [
{
"choose": [
{
"alias": "Shading detected. Save next execution time and pending status",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_pending)') }}",
"{{ not helper_status.shading_start_pending }}"
],
"sequence": [
{
"variables": {
"local_waitingtime_start": "{{ shading_waitingtime_start | int }}",
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"shading": {
"a": 1,
"t": "{{ ts_now }}",
"p": "{{ (ts_now + local_waitingtime_start) | round(0) }}",
"q": 0
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Start Pending: Waiting"
}
]
},
{
"alias": "Consider lockout protection when shading starts",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
"{{ helper_status.shading_start_pending }}",
"{{ is_ventilation_enabled }}",
{
"or": [
{
"and": [
"{{ contact_window_opened != [] }}",
"{{ states(contact_window_opened) in ['true', 'on'] }}"
]
},
{
"and": [
"{{ lockout_tilted_when_shading_starts }}",
"{{ contact_window_tilted != [] }}",
"{{ states(contact_window_tilted) in ['true', 'on'] }}"
]
}
]
}
],
"sequence": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 1,
"t": "{{ ts_now }}"
},
"close": {
"a": 0,
"t": "{{ helper_json.close.t }}"
},
"shading": {
"a": 1,
"t": "{{ ts_now }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 1,
"t": "{{ ts_now }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Start skipped: Lockout enabled"
}
]
},
{
"alias": "Start Shading",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
"{{ helper_status.shading_start_pending }}",
{
"or": [
"{{ is_cover_movement_blocked.any and is_auto_recover_enabled }}",
{
"and": [
"{{ not is_cover_tilt_enabled_and_possible }}",
"{{ position_comparisons.current_above_shading }}"
]
},
{
"and": [
"{{ is_cover_tilt_enabled_and_possible }}",
"{{ position_comparisons.current_above_shading or current_position == shading_position }}"
]
}
]
},
{
"or": [
"{{ is_shading_allowed_window }}"
]
},
{
"or": [
"{{ resident_sensor == [] }}",
"{{ states(resident_sensor) in ['false', 'off'] }}",
{
"and": [
"{{ resident_flags.allow_shading }}",
"{{ states(resident_sensor) in ['true', 'on'] }}"
]
}
]
}
],
"sequence": [
{
"delay": {
"seconds": "{{ range(drive_delay_fix | int(0), drive_delay_fix | int(0) + drive_delay_random | int(0) +1) | random }}"
}
},
{
"choose": [],
"default": []
},
{
"variables": {
"target_position": 25,
"target_tilt_position": "{{ shading_tilt_position | int }}",
"current_above_target_position": "{{ current_position < target_position if is_awning else current_position > target_position }}",
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"open": {
"a": 1,
"t": "{{ ts_now }}"
},
"close": {
"a": 0,
"t": "{{ helper_json.close.t }}"
},
"shading": {
"a": 1,
"t": "{{ ts_now }}",
"p": 0,
"q": 0
},
"vpart": {
"a": 0,
"t": "{{ helper_json.vpart.t }}"
},
"vfull": {
"a": 0,
"t": "{{ helper_json.vfull.t }}"
},
"manual": {
"a": 0,
"t": "{{ helper_json.manual.t }}"
},
"t": "{{ ts_now }}"
}
}
},
{
"if": "{{ not is_cover_movement_blocked.shading and (not is_cover_movement_blocked.opening_movement or current_above_target_position) }}",
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"choose": [
{
"conditions": "{{ target_position | default(101) | int == 0 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.close_cover"
}
]
},
{
"conditions": "{{ target_position | default(101) | int == 100 }}",
"sequence": [
{
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.open_cover"
}
]
},
{
"conditions": "{{ 0 < target_position | default(101) | int < 100 }}",
"sequence": [
{
"data": {
"position": "{{ target_position | default(101) | int }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_position"
}
]
}
]
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
}
]
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"choose": [],
"default": []
}
]
},
{
"if": [
"{{ is_auto_recover_enabled or (not is_cover_movement_blocked.shading and (not is_cover_movement_blocked.opening_movement or current_above_target_position)) }}"
],
"then": [
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
}
]
},
{
"stop": "Shading Start executed"
}
]
},
{
"alias": "Save shading state for the future",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
"{{ helper_status.shading_start_pending }}",
"{{ helper_status.closed }}",
"{{ not is_cover_movement_blocked.any }}"
],
"sequence": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"shading": {
"a": 0,
"t": "{{ ts_now }}",
"p": 0,
"q": 0
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ not is_cover_movement_blocked.any }}"
],
"then": [
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
}
]
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Start skipped: State saved"
}
]
}
]
}
],
"else": [
{
"choose": [
{
"alias": "Shading start conditions not met - check if we should continue",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
"{{ helper_status.shading_start_pending }}",
"{{ shading_start_max_duration > 0 }}",
{
"or": [
"{{ is_shading_allowed_window }}"
]
},
"{{ (as_timestamp(now()) - helper_json.shading.t) <= shading_start_max_duration }}"
],
"sequence": [
{
"variables": {
"local_waitingtime_start": "{{ shading_waitingtime_start | int }}",
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"shading": {
"a": 1,
"t": "{{ helper_json.shading.t }}",
"p": "{{ (ts_now + local_waitingtime_start) | round(0) }}",
"q": 0
},
"t": "{{ ts_now }}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Start Pending: Continue waiting"
}
]
},
{
"alias": "Shading start / Stop retry",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
"{{ helper_status.shading_start_pending }}"
],
"sequence": [
{
"variables": {
"ts_now": "{{ as_timestamp(now()) | round(0) }}",
"update_values": {
"shading": {
"a": 0,
"t": "{{ ts_now }}",
"p": 0,
"q": 0
},
"t": "{{ ts_now}}"
}
}
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Start aborted: Timeout or invalid"
}
]
}
]
}
]
}
]
},
{
"alias": "Check for shading tilt",
"conditions": [
"{{ is_shading_enabled }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_shading_tilt)') }}",
"{{ is_status_helper_enabled }}",
{
"and": [
"{{ helper_status.shaded }}",
"{{ not helper_status.shading_start_pending }}"
]
},
"{{ is_cover_tilt_enabled_and_possible }}",
{
"condition": []
},
"{{ not is_cover_movement_blocked.shading }}",
"{{ not (helper_status.vpart or helper_status.vfull) }}",
"{{ not (helper_status.manual and override_flags.shading) }}"
],
"sequence": [
{
"variables": {
"target_tilt_position": "{{ shading_tilt_position | int }}",
"tilt_first": "{{ is_cover_tilt_reposition_enabled | bool }}",
"update_values": {
"t": "{{ as_timestamp(now()) | round(0) }}"
}
}
},
{
"sequence": [
{
"condition": "template",
"value_template": "{{ not prevent_flags.default_cover_actions and is_cover_tilt_enabled_and_possible }}"
},
{
"repeat": {
"for_each": "{{ blind_entities | list }}",
"sequence": [
{
"if": "{{ state_attr(repeat.item if repeat is defined else '', 'current_tilt_position') is defined }}",
"then": [
{
"if": "{{ tilt_first | default(false) }}",
"then": [
{
"data": {
"tilt_position": 0
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": 0
}
}
]
},
{
"choose": [
{
"conditions": "{{ is_tilt_wait_idle_mode | default(false) }}",
"sequence": [
{
"wait_template": "{{ states(repeat.item if repeat is defined else '') in ['open', 'closed'] }}",
"timeout": "{{ tilt_wait_timeout | int }}",
"continue_on_timeout": true
},
{
"if": "{{ wait.completed if wait is defined else '' }}",
"then": [
{
"delay": 1
}
]
}
]
}
],
"default": [
{
"delay": {
"seconds": 0
}
}
]
},
{
"data": {
"tilt_position": "{{ target_tilt_position | default(101) }}"
},
"target": {
"entity_id": "{{ repeat.item if repeat is defined else '' }}"
},
"action": "cover.set_cover_tilt_position"
},
{
"delay": {
"seconds": "{{ range(1, 3) | random }}"
}
}
]
}
]
}
}
]
},
{
"if": [
"{{ is_status_helper_enabled }}"
],
"then": [
{
"data": {
"entity_id": "input_text.woonkamer_gordijnen_helper",
"value": "{% set dict_var = helper_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
},
"action": "input_text.set_value"
}
]
},
{
"stop": "Shading Tilt executed"
}
]
},
{
"alias": "Check for shading end",
"conditions": [
"{{ is_shading_enabled }}",
"{{ trigger.id is defined }}",
"{{ trigger.id | regex_match('^(t_shading_end|t_open_7)') }}",
"{{ is_status_helper_enabled }}",
{
"condition": []
},
{
"or": [
"{{ is_auto_recover_enabled }}",
"{{ not is_cover_movement_blocked.any }}"
]
},
{
"or": [
"{{ is_shading_allowed_window }}"
]
},
"{{ not (helper_status.manual and override_flags.shading) }}",
"{{ not helper_status.closed }}",
{
"or": [
"{{ helper_status.shaded }}",
"{{ in_shading_position }}"
]
},
{
"or": [
"{{ not prevent_flags.shading_end_if_closed }}",
"{{ prevent_flags.shading_end_if_closed and not in_close_position}}"
]
},
{
"or": [
"{{ resident_sensor == [] }}",
"{{ states(resident_sensor) in ['false', 'off'] }}"
]
}
],
"sequence": [
{
"if": [
"{{ shading_end_conditions_met }}"
],
"then": [
{
"choose": [
{
"alias": "Shading end detected. Save next execution time and pending status",
"conditions": [
"{{ trigger.id | regex_match('^(t_shading_end_pending)') }}",
"{{ not helper_status.shading_end_pending }}"
],
"sequence": [
{
"variables": {
"local_waitingtime_end": "{% set local_waitingtime_end = shading_waitingtime_end | int %} {% if (is_shading_end_immediate_by_sun_position | default(false)) | bool and trigger.id == 't_shading_end_pending_5' %} {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment