How is it that as soon as I send endsteps in my code, it becomes infesable without error?
Current version: v0.11.2
post_naive_mpc_shell_carnow: >
curl -i -H "Content-Type: application/json" -X POST -d '{
"load_cost_forecast":{{((state_attr("sensor.nordpool_tibber", "raw_today") | map(attribute="value") | list + state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value") | list))[now().hour:][:24] }},
"prod_price_forecast":{{((state_attr("sensor.nordpool_tibber", "raw_today") | map(attribute="value") | list + state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value") | list))[now().hour:][:24] }},
"prediction_horizon":{{min(24, (((state_attr("sensor.nordpool_tibber", "raw_today")|map(attribute="value")|list + state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value")| list)[now().hour:][:24]|list|length)))}},
"pv_power_forecast":{{([states("sensor.inverter_input_power")|int(0)] + state_attr("sensor.solcast_pv_forecast_forecast_today", "detailedHourly")|selectattr("period_start","gt",utcnow()) | map(attribute="pv_estimate")|map("multiply",1000)|map("int")|list + state_attr("sensor.solcast_pv_forecast_forecast_tomorrow", "detailedHourly")|selectattr("period_start","gt",utcnow()) | map(attribute="pv_estimate")|map("multiply",1000)|map("int")|list)| tojson}},
"load_power_forecast":{{[states('sensor.power_load_novar_loads')|int] +(states('input_text.fifo_buffer').split(',')|map('int')|list)[1:]}},
"soc_init":{{ max(0,states("sensor.battery_state_of_capacity")|int(0))/100 }},
"soc_final":{{ max(100,states("number.battery_end_of_discharge_soc")|int(0))/100 }},
"P_deferrable_nom": [{{ states('sensor.go_echarger_265216_nrg_12')|int }}, 0],
"delta_forecast":2,
"alpha": 1,
"beta": 0,
"def_total_hours":[{{ states('sensor.charger_def_hours') | default(0) }}, 0],
"def_end_timestep":[{{ states('sensor.endslots') | default(0) }}, 0]
}' http://localhost:5000/action/naive-mpc-optim
2024-11-14 18:05:35,872 - web_server - INFO - Passed runtime parameters: {'load_cost_forecast': [0.56, 0.55, 0.5, 0.47, 0.43, 0.36, 0.35, 0.33, 0.29, 0.28, 0.29, 0.34, 0.37, 0.49, 0.68, 0.68, 0.65, 0.48, 0.39, 0.38, 0.38, 0.37, 0.37, 0.37], 'prod_price_forecast': [0.56, 0.55, 0.5, 0.47, 0.43, 0.36, 0.35, 0.33, 0.29, 0.28, 0.29, 0.34, 0.37, 0.49, 0.68, 0.68, 0.65, 0.48, 0.39, 0.38, 0.38, 0.37, 0.37, 0.37], 'prediction_horizon': 24, 'pv_power_forecast': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 233, 1291, 2405, 3204, 3455, 3156, 2276, 151, 0, 0, 0, 0, 0, 0, 0, 0], 'load_power_forecast': [2679, 1896, 1341, 1163, 2263, 1362, 3245, 1563, 1338, 1202, 1254, 1201, 1208, 1230, 1241, 1299, 2371, 1491, 1465, 1384, 718, 1506, 1422, 1566, 2188, 2368, 1188, 724, 1168, 901, 2099, 3209, 2637, 2533, 2698, 1240, 674, 1289, 2023, 1447, 2452, 1116, 2234, 1887, 1111, 2123, 896, 886], 'soc_init': 0.16, 'soc_final': 1.0, 'P_deferrable_nom': [0, 0], 'delta_forecast': 2, 'alpha': 1, 'beta': 0, 'def_total_hours': [5, 0], 'def_end_timestep': [5, 0]}
2024-11-14 18:05:35,872 - web_server - INFO - >> Setting input data dict
2024-11-14 18:05:35,872 - web_server - INFO - Setting up needed data
2024-11-14 18:05:35,875 - web_server - INFO - Retrieve hass get data method initiated...
2024-11-14 18:05:36,180 - web_server - INFO - Retrieving weather forecast data using method = list
2024-11-14 18:05:36,183 - web_server - INFO - >> Performing naive MPC optimization...
2024-11-14 18:05:36,184 - web_server - INFO - Performing naive MPC optimization
2024-11-14 18:05:36,194 - web_server - INFO - Perform an iteration of a naive MPC controller
2024-11-14 18:05:36,269 - web_server - INFO - Status: Infeasible
2024-11-14 18:05:36,269 - web_server - INFO - Total value of the Cost function = -8.75
2024-11-14 18:05:36,275 - web_server - INFO - Publishing data to HASS instance
2024-11-14 18:05:36,280 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = 0
2024-11-14 18:05:36,282 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 2679
2024-11-14 18:05:36,284 - web_server - INFO - Successfully posted to sensor.p_hybrid_inverter = 1330.0
2024-11-14 18:05:36,286 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 1.0
2024-11-14 18:05:36,288 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2024-11-14 18:05:36,290 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 1330.0
2024-11-14 18:05:36,292 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 2.0
2024-11-14 18:05:36,295 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = 1350.0
2024-11-14 18:05:36,297 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = -8.6
2024-11-14 18:05:36,298 - web_server - INFO - Successfully posted to sensor.optim_status = Infeasible
2024-11-14 18:05:36,300 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.56
2024-11-14 18:05:36,302 - web_server - INFO - Successfully posted to sensor.unit_prod_price = 0.56
2024-11-14 18:05:41,333 - web_server - INFO - EMHASS server online, serving index.html...