Guest User

Untitled

a guest
Jul 1st, 2025
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 195.55 KB | None | 0 0
  1. {
  2.   "trace": {
  3.     "last_step": "action/4/choose/4/sequence/0/choose/4/sequence/5",
  4.     "run_id": "e9ee957b174950353f77ac8ccbd053db",
  5.     "state": "stopped",
  6.     "script_execution": "finished",
  7.     "timestamp": {
  8.       "start": "2025-07-01T14:48:01.065359+00:00",
  9.       "finish": "2025-07-01T14:49:33.509010+00:00"
  10.     },
  11.     "domain": "automation",
  12.     "item_id": "1750688188481",
  13.     "trigger": "time change or manual update via template",
  14.     "trace": {
  15.       "trigger/35": [
  16.         {
  17.           "path": "trigger/35",
  18.           "timestamp": "2025-07-01T14:48:01.090272+00:00",
  19.           "changed_variables": {
  20.             "this": {
  21.               "entity_id": "automation.rollladen_ankleide",
  22.               "state": "on",
  23.               "attributes": {
  24.                 "id": "1750688188481",
  25.                 "last_triggered": "2025-07-01T14:40:54.535329+00:00",
  26.                 "mode": "single",
  27.                 "current": 0,
  28.                 "friendly_name": "Rollladen Ankleide"
  29.               },
  30.               "last_changed": "2025-06-30T21:24:14.841965+00:00",
  31.               "last_reported": "2025-07-01T14:40:54.694505+00:00",
  32.               "last_updated": "2025-07-01T14:40:54.694505+00:00",
  33.               "context": {
  34.                 "id": "01JZ36Y1QMVEAGABND1A2KV566",
  35.                 "parent_id": "01JZ36Y16SF4NQRTBENQK6CKZ1",
  36.                 "user_id": null
  37.               }
  38.             },
  39.             "trigger": {
  40.               "platform": "template",
  41.               "entity_id": null,
  42.               "from_state": null,
  43.               "to_state": null,
  44.               "id": "t_shading_end_execution",
  45.               "idx": "35",
  46.               "alias": null,
  47.               "for": null,
  48.               "description": "time change or manual update via template"
  49.             },
  50.             "blind": "cover.dg_rl_ank",
  51.             "open_position": 100,
  52.             "close_position": 0,
  53.             "ventilate_position": 99,
  54.             "shading_position": 1,
  55.             "position_tolerance": 0,
  56.             "open_tilt_position": 50,
  57.             "close_tilt_position": 50,
  58.             "ventilate_tilt_position": 50,
  59.             "shading_tilt_elevation_1": 20,
  60.             "shading_tilt_elevation_2": 30,
  61.             "shading_tilt_elevation_3": 48,
  62.             "shading_tilt_position_0": 0,
  63.             "shading_tilt_position_1": 20,
  64.             "shading_tilt_position_2": 37,
  65.             "shading_tilt_position_3": 50,
  66.             "auto_options": [
  67.               "auto_up_enabled",
  68.               "auto_down_enabled",
  69.               "auto_sun_enabled",
  70.               "auto_shading_enabled",
  71.               "auto_ventilate_enabled"
  72.             ],
  73.             "time_up_early": "07:00:00",
  74.             "time_up_early_non_workday": "08:00:00",
  75.             "time_up_late": "08:00:00",
  76.             "time_up_late_non_workday": "09:00:00",
  77.             "time_down_early": "20:00:00",
  78.             "time_down_early_non_workday": "20:00:00",
  79.             "time_down_late": "22:00:00",
  80.             "time_down_late_non_workday": "22:00:00",
  81.             "workday_sensor_today": "binary_sensor.workday_sensor",
  82.             "workday_sensor_tomorrow": "binary_sensor.workday_sensor_tomorrow",
  83.             "default_brightness_sensor": [],
  84.             "brightness_up": 0,
  85.             "brightness_down": 0,
  86.             "default_sun_sensor": "sun.sun",
  87.             "sun_elevation_up": 5,
  88.             "sun_elevation_down": -6,
  89.             "resident_sensor": [],
  90.             "contact_window_tilted": [],
  91.             "contact_window_opened": "binary_sensor.tfk_ank",
  92.             "lockout_tilted_options": [
  93.               "lockout_tilted_closing",
  94.               "lockout_tilted_shading_start"
  95.             ],
  96.             "lockout_tilted_when_closing": true,
  97.             "lockout_tilted_when_shading_starts": true,
  98.             "lockout_tilted_when_shading_ends": false,
  99.             "time_control": "time_control_input",
  100.             "time_schedule_helper": [],
  101.             "shading_brightness_sensor": "sensor.helligkeit_aussen",
  102.             "shading_temperatur_sensor1": "sensor.dg_wt_sz_temperatur",
  103.             "shading_temperatur_sensor2": "sensor.raspberrymatic_sv_wm_temperatur",
  104.             "shading_min_temperatur1": 20,
  105.             "shading_min_temperatur2": 22,
  106.             "shading_temperature_hysteresis1": 0.2,
  107.             "shading_temperature_hysteresis2": 0.2,
  108.             "shading_azimuth_start": 150,
  109.             "shading_azimuth_end": 330,
  110.             "shading_elevation_min": 25,
  111.             "shading_elevation_max": 90,
  112.             "shading_sun_brightness_start": 35000,
  113.             "shading_sun_brightness_end": 10000,
  114.             "shading_forecast_sensor": [],
  115.             "shading_forecast_type": "weather_attributes",
  116.             "shading_forecast_temp": [],
  117.             "shading_weather_conditions": [
  118.               "sunny",
  119.               "partlycloudy",
  120.               "cloudy",
  121.               "clear"
  122.             ],
  123.             "is_shading_enabled": true,
  124.             "cover_tilt_config": "cover_tilt_disabled",
  125.             "is_cover_tilt_enabled": false,
  126.             "is_up_enabled": true,
  127.             "is_down_enabled": true,
  128.             "is_brightness_enabled": false,
  129.             "is_sun_elevation_enabled": true,
  130.             "is_ventilation_enabled": true,
  131.             "is_time_field_enabled": true,
  132.             "is_schedule_helper_enabled": false,
  133.             "is_time_control_disabled": false,
  134.             "reset_override_config": "reset_disabled",
  135.             "reset_override_time": "00:01:00",
  136.             "reset_override_timeout": 5,
  137.             "is_reset_disabled": true,
  138.             "is_reset_fixed_time": false,
  139.             "is_reset_timeout": false,
  140.             "cover_status_options": "cover_helper_enabled",
  141.             "cover_status_helper": "input_text.cover_status_helper_ankleide",
  142.             "version": "2025.06.19",
  143.             "blind_entities": [
  144.               "cover.dg_rl_ank"
  145.             ],
  146.             "current_position": 1,
  147.             "current_tilt_position": 101,
  148.             "current_sun_azimuth": 249.83,
  149.             "current_sun_elevation": 44.25,
  150.             "is_today_off": false,
  151.             "is_tomorrow_off": false,
  152.             "is_tomorrow_on": true,
  153.             "drive_delay_fix": 90,
  154.             "drive_delay_random": 0,
  155.             "drive_time": 90,
  156.             "time_up_early_today": "07:00:00",
  157.             "time_up_late_today": "08:00:00",
  158.             "time_down_early_today": "20:00:00",
  159.             "time_down_late_today": "22:00:00",
  160.             "auto_up_force": [],
  161.             "auto_down_force": [],
  162.             "auto_ventilate_force": [],
  163.             "auto_shading_start_force": [],
  164.             "auto_up_force_disabled": true,
  165.             "auto_down_force_disabled": true,
  166.             "auto_ventilate_force_disabled": true,
  167.             "auto_shading_start_force_disabled": true,
  168.             "is_cover_tilt_enabled_and_possible": false,
  169.             "cover_tilt_reposition_config": "cover_tilt_reposition_disabled",
  170.             "is_cover_tilt_reposition_enabled": false,
  171.             "shading_tilt_position": 37,
  172.             "shading_waitingtime_start": 300,
  173.             "shading_waitingtime_end": 600,
  174.             "is_shading_end_immediate_by_sun_position": false,
  175.             "shading_start_behavior": "trigger_periodic",
  176.             "shading_end_behavior": "open_position",
  177.             "start_shading_trigger_reset": false,
  178.             "start_shading_trigger_periodic": true,
  179.             "is_status_helper_enabled": true,
  180.             "helper_state_json": {
  181.               "open": {
  182.                 "a": 1,
  183.                 "t": 1751366731
  184.               },
  185.               "close": {
  186.                 "a": 0,
  187.                 "t": 1751313693
  188.               },
  189.               "shading": {
  190.                 "a": 1,
  191.                 "t": 1751380669,
  192.                 "p": 0,
  193.                 "q": 1751381269
  194.               },
  195.               "vpart": {
  196.                 "a": 0,
  197.                 "t": 0
  198.               },
  199.               "vfull": {
  200.                 "a": 0,
  201.                 "t": 0
  202.               },
  203.               "manual": {
  204.                 "a": 0,
  205.                 "t": 1751192507
  206.               },
  207.               "v": 5,
  208.               "t": 1751380669
  209.             },
  210.             "is_helper_open": true,
  211.             "is_helper_closed": false,
  212.             "is_helper_shaded": true,
  213.             "is_helper_shading_start": false,
  214.             "is_helper_shading_end": true,
  215.             "is_helper_vent_partial": false,
  216.             "is_helper_vent_full": false,
  217.             "is_helper_manual": false,
  218.             "ts_helper_open": 1751366731,
  219.             "ts_helper_closed": 1751313693,
  220.             "ts_helper_shaded": 1751380669,
  221.             "ts_helper_vent_partial": 0,
  222.             "ts_helper_vent_full": 0,
  223.             "ts_helper_manual": 1751192507,
  224.             "in_open_position": false,
  225.             "in_close_position": false,
  226.             "in_shading_position": true,
  227.             "in_ventilate_position": false,
  228.             "individual_config": [],
  229.             "prevent_higher_position_closing": false,
  230.             "prevent_lowering_when_closing_if_shaded": false,
  231.             "prevent_forecast_service": true,
  232.             "prevent_shading_end_if_closed": false,
  233.             "prevent_opening_after_shading_end": false,
  234.             "prevent_opening_after_ventilation_end": false,
  235.             "prevent_default_cover_actions": false,
  236.             "prevent_shading_multiple_times": false,
  237.             "prevent_opening_multiple_times": false,
  238.             "prevent_closing_multiple_times": false,
  239.             "resident_config": [],
  240.             "resident_opening_enabled": false,
  241.             "resident_closing_enabled": false,
  242.             "resident_allow_shading": false,
  243.             "resident_allow_opening": false,
  244.             "resident_allow_ventilation": false,
  245.             "ignore_after_manual_config": [],
  246.             "override_opening_after_manual": false,
  247.             "override_closing_after_manual": false,
  248.             "override_ventilation_after_manual": false,
  249.             "override_shading_after_manual": false,
  250.             "auto_ventilate_options": [],
  251.             "ventilation_delay_enabled": false,
  252.             "ventilation_if_lower_enabled": false,
  253.             "ventilation_after_shading_end": false,
  254.             "check_config": false,
  255.             "check_config_debuglevel": "info",
  256.             "check_status_helper_length": 254
  257.           }
  258.         }
  259.       ],
  260.       "condition/0": [
  261.         {
  262.           "path": "condition/0",
  263.           "timestamp": "2025-07-01T14:48:01.090383+00:00",
  264.           "result": {
  265.             "result": true
  266.           }
  267.         }
  268.       ],
  269.       "condition/0/conditions/0": [
  270.         {
  271.           "path": "condition/0/conditions/0",
  272.           "timestamp": "2025-07-01T14:48:01.090464+00:00",
  273.           "result": {
  274.             "result": true
  275.           }
  276.         }
  277.       ],
  278.       "condition/0/conditions/0/entity_id/0": [
  279.         {
  280.           "path": "condition/0/conditions/0/entity_id/0",
  281.           "timestamp": "2025-07-01T14:48:01.090531+00:00",
  282.           "result": {
  283.             "result": true,
  284.             "state": "on",
  285.             "wanted_state": "on"
  286.           }
  287.         }
  288.       ],
  289.       "condition/1": [
  290.         {
  291.           "path": "condition/1",
  292.           "timestamp": "2025-07-01T14:48:01.090837+00:00",
  293.           "result": {
  294.             "result": true
  295.           }
  296.         }
  297.       ],
  298.       "condition/1/conditions/0": [
  299.         {
  300.           "path": "condition/1/conditions/0",
  301.           "timestamp": "2025-07-01T14:48:01.090921+00:00",
  302.           "result": {
  303.             "result": false,
  304.             "entities": []
  305.           }
  306.         }
  307.       ],
  308.       "condition/1/conditions/1": [
  309.         {
  310.           "path": "condition/1/conditions/1",
  311.           "timestamp": "2025-07-01T14:48:01.091416+00:00",
  312.           "result": {
  313.             "result": true,
  314.             "entities": []
  315.           }
  316.         }
  317.       ],
  318.       "action/0": [
  319.         {
  320.           "path": "action/0",
  321.           "timestamp": "2025-07-01T14:48:01.093026+00:00",
  322.           "changed_variables": {
  323.             "context": {
  324.               "id": "01JZ37B299V5PEH334H8XCTMEF",
  325.               "parent_id": null,
  326.               "user_id": null
  327.             },
  328.             "cover_move_action": {
  329.               "sequence": [
  330.                 {
  331.                   "repeat": {
  332.                     "for_each": [
  333.                       "cover.dg_rl_ank"
  334.                     ],
  335.                     "sequence": [
  336.                       {
  337.                         "choose": [
  338.                           {
  339.                             "conditions": [
  340.                               true,
  341.                               false
  342.                             ],
  343.                             "sequence": [
  344.                               {
  345.                                 "alias": "Close Cover",
  346.                                 "service": "cover.close_cover",
  347.                                 "target": {
  348.                                   "entity_id": ""
  349.                                 }
  350.                               }
  351.                             ]
  352.                           },
  353.                           {
  354.                             "conditions": [
  355.                               true,
  356.                               false
  357.                             ],
  358.                             "sequence": [
  359.                               {
  360.                                 "alias": "Open Cover",
  361.                                 "service": "cover.open_cover",
  362.                                 "target": {
  363.                                   "entity_id": ""
  364.                                 }
  365.                               }
  366.                             ]
  367.                           },
  368.                           {
  369.                             "conditions": [
  370.                               true,
  371.                               true
  372.                             ],
  373.                             "sequence": [
  374.                               {
  375.                                 "alias": "Moving the cover to target position",
  376.                                 "service": "cover.set_cover_position",
  377.                                 "data": {
  378.                                   "position": 101
  379.                                 },
  380.                                 "target": {
  381.                                   "entity_id": ""
  382.                                 }
  383.                               }
  384.                             ]
  385.                           }
  386.                         ]
  387.                       },
  388.                       {
  389.                         "delay": {
  390.                           "seconds": 1
  391.                         }
  392.                       }
  393.                     ]
  394.                   }
  395.                 }
  396.               ]
  397.             },
  398.             "tilt_move_action": {
  399.               "sequence": [
  400.                 {
  401.                   "if": [
  402.                     true,
  403.                     false,
  404.                     false
  405.                   ],
  406.                   "then": [
  407.                     {
  408.                       "repeat": {
  409.                         "for_each": [
  410.                           "cover.dg_rl_ank"
  411.                         ],
  412.                         "sequence": [
  413.                           {
  414.                             "if": [
  415.                               false
  416.                             ],
  417.                             "then": [
  418.                               {
  419.                                 "alias": "Reset Tilt",
  420.                                 "service": "cover.set_cover_tilt_position",
  421.                                 "data": {
  422.                                   "tilt_position": 0
  423.                                 },
  424.                                 "target": {
  425.                                   "entity_id": ""
  426.                                 }
  427.                               },
  428.                               {
  429.                                 "delay": {
  430.                                   "seconds": 0
  431.                                 }
  432.                               }
  433.                             ]
  434.                           },
  435.                           {
  436.                             "alias": "Tilt Delay",
  437.                             "delay": {
  438.                               "seconds": 0
  439.                             }
  440.                           },
  441.                           {
  442.                             "alias": "Moving the cover to tilt position",
  443.                             "service": "cover.set_cover_tilt_position",
  444.                             "data": {
  445.                               "tilt_position": 101
  446.                             },
  447.                             "target": {
  448.                               "entity_id": ""
  449.                             }
  450.                           },
  451.                           {
  452.                             "delay": {
  453.                               "seconds": 1
  454.                             }
  455.                           }
  456.                         ]
  457.                       }
  458.                     }
  459.                   ]
  460.                 }
  461.               ]
  462.             },
  463.             "helper_update": {
  464.               "if": [
  465.                 true
  466.               ],
  467.               "then": [
  468.                 {
  469.                   "alias": "Update cover status helper",
  470.                   "service": "input_text.set_value",
  471.                   "data": {
  472.                     "entity_id": "input_text.cover_status_helper_ankleide",
  473.                     "value": {
  474.                       "open": {
  475.                         "a": 1,
  476.                         "t": 1751366731
  477.                       },
  478.                       "close": {
  479.                         "a": 0,
  480.                         "t": 1751313693
  481.                       },
  482.                       "shading": {
  483.                         "a": 1,
  484.                         "t": 1751380669,
  485.                         "p": 0,
  486.                         "q": 1751381269
  487.                       },
  488.                       "vpart": {
  489.                         "a": 0,
  490.                         "t": 0
  491.                       },
  492.                       "vfull": {
  493.                         "a": 0,
  494.                         "t": 0
  495.                       },
  496.                       "manual": {
  497.                         "a": 0,
  498.                         "t": 1751192507
  499.                       },
  500.                       "v": 5,
  501.                       "t": 1751380669
  502.                     }
  503.                   }
  504.                 }
  505.               ]
  506.             }
  507.           }
  508.         }
  509.       ],
  510.       "action/1": [
  511.         {
  512.           "path": "action/1",
  513.           "timestamp": "2025-07-01T14:48:01.105100+00:00"
  514.         }
  515.       ],
  516.       "action/1/if": [
  517.         {
  518.           "path": "action/1/if",
  519.           "timestamp": "2025-07-01T14:48:01.106359+00:00",
  520.           "result": {
  521.             "result": false
  522.           }
  523.         }
  524.       ],
  525.       "action/1/if/condition/0": [
  526.         {
  527.           "path": "action/1/if/condition/0",
  528.           "timestamp": "2025-07-01T14:48:01.107358+00:00",
  529.           "result": {
  530.             "result": true,
  531.             "entities": []
  532.           }
  533.         }
  534.       ],
  535.       "action/1/if/condition/1": [
  536.         {
  537.           "path": "action/1/if/condition/1",
  538.           "timestamp": "2025-07-01T14:48:01.109038+00:00",
  539.           "result": {
  540.             "result": false,
  541.             "entities": []
  542.           }
  543.         }
  544.       ],
  545.       "action/2": [
  546.         {
  547.           "path": "action/2",
  548.           "timestamp": "2025-07-01T14:48:01.110996+00:00"
  549.         }
  550.       ],
  551.       "action/2/if": [
  552.         {
  553.           "path": "action/2/if",
  554.           "timestamp": "2025-07-01T14:48:01.111353+00:00",
  555.           "result": {
  556.             "result": false
  557.           }
  558.         }
  559.       ],
  560.       "action/2/if/condition/0": [
  561.         {
  562.           "path": "action/2/if/condition/0",
  563.           "timestamp": "2025-07-01T14:48:01.112251+00:00",
  564.           "result": {
  565.             "result": true,
  566.             "entities": []
  567.           }
  568.         }
  569.       ],
  570.       "action/2/if/condition/1": [
  571.         {
  572.           "path": "action/2/if/condition/1",
  573.           "timestamp": "2025-07-01T14:48:01.113850+00:00",
  574.           "result": {
  575.             "result": true,
  576.             "entities": []
  577.           }
  578.         }
  579.       ],
  580.       "action/2/if/condition/2": [
  581.         {
  582.           "path": "action/2/if/condition/2",
  583.           "timestamp": "2025-07-01T14:48:01.115385+00:00",
  584.           "result": {
  585.             "result": false
  586.           }
  587.         }
  588.       ],
  589.       "action/2/if/condition/2/conditions/0": [
  590.         {
  591.           "path": "action/2/if/condition/2/conditions/0",
  592.           "timestamp": "2025-07-01T14:48:01.116293+00:00",
  593.           "result": {
  594.             "result": false,
  595.             "entities": [
  596.               "input_text.cover_status_helper_ankleide"
  597.             ]
  598.           }
  599.         }
  600.       ],
  601.       "action/2/if/condition/2/conditions/1": [
  602.         {
  603.           "path": "action/2/if/condition/2/conditions/1",
  604.           "timestamp": "2025-07-01T14:48:01.118315+00:00",
  605.           "result": {
  606.             "result": false,
  607.             "entities": [
  608.               "input_text.cover_status_helper_ankleide"
  609.             ]
  610.           }
  611.         }
  612.       ],
  613.       "action/3": [
  614.         {
  615.           "path": "action/3",
  616.           "timestamp": "2025-07-01T14:48:01.122382+00:00"
  617.         }
  618.       ],
  619.       "action/3/if": [
  620.         {
  621.           "path": "action/3/if",
  622.           "timestamp": "2025-07-01T14:48:01.122818+00:00",
  623.           "result": {
  624.             "result": false
  625.           }
  626.         }
  627.       ],
  628.       "action/3/if/condition/0": [
  629.         {
  630.           "path": "action/3/if/condition/0",
  631.           "timestamp": "2025-07-01T14:48:01.123791+00:00",
  632.           "result": {
  633.             "result": true,
  634.             "entities": []
  635.           }
  636.         }
  637.       ],
  638.       "action/3/if/condition/1": [
  639.         {
  640.           "path": "action/3/if/condition/1",
  641.           "timestamp": "2025-07-01T14:48:01.126292+00:00",
  642.           "result": {
  643.             "result": false,
  644.             "entities": []
  645.           }
  646.         }
  647.       ],
  648.       "action/4": [
  649.         {
  650.           "path": "action/4",
  651.           "timestamp": "2025-07-01T14:48:01.131588+00:00",
  652.           "changed_variables": {
  653.             "target_status": "open",
  654.             "target_position": 100,
  655.             "target_tilt_position": 50,
  656.             "update_values": {
  657.               "open": {
  658.                 "a": 1,
  659.                 "t": 1751381371
  660.               },
  661.               "close": {
  662.                 "a": 0,
  663.                 "t": 1751313693
  664.               },
  665.               "shading": {
  666.                 "a": 0,
  667.                 "t": 1751380669,
  668.                 "p": 0,
  669.                 "q": 0
  670.               },
  671.               "vpart": {
  672.                 "a": 0,
  673.                 "t": 0
  674.               },
  675.               "vfull": {
  676.                 "a": 0,
  677.                 "t": 0
  678.               },
  679.               "manual": {
  680.                 "a": 0,
  681.                 "t": 1751192507
  682.               },
  683.               "t": 1751381371
  684.             }
  685.           },
  686.           "result": {
  687.             "choice": 4
  688.           }
  689.         }
  690.       ],
  691.       "action/4/choose/0": [
  692.         {
  693.           "path": "action/4/choose/0",
  694.           "timestamp": "2025-07-01T14:48:01.132069+00:00",
  695.           "result": {
  696.             "result": false
  697.           }
  698.         }
  699.       ],
  700.       "action/4/choose/0/conditions/0": [
  701.         {
  702.           "path": "action/4/choose/0/conditions/0",
  703.           "timestamp": "2025-07-01T14:48:01.132953+00:00",
  704.           "result": {
  705.             "result": true,
  706.             "entities": []
  707.           }
  708.         }
  709.       ],
  710.       "action/4/choose/0/conditions/1": [
  711.         {
  712.           "path": "action/4/choose/0/conditions/1",
  713.           "timestamp": "2025-07-01T14:48:01.136914+00:00",
  714.           "result": {
  715.             "result": true,
  716.             "entities": []
  717.           }
  718.         }
  719.       ],
  720.       "action/4/choose/0/conditions/2": [
  721.         {
  722.           "path": "action/4/choose/0/conditions/2",
  723.           "timestamp": "2025-07-01T14:48:01.141114+00:00",
  724.           "result": {
  725.             "result": false,
  726.             "entities": []
  727.           }
  728.         }
  729.       ],
  730.       "action/4/choose/1": [
  731.         {
  732.           "path": "action/4/choose/1",
  733.           "timestamp": "2025-07-01T14:48:01.144127+00:00",
  734.           "result": {
  735.             "result": false
  736.           }
  737.         }
  738.       ],
  739.       "action/4/choose/1/conditions/0": [
  740.         {
  741.           "path": "action/4/choose/1/conditions/0",
  742.           "timestamp": "2025-07-01T14:48:01.145880+00:00",
  743.           "result": {
  744.             "result": true,
  745.             "entities": []
  746.           }
  747.         }
  748.       ],
  749.       "action/4/choose/1/conditions/1": [
  750.         {
  751.           "path": "action/4/choose/1/conditions/1",
  752.           "timestamp": "2025-07-01T14:48:01.147476+00:00",
  753.           "result": {
  754.             "result": true,
  755.             "entities": []
  756.           }
  757.         }
  758.       ],
  759.       "action/4/choose/1/conditions/2": [
  760.         {
  761.           "path": "action/4/choose/1/conditions/2",
  762.           "timestamp": "2025-07-01T14:48:01.149153+00:00",
  763.           "result": {
  764.             "result": false,
  765.             "entities": []
  766.           }
  767.         }
  768.       ],
  769.       "action/4/choose/2": [
  770.         {
  771.           "path": "action/4/choose/2",
  772.           "timestamp": "2025-07-01T14:48:01.150956+00:00",
  773.           "result": {
  774.             "result": false
  775.           }
  776.         }
  777.       ],
  778.       "action/4/choose/2/conditions/0": [
  779.         {
  780.           "path": "action/4/choose/2/conditions/0",
  781.           "timestamp": "2025-07-01T14:48:01.151914+00:00",
  782.           "result": {
  783.             "result": true,
  784.             "entities": []
  785.           }
  786.         }
  787.       ],
  788.       "action/4/choose/2/conditions/1": [
  789.         {
  790.           "path": "action/4/choose/2/conditions/1",
  791.           "timestamp": "2025-07-01T14:48:01.153448+00:00",
  792.           "result": {
  793.             "result": true,
  794.             "entities": []
  795.           }
  796.         }
  797.       ],
  798.       "action/4/choose/2/conditions/2": [
  799.         {
  800.           "path": "action/4/choose/2/conditions/2",
  801.           "timestamp": "2025-07-01T14:48:01.155118+00:00",
  802.           "result": {
  803.             "result": false,
  804.             "entities": []
  805.           }
  806.         }
  807.       ],
  808.       "action/4/choose/3": [
  809.         {
  810.           "path": "action/4/choose/3",
  811.           "timestamp": "2025-07-01T14:48:01.156887+00:00",
  812.           "result": {
  813.             "result": false
  814.           }
  815.         }
  816.       ],
  817.       "action/4/choose/3/conditions/0": [
  818.         {
  819.           "path": "action/4/choose/3/conditions/0",
  820.           "timestamp": "2025-07-01T14:48:01.157831+00:00",
  821.           "result": {
  822.             "result": true,
  823.             "entities": []
  824.           }
  825.         }
  826.       ],
  827.       "action/4/choose/3/conditions/1": [
  828.         {
  829.           "path": "action/4/choose/3/conditions/1",
  830.           "timestamp": "2025-07-01T14:48:01.159385+00:00",
  831.           "result": {
  832.             "result": true,
  833.             "entities": []
  834.           }
  835.         }
  836.       ],
  837.       "action/4/choose/3/conditions/2": [
  838.         {
  839.           "path": "action/4/choose/3/conditions/2",
  840.           "timestamp": "2025-07-01T14:48:01.161039+00:00",
  841.           "result": {
  842.             "result": false,
  843.             "entities": []
  844.           }
  845.         }
  846.       ],
  847.       "action/4/choose/4": [
  848.         {
  849.           "path": "action/4/choose/4",
  850.           "timestamp": "2025-07-01T14:48:01.168870+00:00",
  851.           "result": {
  852.             "result": true
  853.           }
  854.         }
  855.       ],
  856.       "action/4/choose/4/conditions/0": [
  857.         {
  858.           "path": "action/4/choose/4/conditions/0",
  859.           "timestamp": "2025-07-01T14:48:01.170100+00:00",
  860.           "result": {
  861.             "result": true,
  862.             "entities": []
  863.           }
  864.         }
  865.       ],
  866.       "action/4/choose/4/conditions/1": [
  867.         {
  868.           "path": "action/4/choose/4/conditions/1",
  869.           "timestamp": "2025-07-01T14:48:01.172359+00:00",
  870.           "result": {
  871.             "result": true,
  872.             "entities": []
  873.           }
  874.         }
  875.       ],
  876.       "action/4/choose/4/conditions/2": [
  877.         {
  878.           "path": "action/4/choose/4/conditions/2",
  879.           "timestamp": "2025-07-01T14:48:01.175919+00:00",
  880.           "result": {
  881.             "result": true,
  882.             "entities": []
  883.           }
  884.         }
  885.       ],
  886.       "action/4/choose/4/conditions/3": [
  887.         {
  888.           "path": "action/4/choose/4/conditions/3",
  889.           "timestamp": "2025-07-01T14:48:01.178075+00:00",
  890.           "result": {
  891.             "result": true,
  892.             "entities": []
  893.           }
  894.         }
  895.       ],
  896.       "action/4/choose/4/conditions/4": [
  897.         {
  898.           "path": "action/4/choose/4/conditions/4",
  899.           "timestamp": "2025-07-01T14:48:01.181276+00:00",
  900.           "result": {
  901.             "result": true
  902.           }
  903.         }
  904.       ],
  905.       "action/4/choose/4/conditions/5": [
  906.         {
  907.           "path": "action/4/choose/4/conditions/5",
  908.           "timestamp": "2025-07-01T14:48:01.184212+00:00",
  909.           "result": {
  910.             "result": true
  911.           }
  912.         }
  913.       ],
  914.       "action/4/choose/4/conditions/5/conditions/0": [
  915.         {
  916.           "path": "action/4/choose/4/conditions/5/conditions/0",
  917.           "timestamp": "2025-07-01T14:48:01.186093+00:00",
  918.           "result": {
  919.             "result": true,
  920.             "entities": []
  921.           }
  922.         }
  923.       ],
  924.       "action/4/choose/4/conditions/5/conditions/1": [
  925.         {
  926.           "path": "action/4/choose/4/conditions/5/conditions/1",
  927.           "timestamp": "2025-07-01T14:48:01.190872+00:00",
  928.           "result": {
  929.             "result": true,
  930.             "entities": []
  931.           }
  932.         }
  933.       ],
  934.       "action/4/choose/4/conditions/5/conditions/2": [
  935.         {
  936.           "path": "action/4/choose/4/conditions/5/conditions/2",
  937.           "timestamp": "2025-07-01T14:48:01.195078+00:00",
  938.           "result": {
  939.             "result": true,
  940.             "entities": []
  941.           }
  942.         }
  943.       ],
  944.       "action/4/choose/4/conditions/5/conditions/3": [
  945.         {
  946.           "path": "action/4/choose/4/conditions/5/conditions/3",
  947.           "timestamp": "2025-07-01T14:48:01.197265+00:00",
  948.           "result": {
  949.             "result": true,
  950.             "entities": []
  951.           }
  952.         }
  953.       ],
  954.       "action/4/choose/4/conditions/6": [
  955.         {
  956.           "path": "action/4/choose/4/conditions/6",
  957.           "timestamp": "2025-07-01T14:48:01.199525+00:00",
  958.           "result": {
  959.             "result": true
  960.           }
  961.         }
  962.       ],
  963.       "action/4/choose/4/conditions/6/conditions/0": [
  964.         {
  965.           "path": "action/4/choose/4/conditions/6/conditions/0",
  966.           "timestamp": "2025-07-01T14:48:01.201930+00:00",
  967.           "result": {
  968.             "result": false
  969.           }
  970.         }
  971.       ],
  972.       "action/4/choose/4/conditions/6/conditions/0/conditions/0": [
  973.         {
  974.           "path": "action/4/choose/4/conditions/6/conditions/0/conditions/0",
  975.           "timestamp": "2025-07-01T14:48:01.203116+00:00",
  976.           "result": {
  977.             "result": false,
  978.             "entities": []
  979.           }
  980.         }
  981.       ],
  982.       "action/4/choose/4/conditions/6/conditions/1": [
  983.         {
  984.           "path": "action/4/choose/4/conditions/6/conditions/1",
  985.           "timestamp": "2025-07-01T14:48:01.205267+00:00",
  986.           "result": {
  987.             "result": true
  988.           }
  989.         }
  990.       ],
  991.       "action/4/choose/4/conditions/6/conditions/1/conditions/0": [
  992.         {
  993.           "path": "action/4/choose/4/conditions/6/conditions/1/conditions/0",
  994.           "timestamp": "2025-07-01T14:48:01.206880+00:00",
  995.           "result": {
  996.             "result": true,
  997.             "entities": []
  998.           }
  999.         }
  1000.       ],
  1001.       "action/4/choose/4/conditions/6/conditions/1/conditions/1": [
  1002.         {
  1003.           "path": "action/4/choose/4/conditions/6/conditions/1/conditions/1",
  1004.           "timestamp": "2025-07-01T14:48:01.209051+00:00",
  1005.           "result": {
  1006.             "result": true,
  1007.             "entities": []
  1008.           }
  1009.         }
  1010.       ],
  1011.       "action/4/choose/4/conditions/6/conditions/1/conditions/2": [
  1012.         {
  1013.           "path": "action/4/choose/4/conditions/6/conditions/1/conditions/2",
  1014.           "timestamp": "2025-07-01T14:48:01.211784+00:00",
  1015.           "result": {
  1016.             "result": true,
  1017.             "entities": []
  1018.           }
  1019.         }
  1020.       ],
  1021.       "action/4/choose/4/conditions/7": [
  1022.         {
  1023.           "path": "action/4/choose/4/conditions/7",
  1024.           "timestamp": "2025-07-01T14:48:01.214348+00:00",
  1025.           "result": {
  1026.             "result": true,
  1027.             "entities": []
  1028.           }
  1029.         }
  1030.       ],
  1031.       "action/4/choose/4/conditions/8": [
  1032.         {
  1033.           "path": "action/4/choose/4/conditions/8",
  1034.           "timestamp": "2025-07-01T14:48:01.216723+00:00",
  1035.           "result": {
  1036.             "result": true,
  1037.             "entities": []
  1038.           }
  1039.         }
  1040.       ],
  1041.       "action/4/choose/4/conditions/9": [
  1042.         {
  1043.           "path": "action/4/choose/4/conditions/9",
  1044.           "timestamp": "2025-07-01T14:48:01.219503+00:00",
  1045.           "result": {
  1046.             "result": true
  1047.           }
  1048.         }
  1049.       ],
  1050.       "action/4/choose/4/conditions/9/conditions/0": [
  1051.         {
  1052.           "path": "action/4/choose/4/conditions/9/conditions/0",
  1053.           "timestamp": "2025-07-01T14:48:01.221005+00:00",
  1054.           "result": {
  1055.             "result": true,
  1056.             "entities": []
  1057.           }
  1058.         }
  1059.       ],
  1060.       "action/4/choose/4/conditions/10": [
  1061.         {
  1062.           "path": "action/4/choose/4/conditions/10",
  1063.           "timestamp": "2025-07-01T14:48:01.223193+00:00",
  1064.           "result": {
  1065.             "result": true
  1066.           }
  1067.         }
  1068.       ],
  1069.       "action/4/choose/4/conditions/10/conditions/0": [
  1070.         {
  1071.           "path": "action/4/choose/4/conditions/10/conditions/0",
  1072.           "timestamp": "2025-07-01T14:48:01.224640+00:00",
  1073.           "result": {
  1074.             "result": true,
  1075.             "entities": []
  1076.           }
  1077.         }
  1078.       ],
  1079.       "action/4/choose/4/conditions/11": [
  1080.         {
  1081.           "path": "action/4/choose/4/conditions/11",
  1082.           "timestamp": "2025-07-01T14:48:01.227083+00:00",
  1083.           "result": {
  1084.             "result": true
  1085.           }
  1086.         }
  1087.       ],
  1088.       "action/4/choose/4/conditions/11/conditions/0": [
  1089.         {
  1090.           "path": "action/4/choose/4/conditions/11/conditions/0",
  1091.           "timestamp": "2025-07-01T14:48:01.228226+00:00",
  1092.           "result": {
  1093.             "result": true,
  1094.             "entities": []
  1095.           }
  1096.         }
  1097.       ],
  1098.       "action/4/choose/4/sequence/0": [
  1099.         {
  1100.           "path": "action/4/choose/4/sequence/0",
  1101.           "timestamp": "2025-07-01T14:48:01.232826+00:00",
  1102.           "changed_variables": {
  1103.             "target_status": "open",
  1104.             "target_position": 100,
  1105.             "target_tilt_position": 50,
  1106.             "update_values": {
  1107.               "open": {
  1108.                 "a": 1,
  1109.                 "t": 1751381371
  1110.               },
  1111.               "close": {
  1112.                 "a": 0,
  1113.                 "t": 1751313693
  1114.               },
  1115.               "shading": {
  1116.                 "a": 0,
  1117.                 "t": 1751380669,
  1118.                 "p": 0,
  1119.                 "q": 0
  1120.               },
  1121.               "vpart": {
  1122.                 "a": 0,
  1123.                 "t": 0
  1124.               },
  1125.               "vfull": {
  1126.                 "a": 0,
  1127.                 "t": 0
  1128.               },
  1129.               "manual": {
  1130.                 "a": 0,
  1131.                 "t": 1751192507
  1132.               },
  1133.               "t": 1751381371
  1134.             }
  1135.           },
  1136.           "result": {
  1137.             "choice": 4
  1138.           }
  1139.         }
  1140.       ],
  1141.       "action/4/choose/4/sequence/0/choose/0": [
  1142.         {
  1143.           "path": "action/4/choose/4/sequence/0/choose/0",
  1144.           "timestamp": "2025-07-01T14:48:01.233559+00:00",
  1145.           "result": {
  1146.             "result": false
  1147.           }
  1148.         }
  1149.       ],
  1150.       "action/4/choose/4/sequence/0/choose/0/conditions/0": [
  1151.         {
  1152.           "path": "action/4/choose/4/sequence/0/choose/0/conditions/0",
  1153.           "timestamp": "2025-07-01T14:48:01.235057+00:00",
  1154.           "result": {
  1155.             "result": false,
  1156.             "entities": []
  1157.           }
  1158.         }
  1159.       ],
  1160.       "action/4/choose/4/sequence/0/choose/1": [
  1161.         {
  1162.           "path": "action/4/choose/4/sequence/0/choose/1",
  1163.           "timestamp": "2025-07-01T14:48:01.239085+00:00",
  1164.           "result": {
  1165.             "result": false
  1166.           }
  1167.         }
  1168.       ],
  1169.       "action/4/choose/4/sequence/0/choose/1/conditions/0": [
  1170.         {
  1171.           "path": "action/4/choose/4/sequence/0/choose/1/conditions/0",
  1172.           "timestamp": "2025-07-01T14:48:01.240862+00:00",
  1173.           "result": {
  1174.             "result": true,
  1175.             "entities": []
  1176.           }
  1177.         }
  1178.       ],
  1179.       "action/4/choose/4/sequence/0/choose/1/conditions/1": [
  1180.         {
  1181.           "path": "action/4/choose/4/sequence/0/choose/1/conditions/1",
  1182.           "timestamp": "2025-07-01T14:48:01.242948+00:00",
  1183.           "result": {
  1184.             "result": true,
  1185.             "entities": []
  1186.           }
  1187.         }
  1188.       ],
  1189.       "action/4/choose/4/sequence/0/choose/1/conditions/2": [
  1190.         {
  1191.           "path": "action/4/choose/4/sequence/0/choose/1/conditions/2",
  1192.           "timestamp": "2025-07-01T14:48:01.245337+00:00",
  1193.           "result": {
  1194.             "result": false,
  1195.             "entities": []
  1196.           }
  1197.         }
  1198.       ],
  1199.       "action/4/choose/4/sequence/0/choose/2": [
  1200.         {
  1201.           "path": "action/4/choose/4/sequence/0/choose/2",
  1202.           "timestamp": "2025-07-01T14:48:01.247079+00:00",
  1203.           "result": {
  1204.             "result": false
  1205.           }
  1206.         }
  1207.       ],
  1208.       "action/4/choose/4/sequence/0/choose/2/conditions/0": [
  1209.         {
  1210.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/0",
  1211.           "timestamp": "2025-07-01T14:48:01.247974+00:00",
  1212.           "result": {
  1213.             "result": true,
  1214.             "entities": []
  1215.           }
  1216.         }
  1217.       ],
  1218.       "action/4/choose/4/sequence/0/choose/2/conditions/1": [
  1219.         {
  1220.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/1",
  1221.           "timestamp": "2025-07-01T14:48:01.249448+00:00",
  1222.           "result": {
  1223.             "result": true,
  1224.             "entities": []
  1225.           }
  1226.         }
  1227.       ],
  1228.       "action/4/choose/4/sequence/0/choose/2/conditions/2": [
  1229.         {
  1230.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/2",
  1231.           "timestamp": "2025-07-01T14:48:01.251106+00:00",
  1232.           "result": {
  1233.             "result": true,
  1234.             "entities": []
  1235.           }
  1236.         }
  1237.       ],
  1238.       "action/4/choose/4/sequence/0/choose/2/conditions/3": [
  1239.         {
  1240.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/3",
  1241.           "timestamp": "2025-07-01T14:48:01.252930+00:00",
  1242.           "result": {
  1243.             "result": true,
  1244.             "entities": []
  1245.           }
  1246.         }
  1247.       ],
  1248.       "action/4/choose/4/sequence/0/choose/2/conditions/4": [
  1249.         {
  1250.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4",
  1251.           "timestamp": "2025-07-01T14:48:01.255313+00:00",
  1252.           "result": {
  1253.             "result": false
  1254.           }
  1255.         }
  1256.       ],
  1257.       "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0": [
  1258.         {
  1259.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0",
  1260.           "timestamp": "2025-07-01T14:48:01.256281+00:00",
  1261.           "result": {
  1262.             "result": false
  1263.           }
  1264.         }
  1265.       ],
  1266.       "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0/conditions/0": [
  1267.         {
  1268.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0/conditions/0",
  1269.           "timestamp": "2025-07-01T14:48:01.257158+00:00",
  1270.           "result": {
  1271.             "result": true,
  1272.             "entities": []
  1273.           }
  1274.         }
  1275.       ],
  1276.       "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0/conditions/1": [
  1277.         {
  1278.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/0/conditions/1",
  1279.           "timestamp": "2025-07-01T14:48:01.258797+00:00",
  1280.           "result": {
  1281.             "result": false,
  1282.             "entities": [
  1283.               "binary_sensor.tfk_ank"
  1284.             ]
  1285.           }
  1286.         }
  1287.       ],
  1288.       "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/1": [
  1289.         {
  1290.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/1",
  1291.           "timestamp": "2025-07-01T14:48:01.260538+00:00",
  1292.           "result": {
  1293.             "result": false
  1294.           }
  1295.         }
  1296.       ],
  1297.       "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/1/conditions/0": [
  1298.         {
  1299.           "path": "action/4/choose/4/sequence/0/choose/2/conditions/4/conditions/1/conditions/0",
  1300.           "timestamp": "2025-07-01T14:48:01.261455+00:00",
  1301.           "result": {
  1302.             "result": false,
  1303.             "entities": []
  1304.           }
  1305.         }
  1306.       ],
  1307.       "action/4/choose/4/sequence/0/choose/3": [
  1308.         {
  1309.           "path": "action/4/choose/4/sequence/0/choose/3",
  1310.           "timestamp": "2025-07-01T14:48:01.263108+00:00",
  1311.           "result": {
  1312.             "result": false
  1313.           }
  1314.         }
  1315.       ],
  1316.       "action/4/choose/4/sequence/0/choose/3/conditions/0": [
  1317.         {
  1318.           "path": "action/4/choose/4/sequence/0/choose/3/conditions/0",
  1319.           "timestamp": "2025-07-01T14:48:01.264007+00:00",
  1320.           "result": {
  1321.             "result": true,
  1322.             "entities": []
  1323.           }
  1324.         }
  1325.       ],
  1326.       "action/4/choose/4/sequence/0/choose/3/conditions/1": [
  1327.         {
  1328.           "path": "action/4/choose/4/sequence/0/choose/3/conditions/1",
  1329.           "timestamp": "2025-07-01T14:48:01.265786+00:00",
  1330.           "result": {
  1331.             "result": true,
  1332.             "entities": []
  1333.           }
  1334.         }
  1335.       ],
  1336.       "action/4/choose/4/sequence/0/choose/3/conditions/2": [
  1337.         {
  1338.           "path": "action/4/choose/4/sequence/0/choose/3/conditions/2",
  1339.           "timestamp": "2025-07-01T14:48:01.267341+00:00",
  1340.           "result": {
  1341.             "result": true,
  1342.             "entities": []
  1343.           }
  1344.         }
  1345.       ],
  1346.       "action/4/choose/4/sequence/0/choose/3/conditions/3": [
  1347.         {
  1348.           "path": "action/4/choose/4/sequence/0/choose/3/conditions/3",
  1349.           "timestamp": "2025-07-01T14:48:01.268870+00:00",
  1350.           "result": {
  1351.             "result": false,
  1352.             "entities": []
  1353.           }
  1354.         }
  1355.       ],
  1356.       "action/4/choose/4/sequence/0/choose/4": [
  1357.         {
  1358.           "path": "action/4/choose/4/sequence/0/choose/4",
  1359.           "timestamp": "2025-07-01T14:48:01.270448+00:00",
  1360.           "result": {
  1361.             "result": true
  1362.           }
  1363.         }
  1364.       ],
  1365.       "action/4/choose/4/sequence/0/choose/4/conditions/0": [
  1366.         {
  1367.           "path": "action/4/choose/4/sequence/0/choose/4/conditions/0",
  1368.           "timestamp": "2025-07-01T14:48:01.271448+00:00",
  1369.           "result": {
  1370.             "result": true,
  1371.             "entities": []
  1372.           }
  1373.         }
  1374.       ],
  1375.       "action/4/choose/4/sequence/0/choose/4/conditions/1": [
  1376.         {
  1377.           "path": "action/4/choose/4/sequence/0/choose/4/conditions/1",
  1378.           "timestamp": "2025-07-01T14:48:01.273046+00:00",
  1379.           "result": {
  1380.             "result": true,
  1381.             "entities": []
  1382.           }
  1383.         }
  1384.       ],
  1385.       "action/4/choose/4/sequence/0/choose/4/sequence/0": [
  1386.         {
  1387.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/0",
  1388.           "timestamp": "2025-07-01T14:48:01.275245+00:00",
  1389.           "result": {
  1390.             "delay": 90,
  1391.             "done": true
  1392.           }
  1393.         }
  1394.       ],
  1395.       "action/4/choose/4/sequence/0/choose/4/sequence/1": [
  1396.         {
  1397.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/1",
  1398.           "timestamp": "2025-07-01T14:49:31.279731+00:00",
  1399.           "result": {
  1400.             "choice": "default"
  1401.           }
  1402.         }
  1403.       ],
  1404.       "action/4/choose/4/sequence/0/choose/4/sequence/2": [
  1405.         {
  1406.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/2",
  1407.           "timestamp": "2025-07-01T14:49:31.283207+00:00",
  1408.           "changed_variables": {
  1409.             "target_status": "open",
  1410.             "target_position": 100,
  1411.             "target_tilt_position": 50,
  1412.             "update_values": {
  1413.               "open": {
  1414.                 "a": 1,
  1415.                 "t": 1751381371
  1416.               },
  1417.               "close": {
  1418.                 "a": 0,
  1419.                 "t": 1751313693
  1420.               },
  1421.               "shading": {
  1422.                 "a": 0,
  1423.                 "t": 1751380669,
  1424.                 "p": 0,
  1425.                 "q": 0
  1426.               },
  1427.               "vpart": {
  1428.                 "a": 0,
  1429.                 "t": 0
  1430.               },
  1431.               "vfull": {
  1432.                 "a": 0,
  1433.                 "t": 0
  1434.               },
  1435.               "manual": {
  1436.                 "a": 0,
  1437.                 "t": 1751192507
  1438.               },
  1439.               "t": 1751381371
  1440.             }
  1441.           }
  1442.         }
  1443.       ],
  1444.       "action/4/choose/4/sequence/0/choose/4/sequence/3": [
  1445.         {
  1446.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/3",
  1447.           "timestamp": "2025-07-01T14:49:31.301337+00:00",
  1448.           "result": {
  1449.             "choice": "then"
  1450.           }
  1451.         }
  1452.       ],
  1453.       "action/4/choose/4/sequence/0/choose/4/sequence/3/if": [
  1454.         {
  1455.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/3/if",
  1456.           "timestamp": "2025-07-01T14:49:31.305278+00:00",
  1457.           "result": {
  1458.             "result": true
  1459.           }
  1460.         }
  1461.       ],
  1462.       "action/4/choose/4/sequence/0/choose/4/sequence/3/if/condition/0": [
  1463.         {
  1464.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/3/if/condition/0",
  1465.           "timestamp": "2025-07-01T14:49:31.307772+00:00",
  1466.           "result": {
  1467.             "result": true,
  1468.             "entities": []
  1469.           }
  1470.         }
  1471.       ],
  1472.       "action/4/choose/4/sequence/0/choose/4/sequence/3/then/0": [
  1473.         {
  1474.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/3/then/0",
  1475.           "timestamp": "2025-07-01T14:49:31.316253+00:00",
  1476.           "result": {
  1477.             "params": {
  1478.               "domain": "input_text",
  1479.               "service": "set_value",
  1480.               "service_data": {
  1481.                 "entity_id": "input_text.cover_status_helper_ankleide",
  1482.                 "value": {
  1483.                   "open": {
  1484.                     "a": 1,
  1485.                     "t": 1751381371
  1486.                   },
  1487.                   "close": {
  1488.                     "a": 0,
  1489.                     "t": 1751313693
  1490.                   },
  1491.                   "shading": {
  1492.                     "a": 0,
  1493.                     "t": 1751380669,
  1494.                     "p": 0,
  1495.                     "q": 0
  1496.                   },
  1497.                   "vpart": {
  1498.                     "a": 0,
  1499.                     "t": 0
  1500.                   },
  1501.                   "vfull": {
  1502.                     "a": 0,
  1503.                     "t": 0
  1504.                   },
  1505.                   "manual": {
  1506.                     "a": 0,
  1507.                     "t": 1751192507
  1508.                   },
  1509.                   "v": 5,
  1510.                   "t": 1751381371
  1511.                 }
  1512.               },
  1513.               "target": {}
  1514.             },
  1515.             "running_script": false
  1516.           }
  1517.         }
  1518.       ],
  1519.       "action/4/choose/4/sequence/0/choose/4/sequence/4": [
  1520.         {
  1521.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4",
  1522.           "timestamp": "2025-07-01T14:49:31.327676+00:00",
  1523.           "result": {
  1524.             "choice": "then"
  1525.           }
  1526.         }
  1527.       ],
  1528.       "action/4/choose/4/sequence/0/choose/4/sequence/4/if": [
  1529.         {
  1530.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/if",
  1531.           "timestamp": "2025-07-01T14:49:31.328459+00:00",
  1532.           "result": {
  1533.             "result": true
  1534.           }
  1535.         }
  1536.       ],
  1537.       "action/4/choose/4/sequence/0/choose/4/sequence/4/if/condition/0": [
  1538.         {
  1539.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/if/condition/0",
  1540.           "timestamp": "2025-07-01T14:49:31.329865+00:00",
  1541.           "result": {
  1542.             "result": true,
  1543.             "entities": []
  1544.           }
  1545.         }
  1546.       ],
  1547.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0": [
  1548.         {
  1549.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0",
  1550.           "timestamp": "2025-07-01T14:49:31.334756+00:00"
  1551.         }
  1552.       ],
  1553.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0": [
  1554.         {
  1555.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0",
  1556.           "timestamp": "2025-07-01T14:49:31.335970+00:00"
  1557.         }
  1558.       ],
  1559.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0": [
  1560.         {
  1561.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0",
  1562.           "timestamp": "2025-07-01T14:49:31.344294+00:00",
  1563.           "changed_variables": {
  1564.             "repeat": {
  1565.               "first": true,
  1566.               "index": 1,
  1567.               "last": true,
  1568.               "item": "cover.dg_rl_ank"
  1569.             }
  1570.           },
  1571.           "result": {
  1572.             "choice": 1
  1573.           }
  1574.         }
  1575.       ],
  1576.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0": [
  1577.         {
  1578.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0",
  1579.           "timestamp": "2025-07-01T14:49:31.346003+00:00",
  1580.           "result": {
  1581.             "result": false
  1582.           }
  1583.         }
  1584.       ],
  1585.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0/conditions/0": [
  1586.         {
  1587.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0/conditions/0",
  1588.           "timestamp": "2025-07-01T14:49:31.351064+00:00",
  1589.           "result": {
  1590.             "result": true,
  1591.             "entities": []
  1592.           }
  1593.         }
  1594.       ],
  1595.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0/conditions/1": [
  1596.         {
  1597.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/0/conditions/1",
  1598.           "timestamp": "2025-07-01T14:49:31.361161+00:00",
  1599.           "result": {
  1600.             "result": false,
  1601.             "entities": []
  1602.           }
  1603.         }
  1604.       ],
  1605.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1": [
  1606.         {
  1607.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1",
  1608.           "timestamp": "2025-07-01T14:49:31.371081+00:00",
  1609.           "result": {
  1610.             "result": true
  1611.           }
  1612.         }
  1613.       ],
  1614.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/conditions/0": [
  1615.         {
  1616.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/conditions/0",
  1617.           "timestamp": "2025-07-01T14:49:31.376489+00:00",
  1618.           "result": {
  1619.             "result": true,
  1620.             "entities": []
  1621.           }
  1622.         }
  1623.       ],
  1624.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/conditions/1": [
  1625.         {
  1626.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/conditions/1",
  1627.           "timestamp": "2025-07-01T14:49:31.386937+00:00",
  1628.           "result": {
  1629.             "result": true,
  1630.             "entities": []
  1631.           }
  1632.         }
  1633.       ],
  1634.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/sequence/0": [
  1635.         {
  1636.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/0/choose/1/sequence/0",
  1637.           "timestamp": "2025-07-01T14:49:31.401285+00:00",
  1638.           "result": {
  1639.             "params": {
  1640.               "domain": "cover",
  1641.               "service": "open_cover",
  1642.               "service_data": {},
  1643.               "target": {
  1644.                 "entity_id": [
  1645.                   "cover.dg_rl_ank"
  1646.                 ]
  1647.               }
  1648.             },
  1649.             "running_script": false
  1650.           }
  1651.         }
  1652.       ],
  1653.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/1": [
  1654.         {
  1655.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/0/sequence/0/repeat/sequence/1",
  1656.           "timestamp": "2025-07-01T14:49:31.488349+00:00",
  1657.           "result": {
  1658.             "delay": 2,
  1659.             "done": true
  1660.           }
  1661.         }
  1662.       ],
  1663.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1": [
  1664.         {
  1665.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1",
  1666.           "timestamp": "2025-07-01T14:49:33.494681+00:00"
  1667.         }
  1668.       ],
  1669.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0": [
  1670.         {
  1671.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0",
  1672.           "timestamp": "2025-07-01T14:49:33.495668+00:00"
  1673.         }
  1674.       ],
  1675.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if": [
  1676.         {
  1677.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if",
  1678.           "timestamp": "2025-07-01T14:49:33.496472+00:00",
  1679.           "result": {
  1680.             "result": false
  1681.           }
  1682.         }
  1683.       ],
  1684.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if/condition/0": [
  1685.         {
  1686.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if/condition/0",
  1687.           "timestamp": "2025-07-01T14:49:33.497505+00:00",
  1688.           "result": {
  1689.             "result": true,
  1690.             "entities": []
  1691.           }
  1692.         }
  1693.       ],
  1694.       "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if/condition/1": [
  1695.         {
  1696.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/4/then/1/sequence/0/if/condition/1",
  1697.           "timestamp": "2025-07-01T14:49:33.499392+00:00",
  1698.           "result": {
  1699.             "result": false,
  1700.             "entities": []
  1701.           }
  1702.         }
  1703.       ],
  1704.       "action/4/choose/4/sequence/0/choose/4/sequence/5": [
  1705.         {
  1706.           "path": "action/4/choose/4/sequence/0/choose/4/sequence/5",
  1707.           "timestamp": "2025-07-01T14:49:33.503002+00:00",
  1708.           "result": {
  1709.             "choice": "default"
  1710.           }
  1711.         }
  1712.       ]
  1713.     },
  1714.     "config": {
  1715.       "trigger_variables": {
  1716.         "blind": "cover.dg_rl_ank",
  1717.         "open_position": 100,
  1718.         "close_position": 0,
  1719.         "ventilate_position": 99,
  1720.         "shading_position": 1,
  1721.         "position_tolerance": 0,
  1722.         "open_tilt_position": 50,
  1723.         "close_tilt_position": 50,
  1724.         "ventilate_tilt_position": 50,
  1725.         "shading_tilt_elevation_1": 20,
  1726.         "shading_tilt_elevation_2": 30,
  1727.         "shading_tilt_elevation_3": 48,
  1728.         "shading_tilt_position_0": 0,
  1729.         "shading_tilt_position_1": 20,
  1730.         "shading_tilt_position_2": 37,
  1731.         "shading_tilt_position_3": 50,
  1732.         "auto_options": [
  1733.           "auto_up_enabled",
  1734.           "auto_down_enabled",
  1735.           "auto_sun_enabled",
  1736.           "auto_shading_enabled",
  1737.           "auto_ventilate_enabled"
  1738.         ],
  1739.         "time_up_early": "07:00:00",
  1740.         "time_up_early_non_workday": "08:00:00",
  1741.         "time_up_late": "08:00:00",
  1742.         "time_up_late_non_workday": "09:00:00",
  1743.         "time_down_early": "20:00:00",
  1744.         "time_down_early_non_workday": "20:00:00",
  1745.         "time_down_late": "22:00:00",
  1746.         "time_down_late_non_workday": "22:00:00",
  1747.         "workday_sensor_today": "binary_sensor.workday_sensor",
  1748.         "workday_sensor_tomorrow": "binary_sensor.workday_sensor_tomorrow",
  1749.         "default_brightness_sensor": [],
  1750.         "brightness_up": 0,
  1751.         "brightness_down": 0,
  1752.         "default_sun_sensor": "sun.sun",
  1753.         "sun_elevation_up": 5,
  1754.         "sun_elevation_down": -6,
  1755.         "resident_sensor": [],
  1756.         "contact_window_tilted": [],
  1757.         "contact_window_opened": "binary_sensor.tfk_ank",
  1758.         "lockout_tilted_options": [
  1759.           "lockout_tilted_closing",
  1760.           "lockout_tilted_shading_start"
  1761.         ],
  1762.         "lockout_tilted_when_closing": "{{ 'lockout_tilted_closing' in lockout_tilted_options }}",
  1763.         "lockout_tilted_when_shading_starts": "{{ 'lockout_tilted_shading_start' in lockout_tilted_options }}",
  1764.         "lockout_tilted_when_shading_ends": "{{ 'lockout_tilted_shading_end' in lockout_tilted_options }}",
  1765.         "time_control": "time_control_input",
  1766.         "time_schedule_helper": [],
  1767.         "shading_brightness_sensor": "sensor.helligkeit_aussen",
  1768.         "shading_temperatur_sensor1": "sensor.dg_wt_sz_temperatur",
  1769.         "shading_temperatur_sensor2": "sensor.raspberrymatic_sv_wm_temperatur",
  1770.         "shading_min_temperatur1": 20,
  1771.         "shading_min_temperatur2": 22,
  1772.         "shading_temperature_hysteresis1": 0.2,
  1773.         "shading_temperature_hysteresis2": 0.2,
  1774.         "shading_azimuth_start": 150,
  1775.         "shading_azimuth_end": 330,
  1776.         "shading_elevation_min": 25,
  1777.         "shading_elevation_max": 90,
  1778.         "shading_sun_brightness_start": 35000,
  1779.         "shading_sun_brightness_end": 10000,
  1780.         "shading_forecast_sensor": [],
  1781.         "shading_forecast_type": "weather_attributes",
  1782.         "shading_forecast_temp": [],
  1783.         "shading_weather_conditions": [
  1784.           "sunny",
  1785.           "partlycloudy",
  1786.           "cloudy",
  1787.           "clear"
  1788.         ],
  1789.         "is_shading_enabled": "{{ 'auto_shading_enabled' in auto_options }}",
  1790.         "cover_tilt_config": "cover_tilt_disabled",
  1791.         "is_cover_tilt_enabled": "{{ 'cover_tilt_enabled' in cover_tilt_config }}",
  1792.         "is_up_enabled": "{{ 'auto_up_enabled' in auto_options }}",
  1793.         "is_down_enabled": "{{ 'auto_down_enabled' in auto_options }}",
  1794.         "is_brightness_enabled": "{{ 'auto_brightness_enabled' in auto_options }}",
  1795.         "is_sun_elevation_enabled": "{{ 'auto_sun_enabled' in auto_options }}",
  1796.         "is_ventilation_enabled": "{{ 'auto_ventilate_enabled' in auto_options }}",
  1797.         "is_time_field_enabled": "{{ 'time_control_input' in time_control }}",
  1798.         "is_schedule_helper_enabled": "{{ 'time_control_schedule' in time_control and time_schedule_helper != [] }}",
  1799.         "is_time_control_disabled": "{{ 'time_control_disabled' in time_control }}",
  1800.         "reset_override_config": "reset_disabled",
  1801.         "reset_override_time": "00:01:00",
  1802.         "reset_override_timeout": 5,
  1803.         "is_reset_disabled": "{{ 'reset_disabled' in reset_override_config }}",
  1804.         "is_reset_fixed_time": "{{ 'reset_fixed_time' in reset_override_config }}",
  1805.         "is_reset_timeout": "{{ 'reset_timeout' in reset_override_config }}",
  1806.         "cover_status_options": "cover_helper_enabled",
  1807.         "cover_status_helper": "input_text.cover_status_helper_ankleide"
  1808.       },
  1809.       "variables": {
  1810.         "version": "2025.06.19",
  1811.         "blind_entities": "{{ expand(blind) | map(attribute='entity_id') | list }}",
  1812.         "current_position": "{{ state_attr(blind, 'current_position') | int(default=101) }}",
  1813.         "current_tilt_position": "{{ state_attr(blind,'current_tilt_position') | int(default=101) }}",
  1814.         "current_sun_azimuth": "{{ state_attr(default_sun_sensor, 'azimuth') }}",
  1815.         "current_sun_elevation": "{{ state_attr(default_sun_sensor, 'elevation') }}",
  1816.         "is_today_off": "{{ workday_sensor_today != [] and is_state(workday_sensor_today, 'off') }}",
  1817.         "is_tomorrow_off": "{{ workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'off') }}",
  1818.         "is_tomorrow_on": "{{ workday_sensor_tomorrow != [] and is_state(workday_sensor_tomorrow, 'on') }}",
  1819.         "drive_delay_fix": 90,
  1820.         "drive_delay_random": 0,
  1821.         "drive_time": 90,
  1822.         "time_up_early_today": "{{ time_up_early_non_workday if is_today_off else time_up_early }}",
  1823.         "time_up_late_today": "{{ time_up_late_non_workday if is_today_off else time_up_late }}",
  1824.         "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}}",
  1825.         "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}}",
  1826.         "auto_up_force": [],
  1827.         "auto_down_force": [],
  1828.         "auto_ventilate_force": [],
  1829.         "auto_shading_start_force": [],
  1830.         "auto_up_force_disabled": "{{ auto_up_force == [] or (auto_up_force != [] and states(auto_up_force) in ['false', 'off']) }}",
  1831.         "auto_down_force_disabled": "{{ auto_down_force == [] or (auto_down_force != [] and states(auto_down_force) in ['false', 'off']) }}",
  1832.         "auto_ventilate_force_disabled": "{{ auto_ventilate_force == [] or (auto_ventilate_force != [] and states(auto_ventilate_force) in ['false', 'off']) }}",
  1833.         "auto_shading_start_force_disabled": "{{ auto_shading_start_force == [] or (auto_shading_start_force != [] and states(auto_shading_start_force) in ['false', 'off']) }}",
  1834.         "is_cover_tilt_enabled_and_possible": "{{ is_cover_tilt_enabled and state_attr(blind, 'current_tilt_position') != none }}",
  1835.         "cover_tilt_reposition_config": "cover_tilt_reposition_disabled",
  1836.         "is_cover_tilt_reposition_enabled": "{{ 'cover_tilt_reposition_enabled' in cover_tilt_reposition_config }}",
  1837.         "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 %}",
  1838.         "shading_waitingtime_start": 300,
  1839.         "shading_waitingtime_end": 600,
  1840.         "is_shading_end_immediate_by_sun_position": false,
  1841.         "shading_start_behavior": "trigger_periodic",
  1842.         "shading_end_behavior": "open_position",
  1843.         "start_shading_trigger_reset": "{{ 'trigger_reset' in shading_start_behavior }}",
  1844.         "start_shading_trigger_periodic": "{{ 'trigger_periodic' in shading_start_behavior }}",
  1845.         "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 ['', 'unknown', 'unavailable', 'none', []] and\n  states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\")\n}}",
  1846.         "helper_state_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",
  1847.         "is_helper_open": "{{ is_status_helper_enabled and (helper_state_json | regex_search('open')) and (helper_state_json.open.a | default(false) | bool) }}",
  1848.         "is_helper_closed": "{{ is_status_helper_enabled and (helper_state_json | regex_search('close')) and (helper_state_json.close.a | default(false) | bool) }}",
  1849.         "is_helper_shaded": "{{\n  'shading' in helper_state_json and\n  helper_state_json.shading.a | default(false) | bool and\n  not (helper_state_json.shading.p | default(false) | bool and\n      helper_state_json.shading.q | default(false) | bool)\n}}",
  1850.         "is_helper_shading_start": "{{ is_status_helper_enabled and (helper_state_json | regex_search('shading')) and (helper_state_json.shading.p | default(false) | bool) }}",
  1851.         "is_helper_shading_end": "{{ is_status_helper_enabled and (helper_state_json | regex_search('shading')) and (helper_state_json.shading.q | default(false) | bool) }}",
  1852.         "is_helper_vent_partial": "{{ is_status_helper_enabled and (helper_state_json | regex_search('vpart')) and (helper_state_json.vpart.a | default(false) | bool) }}",
  1853.         "is_helper_vent_full": "{{ is_status_helper_enabled and (helper_state_json | regex_search('vfull')) and (helper_state_json.vfull.a | default(false) | bool) }}",
  1854.         "is_helper_manual": "{{ is_status_helper_enabled and (helper_state_json | regex_search('manual')) and (helper_state_json.manual.a | default(false) | bool) }}",
  1855.         "ts_helper_open": "{{ helper_state_json.open.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('open'))) else 0 }}",
  1856.         "ts_helper_closed": "{{ helper_state_json.close.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('close'))) else 0 }}",
  1857.         "ts_helper_shaded": "{{ helper_state_json.shading.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('shading'))) else 0 }}",
  1858.         "ts_helper_vent_partial": "{{ helper_state_json.vpart.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('vpart'))) else 0 }}",
  1859.         "ts_helper_vent_full": "{{ helper_state_json.vfull.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('vfull'))) else 0 }}",
  1860.         "ts_helper_manual": "{{ helper_state_json.manual.t | default(0) if (is_status_helper_enabled and (helper_state_json | regex_search('manual'))) else 0 }}",
  1861.         "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)\n    or (is_cover_tilt_enabled_and_possible and current_tilt_position == open_tilt_position)\n  )\n}}",
  1862.         "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)\n    or (is_cover_tilt_enabled_and_possible and current_tilt_position == close_tilt_position)\n  )\n}}",
  1863.         "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)\n    or (current_tilt_position == shading_tilt_position)\n  )\n}}",
  1864.         "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)\n    or (current_tilt_position ==  ventilate_tilt_position)\n  )\n}}",
  1865.         "individual_config": [],
  1866.         "prevent_higher_position_closing": "{{ 'prevent_higher_position_closing' in individual_config }}",
  1867.         "prevent_lowering_when_closing_if_shaded": "{{ 'prevent_lowering_when_closing_if_shaded' in individual_config }}",
  1868.         "prevent_forecast_service": "{{ 'weather_attributes' in shading_forecast_type }}",
  1869.         "prevent_shading_end_if_closed": "{{ 'prevent_shading_end_if_closed' in individual_config }}",
  1870.         "prevent_opening_after_shading_end": "{{ 'prevent_opening_after_shading_end' in individual_config }}",
  1871.         "prevent_opening_after_ventilation_end": "{{ 'prevent_opening_after_ventilation_end' in individual_config }}",
  1872.         "prevent_default_cover_actions": "{{ 'prevent_default_cover_actions' in individual_config }}",
  1873.         "prevent_shading_multiple_times": "{{ 'prevent_shading_multiple_times' in individual_config }}",
  1874.         "prevent_opening_multiple_times": "{{ 'prevent_opening_multiple_times' in individual_config }}",
  1875.         "prevent_closing_multiple_times": "{{ 'prevent_closing_multiple_times' in individual_config }}",
  1876.         "resident_config": [],
  1877.         "resident_opening_enabled": "{{ 'resident_opening_enabled' in resident_config }}",
  1878.         "resident_closing_enabled": "{{ 'resident_closing_enabled' in resident_config }}",
  1879.         "resident_allow_shading": "{{ 'resident_allow_shading' in resident_config }}",
  1880.         "resident_allow_opening": "{{ 'resident_allow_opening' in resident_config }}",
  1881.         "resident_allow_ventilation": "{{ 'resident_allow_ventilation' in resident_config }}",
  1882.         "ignore_after_manual_config": [],
  1883.         "override_opening_after_manual": "{{ 'ignore_opening_after_manual' in ignore_after_manual_config }}",
  1884.         "override_closing_after_manual": "{{ 'ignore_closing_after_manual' in ignore_after_manual_config }}",
  1885.         "override_ventilation_after_manual": "{{ 'ignore_ventilation_after_manual' in ignore_after_manual_config }}",
  1886.         "override_shading_after_manual": "{{ 'ignore_shading_after_manual' in ignore_after_manual_config }}",
  1887.         "auto_ventilate_options": [],
  1888.         "ventilation_delay_enabled": "{{ 'ventilation_delay_enabled' in auto_ventilate_options }}",
  1889.         "ventilation_if_lower_enabled": "{{ 'ventilation_if_lower_enabled' in auto_ventilate_options }}",
  1890.         "ventilation_after_shading_end": "{{ 'ventilation_after_shading_end' in auto_ventilate_options }}",
  1891.         "check_config": false,
  1892.         "check_config_debuglevel": "info",
  1893.         "check_status_helper_length": "{{ state_attr(cover_status_helper, 'max') if is_status_helper_enabled else None }}"
  1894.       },
  1895.       "mode": "single",
  1896.       "max_exceeded": "silent",
  1897.       "triggers": [
  1898.         {
  1899.           "platform": "template",
  1900.           "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) }}",
  1901.           "enabled": "{{ is_time_field_enabled }}",
  1902.           "id": "t_open_1"
  1903.         },
  1904.         {
  1905.           "platform": "template",
  1906.           "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) }}",
  1907.           "enabled": "{{ is_time_field_enabled }}",
  1908.           "id": "t_open_2"
  1909.         },
  1910.         {
  1911.           "platform": "template",
  1912.           "value_template": "{{ states(time_schedule_helper) in ['true', 'on'] }}",
  1913.           "enabled": "{{ is_schedule_helper_enabled and time_schedule_helper != [] }}",
  1914.           "id": "t_open_3"
  1915.         },
  1916.         {
  1917.           "platform": "template",
  1918.           "value_template": "{{ states(default_brightness_sensor) | float(default=brightness_up) > brightness_up }}",
  1919.           "for": {
  1920.             "seconds": 30
  1921.           },
  1922.           "enabled": "{{ is_brightness_enabled and default_brightness_sensor != [] }}",
  1923.           "id": "t_open_4"
  1924.         },
  1925.         {
  1926.           "platform": "template",
  1927.           "value_template": "{{ state_attr(default_sun_sensor, 'elevation') | float(default=sun_elevation_up) > sun_elevation_up }}",
  1928.           "for": {
  1929.             "seconds": 30
  1930.           },
  1931.           "enabled": "{{ is_sun_elevation_enabled and default_sun_sensor != [] }}",
  1932.           "id": "t_open_5"
  1933.         },
  1934.         {
  1935.           "platform": "state",
  1936.           "entity_id": [],
  1937.           "from": "on",
  1938.           "to": "off",
  1939.           "id": "t_open_6"
  1940.         },
  1941.         {
  1942.           "platform": "state",
  1943.           "entity_id": [],
  1944.           "from": "off",
  1945.           "to": "on",
  1946.           "id": "t_force_open"
  1947.         },
  1948.         {
  1949.           "platform": "template",
  1950.           "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) }}",
  1951.           "enabled": "{{ is_time_field_enabled }}",
  1952.           "id": "t_close_1"
  1953.         },
  1954.         {
  1955.           "platform": "template",
  1956.           "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) }}",
  1957.           "enabled": "{{ is_time_field_enabled }}",
  1958.           "id": "t_close_2"
  1959.         },
  1960.         {
  1961.           "platform": "template",
  1962.           "value_template": "{{ states(time_schedule_helper) in ['false', 'off'] }}",
  1963.           "enabled": "{{ is_schedule_helper_enabled and time_schedule_helper != [] }}",
  1964.           "id": "t_close_3"
  1965.         },
  1966.         {
  1967.           "platform": "template",
  1968.           "value_template": "{{ states(default_brightness_sensor) | float(default=brightness_down) < brightness_down }}",
  1969.           "for": {
  1970.             "seconds": 30
  1971.           },
  1972.           "enabled": "{{ is_brightness_enabled and default_brightness_sensor != [] }}",
  1973.           "id": "t_close_4"
  1974.         },
  1975.         {
  1976.           "platform": "template",
  1977.           "value_template": "{{ state_attr(default_sun_sensor, 'elevation') | float(default=sun_elevation_down) < sun_elevation_down }}",
  1978.           "for": {
  1979.             "seconds": 30
  1980.           },
  1981.           "enabled": "{{ is_sun_elevation_enabled and default_sun_sensor != [] }}",
  1982.           "id": "t_close_5"
  1983.         },
  1984.         {
  1985.           "platform": "state",
  1986.           "entity_id": [],
  1987.           "from": "off",
  1988.           "to": "on",
  1989.           "id": "t_close_6"
  1990.         },
  1991.         {
  1992.           "platform": "state",
  1993.           "entity_id": [],
  1994.           "from": "off",
  1995.           "to": "on",
  1996.           "id": "t_force_close"
  1997.         },
  1998.         {
  1999.           "platform": "template",
  2000.           "value_template": "{{ states(contact_window_tilted) in ['true', 'on'] }}",
  2001.           "enabled": "{{ is_ventilation_enabled and contact_window_tilted != [] }}",
  2002.           "id": "t_contact_tilted_on",
  2003.           "for": {
  2004.             "seconds": 0
  2005.           }
  2006.         },
  2007.         {
  2008.           "platform": "template",
  2009.           "value_template": "{{ states(contact_window_tilted) in ['false', 'off'] }}",
  2010.           "enabled": "{{ is_ventilation_enabled and contact_window_tilted != [] }}",
  2011.           "id": "t_contact_tilted_off",
  2012.           "for": {
  2013.             "seconds": 0
  2014.           }
  2015.         },
  2016.         {
  2017.           "platform": "template",
  2018.           "value_template": "{{ states(contact_window_opened) in ['true', 'on'] }}",
  2019.           "enabled": "{{ is_ventilation_enabled and contact_window_opened != [] }}",
  2020.           "id": "t_contact_opened_on",
  2021.           "for": {
  2022.             "seconds": 0
  2023.           }
  2024.         },
  2025.         {
  2026.           "platform": "template",
  2027.           "value_template": "{{ states(contact_window_opened) in ['false', 'off'] }}",
  2028.           "enabled": "{{ is_ventilation_enabled and contact_window_opened != [] }}",
  2029.           "id": "t_contact_opened_off",
  2030.           "for": {
  2031.             "seconds": 0
  2032.           }
  2033.         },
  2034.         {
  2035.           "platform": "state",
  2036.           "entity_id": [],
  2037.           "from": "off",
  2038.           "to": "on",
  2039.           "id": "t_force_vent"
  2040.         },
  2041.         {
  2042.           "platform": "template",
  2043.           "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}}",
  2044.           "enabled": "{{ is_shading_enabled and default_sun_sensor != [] }}",
  2045.           "id": "t_shading_start_pending_1"
  2046.         },
  2047.         {
  2048.           "platform": "template",
  2049.           "value_template": "{{ states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > shading_sun_brightness_start }}",
  2050.           "enabled": "{{ is_shading_enabled and shading_brightness_sensor != [] }}",
  2051.           "id": "t_shading_start_pending_2"
  2052.         },
  2053.         {
  2054.           "platform": "template",
  2055.           "value_template": "{{ states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > shading_min_temperatur1 }}",
  2056.           "enabled": "{{ is_shading_enabled and shading_temperatur_sensor1 != [] }}",
  2057.           "id": "t_shading_start_pending_3"
  2058.         },
  2059.         {
  2060.           "platform": "template",
  2061.           "value_template": "{{ states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > shading_min_temperatur2 }}",
  2062.           "enabled": "{{ is_shading_enabled and shading_temperatur_sensor2 != [] }}",
  2063.           "id": "t_shading_start_pending_4"
  2064.         },
  2065.         {
  2066.           "platform": "template",
  2067.           "value_template": "{{ states(shading_forecast_sensor) in shading_weather_conditions }}",
  2068.           "enabled": "{{ is_shading_enabled and shading_forecast_sensor != [] }}",
  2069.           "id": "t_shading_start_pending_5"
  2070.         },
  2071.         {
  2072.           "platform": "template",
  2073.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none', []] and\n  states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n  states(cover_status_helper)|from_json|regex_search('shading') and\n  (states(cover_status_helper)|from_json).shading.p is defined and\n  (states(cover_status_helper)|from_json).shading.p > 0 and\n  now() >= ( (states(cover_status_helper)|from_json).shading.p) | as_datetime | as_local\n}}",
  2074.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] }}",
  2075.           "id": "t_shading_start_execution"
  2076.         },
  2077.         {
  2078.           "platform": "state",
  2079.           "entity_id": [],
  2080.           "from": "off",
  2081.           "to": "on",
  2082.           "id": "t_force_shading_start"
  2083.         },
  2084.         {
  2085.           "platform": "template",
  2086.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] 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}}",
  2087.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
  2088.           "id": "t_shading_tilt_1"
  2089.         },
  2090.         {
  2091.           "platform": "template",
  2092.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] 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}}",
  2093.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
  2094.           "id": "t_shading_tilt_2"
  2095.         },
  2096.         {
  2097.           "platform": "template",
  2098.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] 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}}",
  2099.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
  2100.           "id": "t_shading_tilt_3"
  2101.         },
  2102.         {
  2103.           "platform": "template",
  2104.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] 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}}",
  2105.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and is_cover_tilt_enabled and default_sun_sensor != [] }}",
  2106.           "id": "t_shading_tilt_4"
  2107.         },
  2108.         {
  2109.           "platform": "template",
  2110.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"p\"\\s*:\\s*0') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"q\"\\s*:\\s*0') and\n  states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) < (shading_min_temperatur1 - shading_temperature_hysteresis1)\n}}",
  2111.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_temperatur_sensor1 != [] }}",
  2112.           "id": "t_shading_end_pending_1"
  2113.         },
  2114.         {
  2115.           "platform": "template",
  2116.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"p\"\\s*:\\s*0') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"q\"\\s*:\\s*0') and\n  states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) < (shading_min_temperatur2 - shading_temperature_hysteresis2)\n}}",
  2117.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_temperatur_sensor2 != [] }}",
  2118.           "id": "t_shading_end_pending_2"
  2119.         },
  2120.         {
  2121.           "platform": "template",
  2122.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"p\"\\s*:\\s*0') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"q\"\\s*:\\s*0') and\n  states(shading_brightness_sensor) | float(default=shading_sun_brightness_end) < shading_sun_brightness_end\n}}",
  2123.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_brightness_sensor != [] }}",
  2124.           "id": "t_shading_end_pending_3"
  2125.         },
  2126.         {
  2127.           "platform": "template",
  2128.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"p\"\\s*:\\s*0') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"q\"\\s*:\\s*0') and\n  states(shading_forecast_sensor) not in shading_weather_conditions\n}}",
  2129.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and shading_weather_conditions != [] and shading_forecast_sensor != [] }}",
  2130.           "id": "t_shading_end_pending_4"
  2131.         },
  2132.         {
  2133.           "platform": "template",
  2134.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none'] and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"a\"\\s*:\\s*1') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"p\"\\s*:\\s*0') and\n  states(cover_status_helper) | regex_search('\"shading\"\\s*:\\s*\\{[^}]*\"q\"\\s*:\\s*0') and\n  (\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  )\n}}",
  2135.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] and default_sun_sensor != [] }}",
  2136.           "id": "t_shading_end_pending_5"
  2137.         },
  2138.         {
  2139.           "platform": "template",
  2140.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none', []] and\n  states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n  states(cover_status_helper)|from_json|regex_search('shading') and\n  (states(cover_status_helper)|from_json).shading.q is defined and\n  (states(cover_status_helper)|from_json).shading.q > 0 and\n  now() >= ( (states(cover_status_helper)|from_json).shading.q) | as_datetime | as_local\n}}",
  2141.           "enabled": "{{ is_shading_enabled and cover_status_helper != [] }}",
  2142.           "id": "t_shading_end_execution"
  2143.         },
  2144.         {
  2145.           "platform": "template",
  2146.           "value_template": "{{ now() >= today_at('23:55:00') }}",
  2147.           "id": "t_shading_reset",
  2148.           "enabled": "{{ is_shading_enabled }}"
  2149.         },
  2150.         {
  2151.           "platform": "state",
  2152.           "entity_id": "cover.dg_rl_ank",
  2153.           "attribute": "current_position",
  2154.           "id": "t_manual_1",
  2155.           "for": "00:01:00"
  2156.         },
  2157.         {
  2158.           "platform": "template",
  2159.           "value_template": "{{ now() >= today_at(reset_override_time) }}",
  2160.           "enabled": "{{ is_reset_fixed_time }}",
  2161.           "id": "t_manual_2",
  2162.           "for": "00:00:02"
  2163.         },
  2164.         {
  2165.           "platform": "template",
  2166.           "value_template": "{{\n  states(cover_status_helper) not in ['', 'unknown', 'unavailable', 'none', []] and\n  states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") and\n  states(cover_status_helper)|from_json|regex_search('manual') and\n  (states(cover_status_helper)|from_json).manual.t is defined and\n  (states(cover_status_helper)|from_json).manual.a is defined and\n  (states(cover_status_helper)|from_json).manual.a | bool is true and\n   now() >= ( (states(cover_status_helper)|from_json).manual.t + 60 * reset_override_timeout) | as_datetime | as_local\n }}",
  2167.           "enabled": "{{ is_reset_timeout and cover_status_helper != [] }}",
  2168.           "id": "t_manual_3",
  2169.           "for": "00:00:02"
  2170.         },
  2171.         {
  2172.           "platform": "state",
  2173.           "entity_id": "cover.dg_rl_ank",
  2174.           "attribute": "current_tilt_position",
  2175.           "id": "t_manual_4",
  2176.           "for": "00:01:00"
  2177.         }
  2178.       ],
  2179.       "conditions": [
  2180.         {
  2181.           "condition": [
  2182.             {
  2183.               "condition": "state",
  2184.               "entity_id": "input_boolean.rollo_automatik",
  2185.               "state": "on"
  2186.             }
  2187.           ]
  2188.         },
  2189.         {
  2190.           "or": [
  2191.             "{{ trigger.to_state is not defined }}",
  2192.             "{{ trigger.to_state is defined and trigger.to_state.state not in ['unavailable', 'unknown','none', 'query failed'] }}"
  2193.           ]
  2194.         }
  2195.       ],
  2196.       "actions": [
  2197.         {
  2198.           "variables": {
  2199.             "cover_move_action": {
  2200.               "sequence": [
  2201.                 {
  2202.                   "repeat": {
  2203.                     "for_each": "{{ blind_entities | list }}",
  2204.                     "sequence": [
  2205.                       {
  2206.                         "choose": [
  2207.                           {
  2208.                             "conditions": [
  2209.                               "{{ not prevent_default_cover_actions }}",
  2210.                               "{{ target_position | default(101)  == 0 }}"
  2211.                             ],
  2212.                             "sequence": [
  2213.                               {
  2214.                                 "alias": "Close Cover",
  2215.                                 "service": "cover.close_cover",
  2216.                                 "target": {
  2217.                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2218.                                 }
  2219.                               }
  2220.                             ]
  2221.                           },
  2222.                           {
  2223.                             "conditions": [
  2224.                               "{{ not prevent_default_cover_actions }}",
  2225.                               "{{ target_position | default(101) == 100 }}"
  2226.                             ],
  2227.                             "sequence": [
  2228.                               {
  2229.                                 "alias": "Open Cover",
  2230.                                 "service": "cover.open_cover",
  2231.                                 "target": {
  2232.                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2233.                                 }
  2234.                               }
  2235.                             ]
  2236.                           },
  2237.                           {
  2238.                             "conditions": [
  2239.                               "{{ not prevent_default_cover_actions }}",
  2240.                               "{{ target_position | default(101) not in [0, 100] }}"
  2241.                             ],
  2242.                             "sequence": [
  2243.                               {
  2244.                                 "alias": "Moving the cover to target position",
  2245.                                 "service": "cover.set_cover_position",
  2246.                                 "data": {
  2247.                                   "position": "{{ target_position | default(101) }}"
  2248.                                 },
  2249.                                 "target": {
  2250.                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2251.                                 }
  2252.                               }
  2253.                             ]
  2254.                           }
  2255.                         ]
  2256.                       },
  2257.                       {
  2258.                         "delay": {
  2259.                           "seconds": "{{ (range(1, 3) | random | int) }}"
  2260.                         }
  2261.                       }
  2262.                     ]
  2263.                   }
  2264.                 }
  2265.               ]
  2266.             },
  2267.             "tilt_move_action": {
  2268.               "sequence": [
  2269.                 {
  2270.                   "if": [
  2271.                     "{{ not prevent_default_cover_actions }}",
  2272.                     "{{ is_cover_tilt_enabled_and_possible }}",
  2273.                     "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  2274.                   ],
  2275.                   "then": [
  2276.                     {
  2277.                       "repeat": {
  2278.                         "for_each": "{{ blind_entities | list }}",
  2279.                         "sequence": [
  2280.                           {
  2281.                             "if": [
  2282.                               "{{ tilt_first | default(false) }}"
  2283.                             ],
  2284.                             "then": [
  2285.                               {
  2286.                                 "alias": "Reset Tilt",
  2287.                                 "service": "cover.set_cover_tilt_position",
  2288.                                 "data": {
  2289.                                   "tilt_position": 0
  2290.                                 },
  2291.                                 "target": {
  2292.                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2293.                                 }
  2294.                               },
  2295.                               {
  2296.                                 "delay": {
  2297.                                   "seconds": 0
  2298.                                 }
  2299.                               }
  2300.                             ]
  2301.                           },
  2302.                           {
  2303.                             "alias": "Tilt Delay",
  2304.                             "delay": {
  2305.                               "seconds": 0
  2306.                             }
  2307.                           },
  2308.                           {
  2309.                             "alias": "Moving the cover to tilt position",
  2310.                             "service": "cover.set_cover_tilt_position",
  2311.                             "data": {
  2312.                               "tilt_position": "{{ target_tilt_position | default(101) }}"
  2313.                             },
  2314.                             "target": {
  2315.                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2316.                             }
  2317.                           },
  2318.                           {
  2319.                             "delay": {
  2320.                               "seconds": "{{ (range(1, 3) | random | int) }}"
  2321.                             }
  2322.                           }
  2323.                         ]
  2324.                       }
  2325.                     }
  2326.                   ]
  2327.                 }
  2328.               ]
  2329.             },
  2330.             "helper_update": {
  2331.               "if": [
  2332.                 "{{ is_status_helper_enabled }}"
  2333.               ],
  2334.               "then": [
  2335.                 {
  2336.                   "alias": "Update cover status helper",
  2337.                   "service": "input_text.set_value",
  2338.                   "data": {
  2339.                     "entity_id": "input_text.cover_status_helper_ankleide",
  2340.                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  2341.                   }
  2342.                 }
  2343.               ]
  2344.             }
  2345.           }
  2346.         },
  2347.         {
  2348.           "if": [
  2349.             "{{ is_shading_enabled }}",
  2350.             "{{ not prevent_forecast_service }}",
  2351.             "{{ (shading_forecast_sensor != [] ) }}",
  2352.             "{{ states(shading_forecast_sensor) not in ['unavailable', 'unknown', 'query failed']  }}",
  2353.             "{{ trigger.id is defined }}",
  2354.             "{{ trigger.id | regex_match('^(t_shading_start|t_open_1|t_open_3)') }}",
  2355.             "{{ shading_forecast_sensor.startswith('weather.') }}"
  2356.           ],
  2357.           "then": [
  2358.             {
  2359.               "action": "weather.get_forecasts",
  2360.               "target": {
  2361.                 "entity_id": []
  2362.               },
  2363.               "data": {
  2364.                 "type": "weather_attributes"
  2365.               },
  2366.               "response_variable": "weather_forecast"
  2367.             }
  2368.           ]
  2369.         },
  2370.         {
  2371.           "if": [
  2372.             "{{ 'cover_helper_enabled' in cover_status_options }}",
  2373.             "{{ cover_status_helper != [] }}",
  2374.             {
  2375.               "or": [
  2376.                 "{{ states(cover_status_helper) in ['', 'unknown', 'unavailable', 'none'] }}",
  2377.                 "{{ not states(cover_status_helper) | regex_match(\"((\\[[^\\}]+)?\\{s*[^\\}\\{]{3,}?:.*\\}([^\\{]+\\])?)\") }}"
  2378.               ]
  2379.             }
  2380.           ],
  2381.           "then": [
  2382.             {
  2383.               "action": "input_text.set_value",
  2384.               "data": {
  2385.                 "entity_id": "input_text.cover_status_helper_ankleide",
  2386.                 "value": "{{ helper_state_json | to_json }}"
  2387.               }
  2388.             }
  2389.           ]
  2390.         },
  2391.         {
  2392.           "if": [
  2393.             "{{ is_status_helper_enabled }}",
  2394.             "{{ helper_state_json.v != 5 }}"
  2395.           ],
  2396.           "then": [
  2397.             {
  2398.               "variables": {
  2399.                 "update_values": {
  2400.                   "open": {
  2401.                     "a": "{{ is_helper_open|int }}",
  2402.                     "t": "{{ ts_helper_open }}"
  2403.                   },
  2404.                   "close": {
  2405.                     "a": "{{ is_helper_closed|int }}",
  2406.                     "t": "{{ ts_helper_closed }}"
  2407.                   },
  2408.                   "shading": {
  2409.                     "a": "{{ is_helper_shaded|int }}",
  2410.                     "t": "{{ ts_helper_shaded }}",
  2411.                     "p": 0,
  2412.                     "q": 0
  2413.                   },
  2414.                   "vpart": {
  2415.                     "a": "{{ is_helper_vent_partial|int }}",
  2416.                     "t": "{{ ts_helper_vent_partial }}"
  2417.                   },
  2418.                   "vfull": {
  2419.                     "a": "{{ is_helper_vent_full|int }}",
  2420.                     "t": "{{ ts_helper_vent_full }}"
  2421.                   },
  2422.                   "manual": {
  2423.                     "a": "{{ is_helper_manual|int }}",
  2424.                     "t": "{{ ts_helper_manual }}"
  2425.                   },
  2426.                   "v": 5,
  2427.                   "t": "{{ helper_state_json.t | round(0) }}"
  2428.                 }
  2429.               }
  2430.             },
  2431.             {
  2432.               "if": [
  2433.                 "{{ is_status_helper_enabled }}"
  2434.               ],
  2435.               "then": [
  2436.                 {
  2437.                   "alias": "Update cover status helper",
  2438.                   "data": {
  2439.                     "entity_id": "input_text.cover_status_helper_ankleide",
  2440.                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  2441.                   },
  2442.                   "action": "input_text.set_value"
  2443.                 }
  2444.               ]
  2445.             }
  2446.           ]
  2447.         },
  2448.         {
  2449.           "choose": [
  2450.             {
  2451.               "alias": "Check for opening",
  2452.               "conditions": [
  2453.                 "{{ is_up_enabled }}",
  2454.                 "{{ trigger.id is defined }}",
  2455.                 "{{ trigger.id | regex_match('^(t_open)') }}",
  2456.                 {
  2457.                   "condition": []
  2458.                 },
  2459.                 {
  2460.                   "and": [
  2461.                     "{{ auto_down_force_disabled }}",
  2462.                     "{{ auto_ventilate_force_disabled }}",
  2463.                     "{{ auto_shading_start_force_disabled }}"
  2464.                   ]
  2465.                 },
  2466.                 "{{ not (is_status_helper_enabled and is_helper_manual and override_opening_after_manual) }}",
  2467.                 {
  2468.                   "or": [
  2469.                     "{{ not is_status_helper_enabled }}",
  2470.                     "{{ not prevent_opening_multiple_times }}",
  2471.                     "{{ is_status_helper_enabled and prevent_opening_multiple_times and (now().day != ts_helper_open|timestamp_custom('%-d')|int) }}"
  2472.                   ]
  2473.                 },
  2474.                 {
  2475.                   "or": [
  2476.                     "{{ trigger.id != 't_open_6' }}",
  2477.                     "{{ trigger.id == 't_open_6' and resident_opening_enabled }}"
  2478.                   ]
  2479.                 },
  2480.                 {
  2481.                   "or": [
  2482.                     "{{ resident_sensor == [] }}",
  2483.                     "{{ states(resident_sensor) in ['false', 'off'] }}",
  2484.                     {
  2485.                       "and": [
  2486.                         "{{ resident_allow_opening }}",
  2487.                         "{{ states(resident_sensor) in ['true', 'on'] }}"
  2488.                       ]
  2489.                     }
  2490.                   ]
  2491.                 },
  2492.                 {
  2493.                   "or": [
  2494.                     {
  2495.                       "and": [
  2496.                         "{{ is_time_control_disabled }}"
  2497.                       ]
  2498.                     },
  2499.                     {
  2500.                       "and": [
  2501.                         "{{ is_time_field_enabled }}",
  2502.                         "{{ now() >= today_at(time_up_late_today) }}",
  2503.                         "{{ now() <= today_at(time_down_late_today) - timedelta(seconds = 5) }}"
  2504.                       ]
  2505.                     },
  2506.                     {
  2507.                       "and": [
  2508.                         "{{ is_schedule_helper_enabled }}",
  2509.                         "{{ time_schedule_helper != [] }}",
  2510.                         "{{ not is_brightness_enabled }}",
  2511.                         "{{ not is_sun_elevation_enabled }}",
  2512.                         "{{ is_state(time_schedule_helper, 'on') }}",
  2513.                         "{{ trigger.id in ['t_open_3', 't_open_6'] }}"
  2514.                       ]
  2515.                     },
  2516.                     {
  2517.                       "and": [
  2518.                         {
  2519.                           "or": [
  2520.                             {
  2521.                               "and": [
  2522.                                 "{{ is_time_control_disabled }}"
  2523.                               ]
  2524.                             },
  2525.                             {
  2526.                               "and": [
  2527.                                 "{{ is_time_field_enabled }}",
  2528.                                 "{{ now() >= today_at(time_up_early_today) }}",
  2529.                                 "{{ now() <= today_at(time_up_late_today) + timedelta(seconds = 5) }}"
  2530.                               ]
  2531.                             },
  2532.                             {
  2533.                               "and": [
  2534.                                 "{{ is_schedule_helper_enabled }}",
  2535.                                 "{{ time_schedule_helper != [] }}",
  2536.                                 "{{ is_state(time_schedule_helper, 'on') }}",
  2537.                                 "{{ now() >= today_at([time_up_early, time_up_early_non_workday] | min) - timedelta(seconds = 5) }}",
  2538.                                 "{{ now() <= today_at([time_up_late, time_up_late_non_workday] | max) + timedelta(seconds = 5) }}"
  2539.                               ]
  2540.                             }
  2541.                           ]
  2542.                         },
  2543.                         {
  2544.                           "or": [
  2545.                             {
  2546.                               "or": [
  2547.                                 "{{ is_brightness_enabled and default_brightness_sensor == [] }}",
  2548.                                 "{{ is_brightness_enabled and default_brightness_sensor != [] and (states(default_brightness_sensor) | float(default=brightness_up) > brightness_up) }}"
  2549.                               ]
  2550.                             },
  2551.                             {
  2552.                               "or": [
  2553.                                 "{{ is_sun_elevation_enabled and default_sun_sensor == [] }}",
  2554.                                 "{{ is_sun_elevation_enabled and default_sun_sensor != [] and (current_sun_elevation | float(default=sun_elevation_up) > sun_elevation_up) }}"
  2555.                               ]
  2556.                             }
  2557.                           ]
  2558.                         }
  2559.                       ]
  2560.                     }
  2561.                   ]
  2562.                 }
  2563.               ],
  2564.               "sequence": [
  2565.                 {
  2566.                   "delay": {
  2567.                     "seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
  2568.                   }
  2569.                 },
  2570.                 {
  2571.                   "choose": [
  2572.                     {
  2573.                       "alias": "Shading detected. Move to shading position",
  2574.                       "conditions": [
  2575.                         "{{ is_status_helper_enabled }}",
  2576.                         "{{ is_helper_shaded }}",
  2577.                         "{{ not in_shading_position }}"
  2578.                       ],
  2579.                       "sequence": [
  2580.                         {
  2581.                           "choose": [],
  2582.                           "default": []
  2583.                         },
  2584.                         {
  2585.                           "variables": {
  2586.                             "target_position": 1,
  2587.                             "target_tilt_position": "{{ shading_tilt_position | int }}",
  2588.                             "update_values": {
  2589.                               "open": {
  2590.                                 "a": 1,
  2591.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  2592.                               },
  2593.                               "close": {
  2594.                                 "a": 0,
  2595.                                 "t": "{{ helper_state_json.close.t }}"
  2596.                               },
  2597.                               "shading": {
  2598.                                 "a": 1,
  2599.                                 "t": "{{ helper_state_json.shading.t }}",
  2600.                                 "p": 0,
  2601.                                 "q": 0
  2602.                               },
  2603.                               "vpart": {
  2604.                                 "a": 0,
  2605.                                 "t": "{{ helper_state_json.vpart.t }}"
  2606.                               },
  2607.                               "vfull": {
  2608.                                 "a": 0,
  2609.                                 "t": "{{ helper_state_json.vfull.t }}"
  2610.                               },
  2611.                               "manual": {
  2612.                                 "a": 0,
  2613.                                 "t": "{{ helper_state_json.manual.t }}"
  2614.                               },
  2615.                               "t": "{{ as_timestamp(now()) | round(0) }}"
  2616.                             }
  2617.                           }
  2618.                         },
  2619.                         {
  2620.                           "sequence": [
  2621.                             {
  2622.                               "repeat": {
  2623.                                 "for_each": "{{ blind_entities | list }}",
  2624.                                 "sequence": [
  2625.                                   {
  2626.                                     "choose": [
  2627.                                       {
  2628.                                         "conditions": [
  2629.                                           "{{ not prevent_default_cover_actions }}",
  2630.                                           "{{ target_position | default(101)  == 0 }}"
  2631.                                         ],
  2632.                                         "sequence": [
  2633.                                           {
  2634.                                             "alias": "Close Cover",
  2635.                                             "target": {
  2636.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2637.                                             },
  2638.                                             "action": "cover.close_cover"
  2639.                                           }
  2640.                                         ]
  2641.                                       },
  2642.                                       {
  2643.                                         "conditions": [
  2644.                                           "{{ not prevent_default_cover_actions }}",
  2645.                                           "{{ target_position | default(101) == 100 }}"
  2646.                                         ],
  2647.                                         "sequence": [
  2648.                                           {
  2649.                                             "alias": "Open Cover",
  2650.                                             "target": {
  2651.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2652.                                             },
  2653.                                             "action": "cover.open_cover"
  2654.                                           }
  2655.                                         ]
  2656.                                       },
  2657.                                       {
  2658.                                         "conditions": [
  2659.                                           "{{ not prevent_default_cover_actions }}",
  2660.                                           "{{ target_position | default(101) not in [0, 100] }}"
  2661.                                         ],
  2662.                                         "sequence": [
  2663.                                           {
  2664.                                             "alias": "Moving the cover to target position",
  2665.                                             "data": {
  2666.                                               "position": "{{ target_position | default(101) }}"
  2667.                                             },
  2668.                                             "target": {
  2669.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2670.                                             },
  2671.                                             "action": "cover.set_cover_position"
  2672.                                           }
  2673.                                         ]
  2674.                                       }
  2675.                                     ]
  2676.                                   },
  2677.                                   {
  2678.                                     "delay": {
  2679.                                       "seconds": "{{ (range(1, 3) | random | int) }}"
  2680.                                     }
  2681.                                   }
  2682.                                 ]
  2683.                               }
  2684.                             }
  2685.                           ]
  2686.                         },
  2687.                         {
  2688.                           "sequence": [
  2689.                             {
  2690.                               "if": [
  2691.                                 "{{ not prevent_default_cover_actions }}",
  2692.                                 "{{ is_cover_tilt_enabled_and_possible }}",
  2693.                                 "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  2694.                               ],
  2695.                               "then": [
  2696.                                 {
  2697.                                   "repeat": {
  2698.                                     "for_each": "{{ blind_entities | list }}",
  2699.                                     "sequence": [
  2700.                                       {
  2701.                                         "if": [
  2702.                                           "{{ tilt_first | default(false) }}"
  2703.                                         ],
  2704.                                         "then": [
  2705.                                           {
  2706.                                             "alias": "Reset Tilt",
  2707.                                             "data": {
  2708.                                               "tilt_position": 0
  2709.                                             },
  2710.                                             "target": {
  2711.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2712.                                             },
  2713.                                             "action": "cover.set_cover_tilt_position"
  2714.                                           },
  2715.                                           {
  2716.                                             "delay": {
  2717.                                               "seconds": 0
  2718.                                             }
  2719.                                           }
  2720.                                         ]
  2721.                                       },
  2722.                                       {
  2723.                                         "alias": "Tilt Delay",
  2724.                                         "delay": {
  2725.                                           "seconds": 0
  2726.                                         }
  2727.                                       },
  2728.                                       {
  2729.                                         "alias": "Moving the cover to tilt position",
  2730.                                         "data": {
  2731.                                           "tilt_position": "{{ target_tilt_position | default(101) }}"
  2732.                                         },
  2733.                                         "target": {
  2734.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2735.                                         },
  2736.                                         "action": "cover.set_cover_tilt_position"
  2737.                                       },
  2738.                                       {
  2739.                                         "delay": {
  2740.                                           "seconds": "{{ (range(1, 3) | random | int) }}"
  2741.                                         }
  2742.                                       }
  2743.                                     ]
  2744.                                   }
  2745.                                 }
  2746.                               ]
  2747.                             }
  2748.                           ]
  2749.                         },
  2750.                         {
  2751.                           "if": [
  2752.                             "{{ is_status_helper_enabled }}"
  2753.                           ],
  2754.                           "then": [
  2755.                             {
  2756.                               "alias": "Update cover status helper",
  2757.                               "data": {
  2758.                                 "entity_id": "input_text.cover_status_helper_ankleide",
  2759.                                 "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  2760.                               },
  2761.                               "action": "input_text.set_value"
  2762.                             }
  2763.                           ]
  2764.                         },
  2765.                         {
  2766.                           "choose": [],
  2767.                           "default": []
  2768.                         }
  2769.                       ]
  2770.                     },
  2771.                     {
  2772.                       "alias": "Normal opening of the cover",
  2773.                       "conditions": [
  2774.                         "{{ not in_shading_position }}",
  2775.                         {
  2776.                           "or": [
  2777.                             "{{ is_status_helper_enabled and not is_helper_open }}",
  2778.                             "{{ not in_open_position }}"
  2779.                           ]
  2780.                         }
  2781.                       ],
  2782.                       "sequence": [
  2783.                         {
  2784.                           "choose": [],
  2785.                           "default": []
  2786.                         },
  2787.                         {
  2788.                           "variables": {
  2789.                             "target_position": 100,
  2790.                             "target_tilt_position": "{{ open_tilt_position | int }}",
  2791.                             "update_values": {
  2792.                               "open": {
  2793.                                 "a": 1,
  2794.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  2795.                               },
  2796.                               "close": {
  2797.                                 "a": 0,
  2798.                                 "t": "{{ helper_state_json.close.t }}"
  2799.                               },
  2800.                               "shading": {
  2801.                                 "a": 0,
  2802.                                 "t": "{{ helper_state_json.shading.t }}",
  2803.                                 "p": 0,
  2804.                                 "q": 0
  2805.                               },
  2806.                               "vpart": {
  2807.                                 "a": 0,
  2808.                                 "t": "{{ helper_state_json.vpart.t }}"
  2809.                               },
  2810.                               "vfull": {
  2811.                                 "a": 0,
  2812.                                 "t": "{{ helper_state_json.vfull.t }}"
  2813.                               },
  2814.                               "manual": {
  2815.                                 "a": 0,
  2816.                                 "t": "{{ helper_state_json.manual.t }}"
  2817.                               },
  2818.                               "t": "{{ as_timestamp(now()) | round(0) }}"
  2819.                             }
  2820.                           }
  2821.                         },
  2822.                         {
  2823.                           "sequence": [
  2824.                             {
  2825.                               "repeat": {
  2826.                                 "for_each": "{{ blind_entities | list }}",
  2827.                                 "sequence": [
  2828.                                   {
  2829.                                     "choose": [
  2830.                                       {
  2831.                                         "conditions": [
  2832.                                           "{{ not prevent_default_cover_actions }}",
  2833.                                           "{{ target_position | default(101)  == 0 }}"
  2834.                                         ],
  2835.                                         "sequence": [
  2836.                                           {
  2837.                                             "alias": "Close Cover",
  2838.                                             "target": {
  2839.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2840.                                             },
  2841.                                             "action": "cover.close_cover"
  2842.                                           }
  2843.                                         ]
  2844.                                       },
  2845.                                       {
  2846.                                         "conditions": [
  2847.                                           "{{ not prevent_default_cover_actions }}",
  2848.                                           "{{ target_position | default(101) == 100 }}"
  2849.                                         ],
  2850.                                         "sequence": [
  2851.                                           {
  2852.                                             "alias": "Open Cover",
  2853.                                             "target": {
  2854.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2855.                                             },
  2856.                                             "action": "cover.open_cover"
  2857.                                           }
  2858.                                         ]
  2859.                                       },
  2860.                                       {
  2861.                                         "conditions": [
  2862.                                           "{{ not prevent_default_cover_actions }}",
  2863.                                           "{{ target_position | default(101) not in [0, 100] }}"
  2864.                                         ],
  2865.                                         "sequence": [
  2866.                                           {
  2867.                                             "alias": "Moving the cover to target position",
  2868.                                             "data": {
  2869.                                               "position": "{{ target_position | default(101) }}"
  2870.                                             },
  2871.                                             "target": {
  2872.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2873.                                             },
  2874.                                             "action": "cover.set_cover_position"
  2875.                                           }
  2876.                                         ]
  2877.                                       }
  2878.                                     ]
  2879.                                   },
  2880.                                   {
  2881.                                     "delay": {
  2882.                                       "seconds": "{{ (range(1, 3) | random | int) }}"
  2883.                                     }
  2884.                                   }
  2885.                                 ]
  2886.                               }
  2887.                             }
  2888.                           ]
  2889.                         },
  2890.                         {
  2891.                           "sequence": [
  2892.                             {
  2893.                               "if": [
  2894.                                 "{{ not prevent_default_cover_actions }}",
  2895.                                 "{{ is_cover_tilt_enabled_and_possible }}",
  2896.                                 "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  2897.                               ],
  2898.                               "then": [
  2899.                                 {
  2900.                                   "repeat": {
  2901.                                     "for_each": "{{ blind_entities | list }}",
  2902.                                     "sequence": [
  2903.                                       {
  2904.                                         "if": [
  2905.                                           "{{ tilt_first | default(false) }}"
  2906.                                         ],
  2907.                                         "then": [
  2908.                                           {
  2909.                                             "alias": "Reset Tilt",
  2910.                                             "data": {
  2911.                                               "tilt_position": 0
  2912.                                             },
  2913.                                             "target": {
  2914.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2915.                                             },
  2916.                                             "action": "cover.set_cover_tilt_position"
  2917.                                           },
  2918.                                           {
  2919.                                             "delay": {
  2920.                                               "seconds": 0
  2921.                                             }
  2922.                                           }
  2923.                                         ]
  2924.                                       },
  2925.                                       {
  2926.                                         "alias": "Tilt Delay",
  2927.                                         "delay": {
  2928.                                           "seconds": 0
  2929.                                         }
  2930.                                       },
  2931.                                       {
  2932.                                         "alias": "Moving the cover to tilt position",
  2933.                                         "data": {
  2934.                                           "tilt_position": "{{ target_tilt_position | default(101) }}"
  2935.                                         },
  2936.                                         "target": {
  2937.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  2938.                                         },
  2939.                                         "action": "cover.set_cover_tilt_position"
  2940.                                       },
  2941.                                       {
  2942.                                         "delay": {
  2943.                                           "seconds": "{{ (range(1, 3) | random | int) }}"
  2944.                                         }
  2945.                                       }
  2946.                                     ]
  2947.                                   }
  2948.                                 }
  2949.                               ]
  2950.                             }
  2951.                           ]
  2952.                         },
  2953.                         {
  2954.                           "if": [
  2955.                             "{{ is_status_helper_enabled }}"
  2956.                           ],
  2957.                           "then": [
  2958.                             {
  2959.                               "alias": "Update cover status helper",
  2960.                               "data": {
  2961.                                 "entity_id": "input_text.cover_status_helper_ankleide",
  2962.                                 "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  2963.                               },
  2964.                               "action": "input_text.set_value"
  2965.                             }
  2966.                           ]
  2967.                         },
  2968.                         {
  2969.                           "choose": [],
  2970.                           "default": []
  2971.                         }
  2972.                       ]
  2973.                     }
  2974.                   ]
  2975.                 }
  2976.               ]
  2977.             },
  2978.             {
  2979.               "alias": "Check for closing cover",
  2980.               "conditions": [
  2981.                 "{{ is_down_enabled }}",
  2982.                 "{{ trigger.id is defined }}",
  2983.                 "{{ trigger.id | regex_match('^(t_close)') }}",
  2984.                 {
  2985.                   "condition": []
  2986.                 },
  2987.                 {
  2988.                   "and": [
  2989.                     "{{ auto_up_force_disabled }}",
  2990.                     "{{ auto_ventilate_force_disabled }}",
  2991.                     "{{ auto_shading_start_force_disabled }}"
  2992.                   ]
  2993.                 },
  2994.                 {
  2995.                   "or": [
  2996.                     "{{ is_status_helper_enabled and not is_helper_closed }}",
  2997.                     "{{ not in_close_position }}"
  2998.                   ]
  2999.                 },
  3000.                 "{{ not (is_status_helper_enabled and is_helper_manual and override_closing_after_manual) }}",
  3001.                 {
  3002.                   "or": [
  3003.                     "{{ not is_status_helper_enabled }}",
  3004.                     "{{ not prevent_closing_multiple_times }}",
  3005.                     "{{ is_status_helper_enabled and prevent_closing_multiple_times and (ts_helper_closed < today_at(time_down_early_today) | as_timestamp) }}"
  3006.                   ]
  3007.                 },
  3008.                 {
  3009.                   "or": [
  3010.                     {
  3011.                       "and": [
  3012.                         "{{ is_time_control_disabled }}"
  3013.                       ]
  3014.                     },
  3015.                     {
  3016.                       "and": [
  3017.                         "{{ is_time_field_enabled }}",
  3018.                         "{{ now() >= today_at(time_down_late_today) }}"
  3019.                       ]
  3020.                     },
  3021.                     {
  3022.                       "and": [
  3023.                         "{{ is_schedule_helper_enabled }}",
  3024.                         "{{ time_schedule_helper != [] }}",
  3025.                         "{{ is_state(time_schedule_helper, 'off') }}",
  3026.                         "{{ trigger.id == 't_close_3' }}"
  3027.                       ]
  3028.                     },
  3029.                     {
  3030.                       "and": [
  3031.                         {
  3032.                           "or": [
  3033.                             {
  3034.                               "and": [
  3035.                                 "{{ is_time_control_disabled }}"
  3036.                               ]
  3037.                             },
  3038.                             {
  3039.                               "and": [
  3040.                                 "{{ is_time_field_enabled }}",
  3041.                                 "{{ now() >= today_at(time_down_early_today) }}",
  3042.                                 "{{ now() <= today_at(time_down_late_today) + timedelta(seconds = 5) }}"
  3043.                               ]
  3044.                             },
  3045.                             {
  3046.                               "and": [
  3047.                                 "{{ is_schedule_helper_enabled }}",
  3048.                                 "{{ time_schedule_helper != [] }}",
  3049.                                 "{{ is_state(time_schedule_helper, 'on') }}",
  3050.                                 "{{ now() >= today_at([time_down_early, time_down_early_non_workday] | min) - timedelta(seconds = 5) }}",
  3051.                                 "{{ now() <= today_at([time_down_late, time_down_late_non_workday] | max) + timedelta(seconds = 5) }}"
  3052.                               ]
  3053.                             }
  3054.                           ]
  3055.                         },
  3056.                         {
  3057.                           "or": [
  3058.                             {
  3059.                               "or": [
  3060.                                 "{{ is_brightness_enabled and default_brightness_sensor == [] }}",
  3061.                                 "{{ is_brightness_enabled and default_brightness_sensor != [] and (states(default_brightness_sensor) | float(default=brightness_down) < brightness_down) }}"
  3062.                               ]
  3063.                             },
  3064.                             {
  3065.                               "or": [
  3066.                                 "{{ is_sun_elevation_enabled and default_sun_sensor == [] }}",
  3067.                                 "{{ is_sun_elevation_enabled and default_sun_sensor != [] and (current_sun_elevation | float(default=sun_elevation_down) < sun_elevation_down) }}"
  3068.                               ]
  3069.                             }
  3070.                           ]
  3071.                         }
  3072.                       ]
  3073.                     },
  3074.                     {
  3075.                       "and": [
  3076.                         "{{ trigger.id == 't_close_6' }}",
  3077.                         "{{ resident_sensor != [] }}",
  3078.                         "{{ states(resident_sensor) in ['true', 'on'] }}",
  3079.                         "{{ resident_closing_enabled }}"
  3080.                       ]
  3081.                     }
  3082.                   ]
  3083.                 }
  3084.               ],
  3085.               "sequence": [
  3086.                 {
  3087.                   "choose": [
  3088.                     {
  3089.                       "alias": "Lockout protection when closing",
  3090.                       "conditions": [
  3091.                         "{{ is_ventilation_enabled }}",
  3092.                         "{{ is_status_helper_enabled }}",
  3093.                         {
  3094.                           "or": [
  3095.                             {
  3096.                               "and": [
  3097.                                 "{{ contact_window_opened != [] }}",
  3098.                                 "{{ states(contact_window_opened) in ['true', 'on'] }}"
  3099.                               ]
  3100.                             },
  3101.                             {
  3102.                               "and": [
  3103.                                 "{{ lockout_tilted_when_closing }}",
  3104.                                 "{{ contact_window_tilted != [] }}",
  3105.                                 "{{ states(contact_window_tilted) in ['true', 'on'] }}"
  3106.                               ]
  3107.                             }
  3108.                           ]
  3109.                         }
  3110.                       ],
  3111.                       "sequence": [
  3112.                         {
  3113.                           "variables": {
  3114.                             "update_values": {
  3115.                               "open": {
  3116.                                 "a": 0,
  3117.                                 "t": "{{ helper_state_json.open.t }}"
  3118.                               },
  3119.                               "close": {
  3120.                                 "a": 1,
  3121.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  3122.                               },
  3123.                               "shading": {
  3124.                                 "a": 0,
  3125.                                 "t": "{{ helper_state_json.shading.t }}",
  3126.                                 "p": 0,
  3127.                                 "q": 0
  3128.                               },
  3129.                               "vpart": {
  3130.                                 "a": 0,
  3131.                                 "t": "{{ helper_state_json.vpart.t }}"
  3132.                               },
  3133.                               "vfull": {
  3134.                                 "a": 1,
  3135.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  3136.                               },
  3137.                               "manual": {
  3138.                                 "a": 0,
  3139.                                 "t": "{{ helper_state_json.manual.t }}"
  3140.                               },
  3141.                               "t": "{{ as_timestamp(now()) | round(0) }}"
  3142.                             }
  3143.                           }
  3144.                         },
  3145.                         {
  3146.                           "if": [
  3147.                             "{{ is_status_helper_enabled }}"
  3148.                           ],
  3149.                           "then": [
  3150.                             {
  3151.                               "alias": "Update cover status helper",
  3152.                               "data": {
  3153.                                 "entity_id": "input_text.cover_status_helper_ankleide",
  3154.                                 "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3155.                               },
  3156.                               "action": "input_text.set_value"
  3157.                             }
  3158.                           ]
  3159.                         }
  3160.                       ]
  3161.                     },
  3162.                     {
  3163.                       "alias": "Window tilted. No lockout. Move to ventilation position instead of closing",
  3164.                       "conditions": [
  3165.                         "{{ is_ventilation_enabled }}",
  3166.                         "{{ is_status_helper_enabled }}",
  3167.                         "{{ contact_window_tilted != [] }}",
  3168.                         "{{ states(contact_window_tilted) in ['true', 'on'] }}",
  3169.                         "{{ not lockout_tilted_when_closing }}",
  3170.                         {
  3171.                           "or": [
  3172.                             "{{ contact_window_opened == [] }}",
  3173.                             "{{ states(contact_window_opened) in ['false', 'off'] }}"
  3174.                           ]
  3175.                         }
  3176.                       ],
  3177.                       "sequence": [
  3178.                         {
  3179.                           "choose": [],
  3180.                           "default": []
  3181.                         },
  3182.                         {
  3183.                           "delay": {
  3184.                             "seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
  3185.                           }
  3186.                         },
  3187.                         {
  3188.                           "variables": {
  3189.                             "target_position": 99,
  3190.                             "target_tilt_position": 50,
  3191.                             "update_values": {
  3192.                               "open": {
  3193.                                 "a": 0,
  3194.                                 "t": "{{ helper_state_json.open.t }}"
  3195.                               },
  3196.                               "close": {
  3197.                                 "a": 1,
  3198.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  3199.                               },
  3200.                               "shading": {
  3201.                                 "a": 0,
  3202.                                 "t": "{{ helper_state_json.shading.t }}",
  3203.                                 "p": 0,
  3204.                                 "q": 0
  3205.                               },
  3206.                               "vpart": {
  3207.                                 "a": 1,
  3208.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  3209.                               },
  3210.                               "vfull": {
  3211.                                 "a": 0,
  3212.                                 "t": "{{ helper_state_json.vfull.t }}"
  3213.                               },
  3214.                               "manual": {
  3215.                                 "a": 0,
  3216.                                 "t": "{{ helper_state_json.manual.t }}"
  3217.                               },
  3218.                               "t": "{{ as_timestamp(now()) | round(0) }}"
  3219.                             }
  3220.                           }
  3221.                         },
  3222.                         {
  3223.                           "sequence": [
  3224.                             {
  3225.                               "repeat": {
  3226.                                 "for_each": "{{ blind_entities | list }}",
  3227.                                 "sequence": [
  3228.                                   {
  3229.                                     "choose": [
  3230.                                       {
  3231.                                         "conditions": [
  3232.                                           "{{ not prevent_default_cover_actions }}",
  3233.                                           "{{ target_position | default(101)  == 0 }}"
  3234.                                         ],
  3235.                                         "sequence": [
  3236.                                           {
  3237.                                             "alias": "Close Cover",
  3238.                                             "target": {
  3239.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3240.                                             },
  3241.                                             "action": "cover.close_cover"
  3242.                                           }
  3243.                                         ]
  3244.                                       },
  3245.                                       {
  3246.                                         "conditions": [
  3247.                                           "{{ not prevent_default_cover_actions }}",
  3248.                                           "{{ target_position | default(101) == 100 }}"
  3249.                                         ],
  3250.                                         "sequence": [
  3251.                                           {
  3252.                                             "alias": "Open Cover",
  3253.                                             "target": {
  3254.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3255.                                             },
  3256.                                             "action": "cover.open_cover"
  3257.                                           }
  3258.                                         ]
  3259.                                       },
  3260.                                       {
  3261.                                         "conditions": [
  3262.                                           "{{ not prevent_default_cover_actions }}",
  3263.                                           "{{ target_position | default(101) not in [0, 100] }}"
  3264.                                         ],
  3265.                                         "sequence": [
  3266.                                           {
  3267.                                             "alias": "Moving the cover to target position",
  3268.                                             "data": {
  3269.                                               "position": "{{ target_position | default(101) }}"
  3270.                                             },
  3271.                                             "target": {
  3272.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3273.                                             },
  3274.                                             "action": "cover.set_cover_position"
  3275.                                           }
  3276.                                         ]
  3277.                                       }
  3278.                                     ]
  3279.                                   },
  3280.                                   {
  3281.                                     "delay": {
  3282.                                       "seconds": "{{ (range(1, 3) | random | int) }}"
  3283.                                     }
  3284.                                   }
  3285.                                 ]
  3286.                               }
  3287.                             }
  3288.                           ]
  3289.                         },
  3290.                         {
  3291.                           "sequence": [
  3292.                             {
  3293.                               "if": [
  3294.                                 "{{ not prevent_default_cover_actions }}",
  3295.                                 "{{ is_cover_tilt_enabled_and_possible }}",
  3296.                                 "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  3297.                               ],
  3298.                               "then": [
  3299.                                 {
  3300.                                   "repeat": {
  3301.                                     "for_each": "{{ blind_entities | list }}",
  3302.                                     "sequence": [
  3303.                                       {
  3304.                                         "if": [
  3305.                                           "{{ tilt_first | default(false) }}"
  3306.                                         ],
  3307.                                         "then": [
  3308.                                           {
  3309.                                             "alias": "Reset Tilt",
  3310.                                             "data": {
  3311.                                               "tilt_position": 0
  3312.                                             },
  3313.                                             "target": {
  3314.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3315.                                             },
  3316.                                             "action": "cover.set_cover_tilt_position"
  3317.                                           },
  3318.                                           {
  3319.                                             "delay": {
  3320.                                               "seconds": 0
  3321.                                             }
  3322.                                           }
  3323.                                         ]
  3324.                                       },
  3325.                                       {
  3326.                                         "alias": "Tilt Delay",
  3327.                                         "delay": {
  3328.                                           "seconds": 0
  3329.                                         }
  3330.                                       },
  3331.                                       {
  3332.                                         "alias": "Moving the cover to tilt position",
  3333.                                         "data": {
  3334.                                           "tilt_position": "{{ target_tilt_position | default(101) }}"
  3335.                                         },
  3336.                                         "target": {
  3337.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3338.                                         },
  3339.                                         "action": "cover.set_cover_tilt_position"
  3340.                                       },
  3341.                                       {
  3342.                                         "delay": {
  3343.                                           "seconds": "{{ (range(1, 3) | random | int) }}"
  3344.                                         }
  3345.                                       }
  3346.                                     ]
  3347.                                   }
  3348.                                 }
  3349.                               ]
  3350.                             }
  3351.                           ]
  3352.                         },
  3353.                         {
  3354.                           "if": [
  3355.                             "{{ is_status_helper_enabled }}"
  3356.                           ],
  3357.                           "then": [
  3358.                             {
  3359.                               "alias": "Update cover status helper",
  3360.                               "data": {
  3361.                                 "entity_id": "input_text.cover_status_helper_ankleide",
  3362.                                 "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3363.                               },
  3364.                               "action": "input_text.set_value"
  3365.                             }
  3366.                           ]
  3367.                         },
  3368.                         {
  3369.                           "choose": [],
  3370.                           "default": []
  3371.                         }
  3372.                       ]
  3373.                     },
  3374.                     {
  3375.                       "alias": "Only status change if cover is already 'near' the close position",
  3376.                       "conditions": [
  3377.                         {
  3378.                           "or": [
  3379.                             {
  3380.                               "and": [
  3381.                                 "{{ is_status_helper_enabled }}",
  3382.                                 "{{ prevent_lowering_when_closing_if_shaded }}",
  3383.                                 "{{ is_helper_shaded }}",
  3384.                                 "{{ close_position > shading_position }}"
  3385.                               ]
  3386.                             },
  3387.                             {
  3388.                               "and": [
  3389.                                 "{{ prevent_lowering_when_closing_if_shaded }}",
  3390.                                 "{{ in_shading_position }}",
  3391.                                 "{{ close_position > shading_position }}"
  3392.                               ]
  3393.                             },
  3394.                             {
  3395.                               "and": [
  3396.                                 "{{ prevent_higher_position_closing }}",
  3397.                                 "{{ (current_position <= close_position) }}"
  3398.                               ]
  3399.                             }
  3400.                           ]
  3401.                         }
  3402.                       ],
  3403.                       "sequence": [
  3404.                         {
  3405.                           "variables": {
  3406.                             "update_values": {
  3407.                               "open": {
  3408.                                 "a": 0,
  3409.                                 "t": "{{ helper_state_json.open.t }}"
  3410.                               },
  3411.                               "close": {
  3412.                                 "a": 1,
  3413.                                 "t": "{{ as_timestamp(now()) | round(0) }}"
  3414.                               },
  3415.                               "shading": {
  3416.                                 "a": 0,
  3417.                                 "t": "{{ helper_state_json.shading.t }}",
  3418.                                 "p": 0,
  3419.                                 "q": 0
  3420.                               },
  3421.                               "vpart": {
  3422.                                 "a": 0,
  3423.                                 "t": "{{ helper_state_json.vpart.t }}"
  3424.                               },
  3425.                               "vfull": {
  3426.                                 "a": 0,
  3427.                                 "t": "{{ helper_state_json.vfull.t }}"
  3428.                               },
  3429.                               "t": "{{ as_timestamp(now()) | round(0) }}"
  3430.                             }
  3431.                           }
  3432.                         },
  3433.                         {
  3434.                           "if": [
  3435.                             "{{ is_status_helper_enabled }}"
  3436.                           ],
  3437.                           "then": [
  3438.                             {
  3439.                               "alias": "Update cover status helper",
  3440.                               "data": {
  3441.                                 "entity_id": "input_text.cover_status_helper_ankleide",
  3442.                                 "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3443.                               },
  3444.                               "action": "input_text.set_value"
  3445.                             }
  3446.                           ]
  3447.                         }
  3448.                       ]
  3449.                     }
  3450.                   ],
  3451.                   "default": [
  3452.                     {
  3453.                       "choose": [],
  3454.                       "default": []
  3455.                     },
  3456.                     {
  3457.                       "alias": "Normal closing of the cover",
  3458.                       "delay": {
  3459.                         "seconds": "{{ range(drive_delay_fix|int(0), drive_delay_fix|int(0) + drive_delay_random|int(0) +1) | random }}"
  3460.                       }
  3461.                     },
  3462.                     {
  3463.                       "variables": {
  3464.                         "target_position": 0,
  3465.                         "target_tilt_position": 50,
  3466.                         "update_values": {
  3467.                           "open": {
  3468.                             "a": 0,
  3469.                             "t": "{{ helper_state_json.open.t }}"
  3470.                           },
  3471.                           "close": {
  3472.                             "a": 1,
  3473.                             "t": "{{ as_timestamp(now()) | round(0) }}"
  3474.                           },
  3475.                           "shading": {
  3476.                             "a": 0,
  3477.                             "t": "{{ helper_state_json.shading.t }}",
  3478.                             "p": 0,
  3479.                             "q": 0
  3480.                           },
  3481.                           "vpart": {
  3482.                             "a": 0,
  3483.                             "t": "{{ helper_state_json.vpart.t }}"
  3484.                           },
  3485.                           "vfull": {
  3486.                             "a": 0,
  3487.                             "t": "{{ helper_state_json.vfull.t }}"
  3488.                           },
  3489.                           "manual": {
  3490.                             "a": 0,
  3491.                             "t": "{{ helper_state_json.manual.t }}"
  3492.                           },
  3493.                           "t": "{{ as_timestamp(now()) | round(0) }}"
  3494.                         }
  3495.                       }
  3496.                     },
  3497.                     {
  3498.                       "sequence": [
  3499.                         {
  3500.                           "repeat": {
  3501.                             "for_each": "{{ blind_entities | list }}",
  3502.                             "sequence": [
  3503.                               {
  3504.                                 "choose": [
  3505.                                   {
  3506.                                     "conditions": [
  3507.                                       "{{ not prevent_default_cover_actions }}",
  3508.                                       "{{ target_position | default(101)  == 0 }}"
  3509.                                     ],
  3510.                                     "sequence": [
  3511.                                       {
  3512.                                         "alias": "Close Cover",
  3513.                                         "target": {
  3514.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3515.                                         },
  3516.                                         "action": "cover.close_cover"
  3517.                                       }
  3518.                                     ]
  3519.                                   },
  3520.                                   {
  3521.                                     "conditions": [
  3522.                                       "{{ not prevent_default_cover_actions }}",
  3523.                                       "{{ target_position | default(101) == 100 }}"
  3524.                                     ],
  3525.                                     "sequence": [
  3526.                                       {
  3527.                                         "alias": "Open Cover",
  3528.                                         "target": {
  3529.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3530.                                         },
  3531.                                         "action": "cover.open_cover"
  3532.                                       }
  3533.                                     ]
  3534.                                   },
  3535.                                   {
  3536.                                     "conditions": [
  3537.                                       "{{ not prevent_default_cover_actions }}",
  3538.                                       "{{ target_position | default(101) not in [0, 100] }}"
  3539.                                     ],
  3540.                                     "sequence": [
  3541.                                       {
  3542.                                         "alias": "Moving the cover to target position",
  3543.                                         "data": {
  3544.                                           "position": "{{ target_position | default(101) }}"
  3545.                                         },
  3546.                                         "target": {
  3547.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3548.                                         },
  3549.                                         "action": "cover.set_cover_position"
  3550.                                       }
  3551.                                     ]
  3552.                                   }
  3553.                                 ]
  3554.                               },
  3555.                               {
  3556.                                 "delay": {
  3557.                                   "seconds": "{{ (range(1, 3) | random | int) }}"
  3558.                                 }
  3559.                               }
  3560.                             ]
  3561.                           }
  3562.                         }
  3563.                       ]
  3564.                     },
  3565.                     {
  3566.                       "sequence": [
  3567.                         {
  3568.                           "if": [
  3569.                             "{{ not prevent_default_cover_actions }}",
  3570.                             "{{ is_cover_tilt_enabled_and_possible }}",
  3571.                             "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  3572.                           ],
  3573.                           "then": [
  3574.                             {
  3575.                               "repeat": {
  3576.                                 "for_each": "{{ blind_entities | list }}",
  3577.                                 "sequence": [
  3578.                                   {
  3579.                                     "if": [
  3580.                                       "{{ tilt_first | default(false) }}"
  3581.                                     ],
  3582.                                     "then": [
  3583.                                       {
  3584.                                         "alias": "Reset Tilt",
  3585.                                         "data": {
  3586.                                           "tilt_position": 0
  3587.                                         },
  3588.                                         "target": {
  3589.                                           "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3590.                                         },
  3591.                                         "action": "cover.set_cover_tilt_position"
  3592.                                       },
  3593.                                       {
  3594.                                         "delay": {
  3595.                                           "seconds": 0
  3596.                                         }
  3597.                                       }
  3598.                                     ]
  3599.                                   },
  3600.                                   {
  3601.                                     "alias": "Tilt Delay",
  3602.                                     "delay": {
  3603.                                       "seconds": 0
  3604.                                     }
  3605.                                   },
  3606.                                   {
  3607.                                     "alias": "Moving the cover to tilt position",
  3608.                                     "data": {
  3609.                                       "tilt_position": "{{ target_tilt_position | default(101) }}"
  3610.                                     },
  3611.                                     "target": {
  3612.                                       "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  3613.                                     },
  3614.                                     "action": "cover.set_cover_tilt_position"
  3615.                                   },
  3616.                                   {
  3617.                                     "delay": {
  3618.                                       "seconds": "{{ (range(1, 3) | random | int) }}"
  3619.                                     }
  3620.                                   }
  3621.                                 ]
  3622.                               }
  3623.                             }
  3624.                           ]
  3625.                         }
  3626.                       ]
  3627.                     },
  3628.                     {
  3629.                       "if": [
  3630.                         "{{ is_status_helper_enabled }}"
  3631.                       ],
  3632.                       "then": [
  3633.                         {
  3634.                           "alias": "Update cover status helper",
  3635.                           "data": {
  3636.                             "entity_id": "input_text.cover_status_helper_ankleide",
  3637.                             "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3638.                           },
  3639.                           "action": "input_text.set_value"
  3640.                         }
  3641.                       ]
  3642.                     },
  3643.                     {
  3644.                       "choose": [],
  3645.                       "default": []
  3646.                     }
  3647.                   ]
  3648.                 }
  3649.               ]
  3650.             },
  3651.             {
  3652.               "alias": "Check for shading start",
  3653.               "conditions": [
  3654.                 "{{ is_shading_enabled }}",
  3655.                 "{{ trigger.id is defined }}",
  3656.                 "{{ trigger.id | regex_match('^(t_shading_start|t_open_1|t_open_3)') }}",
  3657.                 "{{ is_status_helper_enabled }}",
  3658.                 {
  3659.                   "condition": []
  3660.                 },
  3661.                 {
  3662.                   "and": [
  3663.                     "{{ auto_up_force_disabled }}",
  3664.                     "{{ auto_down_force_disabled }}",
  3665.                     "{{ auto_ventilate_force_disabled }}"
  3666.                   ]
  3667.                 },
  3668.                 {
  3669.                   "or": [
  3670.                     "{{ not is_helper_shaded }}",
  3671.                     "{{ not (is_helper_vent_partial or is_helper_vent_full) }}"
  3672.                   ]
  3673.                 },
  3674.                 {
  3675.                   "or": [
  3676.                     {
  3677.                       "and": [
  3678.                         "{{ not is_cover_tilt_enabled_and_possible }}",
  3679.                         "{{ not in_shading_position }}"
  3680.                       ]
  3681.                     },
  3682.                     {
  3683.                       "and": [
  3684.                         "{{ is_cover_tilt_enabled_and_possible }}",
  3685.                         "{{ current_position >= shading_position }}"
  3686.                       ]
  3687.                     }
  3688.                   ]
  3689.                 },
  3690.                 "{{ not (is_helper_manual and override_shading_after_manual) }}",
  3691.                 {
  3692.                   "or": [
  3693.                     "{{ not prevent_shading_multiple_times }}",
  3694.                     "{{ prevent_shading_multiple_times and (now().day != ts_helper_shaded|timestamp_custom('%-d') | int) }}",
  3695.                     "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}"
  3696.                   ]
  3697.                 }
  3698.               ],
  3699.               "sequence": [
  3700.                 {
  3701.                   "if": [
  3702.                     "{{ current_sun_azimuth > shading_azimuth_start and current_sun_azimuth < shading_azimuth_end }}",
  3703.                     "{{ current_sun_elevation > shading_elevation_min and current_sun_elevation < shading_elevation_max }}",
  3704.                     {
  3705.                       "or": [
  3706.                         "{{ shading_brightness_sensor == [] }}",
  3707.                         "{{ states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > shading_sun_brightness_start }}"
  3708.                       ]
  3709.                     },
  3710.                     {
  3711.                       "or": [
  3712.                         "{{ shading_temperatur_sensor1 == [] }}",
  3713.                         "{{ states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > shading_min_temperatur1 }}"
  3714.                       ]
  3715.                     },
  3716.                     {
  3717.                       "or": [
  3718.                         "{{ shading_temperatur_sensor2 == [] }}",
  3719.                         "{{ states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > shading_min_temperatur2 }}"
  3720.                       ]
  3721.                     },
  3722.                     {
  3723.                       "or": [
  3724.                         "{{ shading_forecast_sensor == [] }}",
  3725.                         "{{ shading_forecast_temp == [] }}",
  3726.                         {
  3727.                           "and": [
  3728.                             "{{ shading_forecast_sensor.startswith('sensor.') }}",
  3729.                             "{{ states(shading_forecast_sensor) | float(default=shading_forecast_temp - 1) > shading_forecast_temp }}"
  3730.                           ]
  3731.                         },
  3732.                         {
  3733.                           "and": [
  3734.                             "{{ shading_forecast_sensor.startswith('weather.') }}",
  3735.                             "{{ prevent_forecast_service }}",
  3736.                             "{{ state_attr(shading_forecast_sensor, 'temperature') | float(default=shading_forecast_temp - 1) > shading_forecast_temp }}"
  3737.                           ]
  3738.                         },
  3739.                         {
  3740.                           "and": [
  3741.                             "{{ shading_forecast_sensor.startswith('weather.') }}",
  3742.                             "{{ not prevent_forecast_service }}",
  3743.                             "{{ weather_forecast is defined }}",
  3744.                             "{{ weather_forecast[shading_forecast_sensor].forecast[0].temperature | float(default=shading_forecast_temp - 1) > shading_forecast_temp }}"
  3745.                           ]
  3746.                         },
  3747.                         "{{ (shading_temperatur_sensor2 != [] ) and (states(shading_temperatur_sensor2) | float(default=shading_forecast_temp) > shading_forecast_temp) }}"
  3748.                       ]
  3749.                     },
  3750.                     {
  3751.                       "or": [
  3752.                         "{{ shading_forecast_sensor == [] }}",
  3753.                         "{{ shading_weather_conditions == [] }}",
  3754.                         "{{ shading_forecast_sensor.startswith('sensor.') }}",
  3755.                         {
  3756.                           "and": [
  3757.                             "{{ shading_forecast_sensor.startswith('weather.') }}",
  3758.                             "{{ prevent_forecast_service }}",
  3759.                             "{{ states(shading_forecast_sensor) in shading_weather_conditions }}"
  3760.                           ]
  3761.                         },
  3762.                         {
  3763.                           "and": [
  3764.                             "{{ shading_forecast_sensor.startswith('weather.') }}",
  3765.                             "{{ not prevent_forecast_service }}",
  3766.                             "{{ weather_forecast is defined }}",
  3767.                             "{{ weather_forecast[shading_forecast_sensor].forecast[0].condition in shading_weather_conditions }}"
  3768.                           ]
  3769.                         }
  3770.                       ]
  3771.                     }
  3772.                   ],
  3773.                   "then": [
  3774.                     {
  3775.                       "choose": [
  3776.                         {
  3777.                           "alias": "Shading detected. Save next execution time and pending status",
  3778.                           "conditions": [
  3779.                             "{{ trigger.id | regex_match('^(t_shading_start_pending)') }}",
  3780.                             "{{ not is_helper_shading_start }}"
  3781.                           ],
  3782.                           "sequence": [
  3783.                             {
  3784.                               "variables": {
  3785.                                 "update_values": {
  3786.                                   "shading": {
  3787.                                     "a": 1,
  3788.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  3789.                                     "p": "{{ (as_timestamp(now()) | round(0) + (shading_waitingtime_start | int)) | round(0) }}",
  3790.                                     "q": 0
  3791.                                   },
  3792.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  3793.                                 }
  3794.                               }
  3795.                             },
  3796.                             {
  3797.                               "if": [
  3798.                                 "{{ is_status_helper_enabled }}"
  3799.                               ],
  3800.                               "then": [
  3801.                                 {
  3802.                                   "alias": "Update cover status helper",
  3803.                                   "data": {
  3804.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  3805.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3806.                                   },
  3807.                                   "action": "input_text.set_value"
  3808.                                 }
  3809.                               ]
  3810.                             }
  3811.                           ]
  3812.                         },
  3813.                         {
  3814.                           "alias": "Consider lockout protection when shading starts",
  3815.                           "conditions": [
  3816.                             "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
  3817.                             "{{ is_helper_shading_start }}",
  3818.                             "{{ is_ventilation_enabled }}",
  3819.                             {
  3820.                               "or": [
  3821.                                 {
  3822.                                   "and": [
  3823.                                     "{{ contact_window_opened != [] }}",
  3824.                                     "{{ states(contact_window_opened) in ['true', 'on'] }}"
  3825.                                   ]
  3826.                                 },
  3827.                                 {
  3828.                                   "and": [
  3829.                                     "{{ lockout_tilted_when_shading_starts }}",
  3830.                                     "{{ contact_window_tilted != [] }}",
  3831.                                     "{{ states(contact_window_tilted) in ['true', 'on'] }}"
  3832.                                   ]
  3833.                                 }
  3834.                               ]
  3835.                             }
  3836.                           ],
  3837.                           "sequence": [
  3838.                             {
  3839.                               "variables": {
  3840.                                 "update_values": {
  3841.                                   "open": {
  3842.                                     "a": 1,
  3843.                                     "t": "{{ as_timestamp(now()) | round(0) }}"
  3844.                                   },
  3845.                                   "close": {
  3846.                                     "a": 0,
  3847.                                     "t": "{{ helper_state_json.close.t }}"
  3848.                                   },
  3849.                                   "shading": {
  3850.                                     "a": 1,
  3851.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  3852.                                     "p": 0,
  3853.                                     "q": 0
  3854.                                   },
  3855.                                   "vpart": {
  3856.                                     "a": 0,
  3857.                                     "t": "{{ helper_state_json.vpart.t }}"
  3858.                                   },
  3859.                                   "vfull": {
  3860.                                     "a": 1,
  3861.                                     "t": "{{ as_timestamp(now()) | round(0) }}"
  3862.                                   },
  3863.                                   "manual": {
  3864.                                     "a": 0,
  3865.                                     "t": "{{ helper_state_json.manual.t }}"
  3866.                                   },
  3867.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  3868.                                 }
  3869.                               }
  3870.                             },
  3871.                             {
  3872.                               "if": [
  3873.                                 "{{ is_status_helper_enabled }}"
  3874.                               ],
  3875.                               "then": [
  3876.                                 {
  3877.                                   "alias": "Update cover status helper",
  3878.                                   "data": {
  3879.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  3880.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  3881.                                   },
  3882.                                   "action": "input_text.set_value"
  3883.                                 }
  3884.                               ]
  3885.                             }
  3886.                           ]
  3887.                         },
  3888.                         {
  3889.                           "alias": "Start Shading",
  3890.                           "conditions": [
  3891.                             "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
  3892.                             "{{ is_helper_shading_start }}",
  3893.                             {
  3894.                               "or": [
  3895.                                 {
  3896.                                   "and": [
  3897.                                     "{{ not is_cover_tilt_enabled_and_possible }}",
  3898.                                     "{{ current_position > shading_position }}"
  3899.                                   ]
  3900.                                 },
  3901.                                 {
  3902.                                   "and": [
  3903.                                     "{{ is_cover_tilt_enabled_and_possible }}",
  3904.                                     "{{ current_position >= shading_position }}"
  3905.                                   ]
  3906.                                 }
  3907.                               ]
  3908.                             },
  3909.                             {
  3910.                               "or": [
  3911.                                 {
  3912.                                   "and": [
  3913.                                     "{{ is_time_control_disabled }}"
  3914.                                   ]
  3915.                                 },
  3916.                                 {
  3917.                                   "and": [
  3918.                                     "{{ is_time_field_enabled }}",
  3919.                                     "{{ now() >= today_at(time_up_early_today) }}",
  3920.                                     "{{ now() <= today_at(time_down_late_today) + timedelta(seconds = 5) }}"
  3921.                                   ]
  3922.                                 },
  3923.                                 {
  3924.                                   "and": [
  3925.                                     "{{ is_schedule_helper_enabled }}",
  3926.                                     "{{ time_schedule_helper != [] }}",
  3927.                                     "{{ is_state(time_schedule_helper, 'on') }}"
  3928.                                   ]
  3929.                                 }
  3930.                               ]
  3931.                             },
  3932.                             {
  3933.                               "or": [
  3934.                                 "{{ resident_sensor == [] }}",
  3935.                                 "{{ states(resident_sensor) in ['false', 'off'] }}",
  3936.                                 {
  3937.                                   "and": [
  3938.                                     "{{ resident_allow_shading }}",
  3939.                                     "{{ states(resident_sensor) in ['true', 'on'] }}"
  3940.                                   ]
  3941.                                 }
  3942.                               ]
  3943.                             }
  3944.                           ],
  3945.                           "sequence": [
  3946.                             {
  3947.                               "delay": {
  3948.                                 "seconds": "{{ range(drive_delay_fix | int(0), drive_delay_fix | int(0) + drive_delay_random | int(0) +1) | random }}"
  3949.                               }
  3950.                             },
  3951.                             {
  3952.                               "choose": [],
  3953.                               "default": []
  3954.                             },
  3955.                             {
  3956.                               "variables": {
  3957.                                 "target_position": 1,
  3958.                                 "target_tilt_position": "{{ shading_tilt_position | int }}",
  3959.                                 "update_values": {
  3960.                                   "open": {
  3961.                                     "a": 1,
  3962.                                     "t": "{{ as_timestamp(now()) | round(0) }}"
  3963.                                   },
  3964.                                   "close": {
  3965.                                     "a": 0,
  3966.                                     "t": "{{ helper_state_json.close.t }}"
  3967.                                   },
  3968.                                   "shading": {
  3969.                                     "a": 1,
  3970.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  3971.                                     "p": 0,
  3972.                                     "q": 0
  3973.                                   },
  3974.                                   "vpart": {
  3975.                                     "a": 0,
  3976.                                     "t": "{{ helper_state_json.vpart.t }}"
  3977.                                   },
  3978.                                   "vfull": {
  3979.                                     "a": 0,
  3980.                                     "t": "{{ helper_state_json.vfull.t }}"
  3981.                                   },
  3982.                                   "manual": {
  3983.                                     "a": 0,
  3984.                                     "t": "{{ helper_state_json.manual.t }}"
  3985.                                   },
  3986.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  3987.                                 }
  3988.                               }
  3989.                             },
  3990.                             {
  3991.                               "sequence": [
  3992.                                 {
  3993.                                   "repeat": {
  3994.                                     "for_each": "{{ blind_entities | list }}",
  3995.                                     "sequence": [
  3996.                                       {
  3997.                                         "choose": [
  3998.                                           {
  3999.                                             "conditions": [
  4000.                                               "{{ not prevent_default_cover_actions }}",
  4001.                                               "{{ target_position | default(101)  == 0 }}"
  4002.                                             ],
  4003.                                             "sequence": [
  4004.                                               {
  4005.                                                 "alias": "Close Cover",
  4006.                                                 "target": {
  4007.                                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4008.                                                 },
  4009.                                                 "action": "cover.close_cover"
  4010.                                               }
  4011.                                             ]
  4012.                                           },
  4013.                                           {
  4014.                                             "conditions": [
  4015.                                               "{{ not prevent_default_cover_actions }}",
  4016.                                               "{{ target_position | default(101) == 100 }}"
  4017.                                             ],
  4018.                                             "sequence": [
  4019.                                               {
  4020.                                                 "alias": "Open Cover",
  4021.                                                 "target": {
  4022.                                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4023.                                                 },
  4024.                                                 "action": "cover.open_cover"
  4025.                                               }
  4026.                                             ]
  4027.                                           },
  4028.                                           {
  4029.                                             "conditions": [
  4030.                                               "{{ not prevent_default_cover_actions }}",
  4031.                                               "{{ target_position | default(101) not in [0, 100] }}"
  4032.                                             ],
  4033.                                             "sequence": [
  4034.                                               {
  4035.                                                 "alias": "Moving the cover to target position",
  4036.                                                 "data": {
  4037.                                                   "position": "{{ target_position | default(101) }}"
  4038.                                                 },
  4039.                                                 "target": {
  4040.                                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4041.                                                 },
  4042.                                                 "action": "cover.set_cover_position"
  4043.                                               }
  4044.                                             ]
  4045.                                           }
  4046.                                         ]
  4047.                                       },
  4048.                                       {
  4049.                                         "delay": {
  4050.                                           "seconds": "{{ (range(1, 3) | random | int) }}"
  4051.                                         }
  4052.                                       }
  4053.                                     ]
  4054.                                   }
  4055.                                 }
  4056.                               ]
  4057.                             },
  4058.                             {
  4059.                               "sequence": [
  4060.                                 {
  4061.                                   "if": [
  4062.                                     "{{ not prevent_default_cover_actions }}",
  4063.                                     "{{ is_cover_tilt_enabled_and_possible }}",
  4064.                                     "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  4065.                                   ],
  4066.                                   "then": [
  4067.                                     {
  4068.                                       "repeat": {
  4069.                                         "for_each": "{{ blind_entities | list }}",
  4070.                                         "sequence": [
  4071.                                           {
  4072.                                             "if": [
  4073.                                               "{{ tilt_first | default(false) }}"
  4074.                                             ],
  4075.                                             "then": [
  4076.                                               {
  4077.                                                 "alias": "Reset Tilt",
  4078.                                                 "data": {
  4079.                                                   "tilt_position": 0
  4080.                                                 },
  4081.                                                 "target": {
  4082.                                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4083.                                                 },
  4084.                                                 "action": "cover.set_cover_tilt_position"
  4085.                                               },
  4086.                                               {
  4087.                                                 "delay": {
  4088.                                                   "seconds": 0
  4089.                                                 }
  4090.                                               }
  4091.                                             ]
  4092.                                           },
  4093.                                           {
  4094.                                             "alias": "Tilt Delay",
  4095.                                             "delay": {
  4096.                                               "seconds": 0
  4097.                                             }
  4098.                                           },
  4099.                                           {
  4100.                                             "alias": "Moving the cover to tilt position",
  4101.                                             "data": {
  4102.                                               "tilt_position": "{{ target_tilt_position | default(101) }}"
  4103.                                             },
  4104.                                             "target": {
  4105.                                               "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4106.                                             },
  4107.                                             "action": "cover.set_cover_tilt_position"
  4108.                                           },
  4109.                                           {
  4110.                                             "delay": {
  4111.                                               "seconds": "{{ (range(1, 3) | random | int) }}"
  4112.                                             }
  4113.                                           }
  4114.                                         ]
  4115.                                       }
  4116.                                     }
  4117.                                   ]
  4118.                                 }
  4119.                               ]
  4120.                             },
  4121.                             {
  4122.                               "if": [
  4123.                                 "{{ is_status_helper_enabled }}"
  4124.                               ],
  4125.                               "then": [
  4126.                                 {
  4127.                                   "alias": "Update cover status helper",
  4128.                                   "data": {
  4129.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  4130.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  4131.                                   },
  4132.                                   "action": "input_text.set_value"
  4133.                                 }
  4134.                               ]
  4135.                             },
  4136.                             {
  4137.                               "choose": [],
  4138.                               "default": []
  4139.                             }
  4140.                           ]
  4141.                         },
  4142.                         {
  4143.                           "alias": "Save shading state for the future",
  4144.                           "conditions": [
  4145.                             "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
  4146.                             "{{ is_helper_shading_start }}",
  4147.                             "{{ is_helper_closed }}"
  4148.                           ],
  4149.                           "sequence": [
  4150.                             {
  4151.                               "variables": {
  4152.                                 "update_values": {
  4153.                                   "shading": {
  4154.                                     "a": 1,
  4155.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  4156.                                     "p": 0,
  4157.                                     "q": 0
  4158.                                   },
  4159.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  4160.                                 }
  4161.                               }
  4162.                             },
  4163.                             {
  4164.                               "if": [
  4165.                                 "{{ is_status_helper_enabled }}"
  4166.                               ],
  4167.                               "then": [
  4168.                                 {
  4169.                                   "alias": "Update cover status helper",
  4170.                                   "data": {
  4171.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  4172.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  4173.                                   },
  4174.                                   "action": "input_text.set_value"
  4175.                                 }
  4176.                               ]
  4177.                             }
  4178.                           ]
  4179.                         }
  4180.                       ]
  4181.                     }
  4182.                   ],
  4183.                   "else": [
  4184.                     {
  4185.                       "choose": [
  4186.                         {
  4187.                           "alias": "Shading conditions were not met consistently and it should be checked again periodically in a few seconds",
  4188.                           "conditions": [
  4189.                             "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
  4190.                             "{{ is_helper_shading_start }}",
  4191.                             "{{ start_shading_trigger_periodic }}",
  4192.                             {
  4193.                               "or": [
  4194.                                 {
  4195.                                   "and": [
  4196.                                     "{{ is_time_control_disabled }}",
  4197.                                     "{{ is_helper_open }}"
  4198.                                   ]
  4199.                                 },
  4200.                                 {
  4201.                                   "and": [
  4202.                                     "{{ is_time_field_enabled }}",
  4203.                                     "{{ now() >= today_at(time_up_early_today) }}",
  4204.                                     "{{ now() <= today_at(time_down_late_today) + timedelta(seconds = 5) }}"
  4205.                                   ]
  4206.                                 },
  4207.                                 {
  4208.                                   "and": [
  4209.                                     "{{ is_schedule_helper_enabled }}",
  4210.                                     "{{ time_schedule_helper != [] }}",
  4211.                                     "{{ is_state(time_schedule_helper, 'on') }}"
  4212.                                   ]
  4213.                                 }
  4214.                               ]
  4215.                             }
  4216.                           ],
  4217.                           "sequence": [
  4218.                             {
  4219.                               "variables": {
  4220.                                 "update_values": {
  4221.                                   "shading": {
  4222.                                     "a": 1,
  4223.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  4224.                                     "p": "{{ (as_timestamp(now()) | round(0) + (shading_waitingtime_start | int)) | round(0) }}",
  4225.                                     "q": 0
  4226.                                   },
  4227.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  4228.                                 }
  4229.                               }
  4230.                             },
  4231.                             {
  4232.                               "if": [
  4233.                                 "{{ is_status_helper_enabled }}"
  4234.                               ],
  4235.                               "then": [
  4236.                                 {
  4237.                                   "alias": "Update cover status helper",
  4238.                                   "data": {
  4239.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  4240.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  4241.                                   },
  4242.                                   "action": "input_text.set_value"
  4243.                                 }
  4244.                               ]
  4245.                             }
  4246.                           ]
  4247.                         },
  4248.                         {
  4249.                           "alias": "Shading conditions were not consistently met and the next new trigger should be waited for",
  4250.                           "conditions": [
  4251.                             "{{ trigger.id | regex_match('^(t_shading_start_execution)') }}",
  4252.                             "{{ is_helper_shading_start }}",
  4253.                             "{{ start_shading_trigger_reset }}"
  4254.                           ],
  4255.                           "sequence": [
  4256.                             {
  4257.                               "variables": {
  4258.                                 "update_values": {
  4259.                                   "shading": {
  4260.                                     "a": 0,
  4261.                                     "t": "{{ as_timestamp(now()) | round(0) }}",
  4262.                                     "p": 0,
  4263.                                     "q": 0
  4264.                                   },
  4265.                                   "t": "{{ as_timestamp(now()) | round(0) }}"
  4266.                                 }
  4267.                               }
  4268.                             },
  4269.                             {
  4270.                               "if": [
  4271.                                 "{{ is_status_helper_enabled }}"
  4272.                               ],
  4273.                               "then": [
  4274.                                 {
  4275.                                   "alias": "Update cover status helper",
  4276.                                   "data": {
  4277.                                     "entity_id": "input_text.cover_status_helper_ankleide",
  4278.                                     "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  4279.                                   },
  4280.                                   "action": "input_text.set_value"
  4281.                                 }
  4282.                               ]
  4283.                             }
  4284.                           ]
  4285.                         }
  4286.                       ]
  4287.                     }
  4288.                   ]
  4289.                 }
  4290.               ]
  4291.             },
  4292.             {
  4293.               "alias": "Check for shading tilt",
  4294.               "conditions": [
  4295.                 "{{ is_shading_enabled }}",
  4296.                 "{{ trigger.id is defined }}",
  4297.                 "{{ trigger.id | regex_match('^(t_shading_tilt)') }}",
  4298.                 "{{ is_status_helper_enabled }}",
  4299.                 {
  4300.                   "and": [
  4301.                     "{{ is_helper_shaded }}",
  4302.                     "{{ not is_helper_shading_start }}"
  4303.                   ]
  4304.                 },
  4305.                 "{{ is_cover_tilt_enabled_and_possible }}",
  4306.                 {
  4307.                   "condition": []
  4308.                 },
  4309.                 {
  4310.                   "and": [
  4311.                     "{{ auto_up_force_disabled }}",
  4312.                     "{{ auto_down_force_disabled }}",
  4313.                     "{{ auto_ventilate_force_disabled }}"
  4314.                   ]
  4315.                 },
  4316.                 "{{ not (is_helper_vent_partial or is_helper_vent_full) }}",
  4317.                 "{{ not (is_helper_manual and override_shading_after_manual) }}"
  4318.               ],
  4319.               "sequence": [
  4320.                 {
  4321.                   "variables": {
  4322.                     "target_tilt_position": "{{ shading_tilt_position | int }}",
  4323.                     "tilt_first": true,
  4324.                     "update_values": {
  4325.                       "t": "{{ as_timestamp(now()) | round(0) }}"
  4326.                     }
  4327.                   }
  4328.                 },
  4329.                 {
  4330.                   "sequence": [
  4331.                     {
  4332.                       "if": [
  4333.                         "{{ not prevent_default_cover_actions }}",
  4334.                         "{{ is_cover_tilt_enabled_and_possible }}",
  4335.                         "{{ expand(blind_entities) | selectattr('attributes.current_tilt_position', 'defined') | list | count > 0 }}"
  4336.                       ],
  4337.                       "then": [
  4338.                         {
  4339.                           "repeat": {
  4340.                             "for_each": "{{ blind_entities | list }}",
  4341.                             "sequence": [
  4342.                               {
  4343.                                 "if": [
  4344.                                   "{{ tilt_first | default(false) }}"
  4345.                                 ],
  4346.                                 "then": [
  4347.                                   {
  4348.                                     "alias": "Reset Tilt",
  4349.                                     "data": {
  4350.                                       "tilt_position": 0
  4351.                                     },
  4352.                                     "target": {
  4353.                                       "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4354.                                     },
  4355.                                     "action": "cover.set_cover_tilt_position"
  4356.                                   },
  4357.                                   {
  4358.                                     "delay": {
  4359.                                       "seconds": 0
  4360.                                     }
  4361.                                   }
  4362.                                 ]
  4363.                               },
  4364.                               {
  4365.                                 "alias": "Tilt Delay",
  4366.                                 "delay": {
  4367.                                   "seconds": 0
  4368.                                 }
  4369.                               },
  4370.                               {
  4371.                                 "alias": "Moving the cover to tilt position",
  4372.                                 "data": {
  4373.                                   "tilt_position": "{{ target_tilt_position | default(101) }}"
  4374.                                 },
  4375.                                 "target": {
  4376.                                   "entity_id": "{{ repeat.item if repeat is defined else '' }}"
  4377.                                 },
  4378.                                 "action": "cover.set_cover_tilt_position"
  4379.                               },
  4380.                               {
  4381.                                 "delay": {
  4382.                                   "seconds": "{{ (range(1, 3) | random | int) }}"
  4383.                                 }
  4384.                               }
  4385.                             ]
  4386.                           }
  4387.                         }
  4388.                       ]
  4389.                     }
  4390.                   ]
  4391.                 },
  4392.                 {
  4393.                   "if": [
  4394.                     "{{ is_status_helper_enabled }}"
  4395.                   ],
  4396.                   "then": [
  4397.                     {
  4398.                       "alias": "Update cover status helper",
  4399.                       "data": {
  4400.                         "entity_id": "input_text.cover_status_helper_ankleide",
  4401.                         "value": "{% set dict_var = helper_state_json %}\n{% set dict_new = dict(dict_var, **(update_values | default({})) ) %}\n{{ dict_new | to_json }}"
  4402.                       },
  4403.                       "action": "input_text.set_value"
  4404.                     }
  4405.                   ]
  4406.                 }
  4407.               ]
  4408.             },
  4409.             {
  4410.               "alias": "Check for shading end",
  4411.               "conditions": [
  4412.                 "{{ is_shading_enabled }}",
  4413.                 "{{ trigger.id is defined }}",
  4414.                 "{{ trigger.id | regex_match('^(t_shading_end)') }}",
  4415.                 "{{ is_status_helper_enabled }}",
  4416.                 {
  4417.                   "condition": []
  4418.                 },
  4419.                 {
  4420.                   "and": [
  4421.                     "{{ auto_up_force_disabled }}",
  4422.                     "{{ auto_down_force_disabled }}",
  4423.                     "{{ auto_ventilate_force_disabled }}",
  4424.                     "{{ auto_shading_start_force_disabled }}"
  4425.                   ]
  4426.                 },
  4427.                 {
  4428.                   "or": [
  4429.                     {
  4430.                       "and": [
  4431.                         "{{ is_time_control_disabled }}"
  4432.                       ]
  4433.                     },
  4434.                     {
  4435.                       "and": [
  4436.                         "{{ is_time_field_enabled }}",
  4437.                         "{{ now() >= today_at(time_up_early_today) }}",
  4438.                         "{{ now() <= today_at(time_down_late_today) + timedelta(seconds = 5) }}"
  4439.                       ]
  4440.                     },
  4441.                     {
  4442.                       "and": [
  4443.                         "{{ is_schedule_helper_enabled }}",
  4444.                         "{{ time_schedule_helper != [] }}",
  4445.                         "{{ is_state(time_schedule_helper, 'on') }}"
  4446.                       ]
  4447.                     }
  4448.                   ]
  4449.                 },
  4450.                 "{{ not (is_helper_manual and override_shading_after_manual) }}",
  4451.                 "{{ not is_helper_closed }}",
  4452.                 {
  4453.                   "or": [
  4454.                     "{{ is_helper_shaded }}",
  4455.                     "{{ in_shading_position }}"
  4456.                   ]
  4457.                 },
  4458.                 {
  4459.                   "or": [
  4460.                     "{{ not prevent_shading_end_if_closed }}",
  4461.                     "{{ prevent_shading_end_if_closed and not in_close_position}}"
  4462.                   ]
  4463.                 },
  4464.                 {
  4465.                   "or": [
  4466.                     "{{ resident_sensor == [] }}",
  4467.                     "{{ states(resident_sensor) in ['false', 'off'] }}"
  4468.                   ]
  4469.                 }
  4470.               ],
  4471.               "sequence": [
  4472.                 {
  4473.                   "choose": [
  4474.                     {
  4475.                       "alias": "Shading end detected. Save next execution time and pending status",
  4476.                       "conditions": [
  4477.                         "{{ trigger.id | regex_match('^(t_shading_end_pending)') }}",
  4478.                         "{{ not is_helper_shading_end }}"
  4479.                       ],
  4480.                       "sequence": [
  4481.                         {
  4482.                           "variables": {
  4483.                             "local_waitingtime_end": "{% set local_waitingtime_end = shading_waitingtime_end | default(0) | int %} {% if (is_shading_end_immediate_by_sun_position | default(false)) | bool and trigger.id == 't_shading_end_pending_5' %} {
Advertisement
Add Comment
Please, Sign In to add comment