EMHASS: An Energy Management for Home Assistant

Installing latest version I get this error?:

   Building emhass @ file:///app
      Built emhass @ file:///app
Uninstalled 2 packages in 23ms
Installed 2 packages in 2ms
Traceback (most recent call last):
  File "/app/.venv/bin/gunicorn", line 10, in <module>
    sys.exit(run())
             ^^^^^
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 235, in run
    super().run()
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
    ^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 57, in __init__
    self.setup(app)
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 117, in setup
    self.app.wsgi()
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
                    ^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
    return self.load_wsgiapp()
           ^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
    return util.import_app(self.app_uri)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/gunicorn/util.py", line 370, in import_app
    mod = importlib.import_module(module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/uv/python/cpython-3.12.12-linux-aarch64-gnu/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/app/src/emhass/web_server.py", line 21, in <module>
    from emhass.command_line import (
  File "/app/src/emhass/command_line.py", line 18, in <module>
    from emhass import utils
  File "/app/src/emhass/utils.py", line 17, in <module>
    import plotly.express as px
  File "/app/.venv/lib/python3.12/site-packages/plotly/express/__init__.py", line 27, in <module>
    from ._imshow import imshow
  File "/app/.venv/lib/python3.12/site-packages/plotly/express/_imshow.py", line 3, in <module>
    from ._core import apply_default_cascade, init_figure, configure_animation_controls
  File "/app/.venv/lib/python3.12/site-packages/plotly/express/_core.py", line 11, in <module>
    from plotly._subplots import (
SyntaxError: source code string cannot contain null bytes

What could be wrong here?

It seems that the add-on installation process just did not went fine for you.
Uninstall the EMHASS Add-on entirely and then reinstall the EMHASS Add-on from the store.

1 Like

Hi David, yes now I setup to 9 days, which is working fine. If I increase any number will do 9 days. So I looked into the history of the sensor in HA and what I see is that after 9 days the history is going into a less detailed mode. To explain see picture:


Maybe that is my problem?
br Ralf

Solved it! thx

Thanks David! Sorry for being clumsy. Now it works for me.
However, using KNeighborsRegressor and only 28 days of data I get R2 = -0.4414348682766347 so I think I need to wait a bit more before I use the training.

Hi All,

Just a general question about best hardware for HAOS and EMHASS. I am now using a MacMini M1 8Gb running VirtualBox as VM to run HAOS. With 3 days of prediction+thermal model clearly the Mac mini M1 8Gb falls short. Is there hardware you can recommend? MacMini M4 24Gb? Or go for some mini PC, but which one? Linux based seems to be the best way to go. Just wondering what you guys use here. thx

What is everyone using for optimization_time_step with Amber?

I currently have:

  • optimization_time_step: 5
  • delta_forecast_daily: 1
  • prediction_horizon: 288

The problem is that it generates too much data and HA is unable to store it:

2026-01-12 09:40:05.216 WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for sensor.p_pv_forecast exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored
...

Any suggestions?

Using the Add-On and I’m trying out the new thermal_battery.
Unfortunately with no success yet.
This is the rest_command inside my configuration.yaml in HA:

emhass_thermal_battery_optim:
    url: http://192.168.178.149:5005/action/dayahead-optim
    method: POST
    content_type: "application/json"
    timeout: 300
    payload: >-
      {
      "load_cost_forecast":{{((state_attr('sensor.nord_pool_electricity_prices', 'data') | map(attribute='price') | list))[now().hour*4 + (now().minute / 15) | int:][:96] }},
      "outdoor_temperature_forecast": {{ (state_attr('sensor.temperaturvorhersage_24h_15min', 'forecast') | map(attribute='temperature') | list)[:96] }},
      "def_load_config": [
          {
            "thermal_battery": 
            {
              "supply_temperature": 32.0,
              "volume": 42.5,
              "start_temperature": {{ states('sensor.ecodan_heatpump_z1_feed_temp') | float }},
              "min_temperatures": {{ [20.0] * 96 }},
              "max_temperatures": {{ [24.0] * 96 }},
              "carnot_efficiency": 0.42,
              "u_value": 0.35,
              "envelope_area": 363.0,
              "ventilation_rate": 0.4,
              "heated_volume": 400.0,
              "window_area": 50.0,
              "shgc": 0.6
            }
           },
          {},
          {},
          {}
        ]
      }

Can someone help me out here. It’s not producing any useful output. I have three deferrable loads. Is the syntax inside def_load_config correct??
All other values are taken from the UI, right?

What do you mean by ā€œuseful outputā€? What does the logs says?
Check that your sensor ā€œsensor.ecodan_heatpump_z1_feed_tempā€ does not have values below 20°C, otherwise this results in unfeasible optimization. Check that your start_temperature is already within the bounds.
Provide more context on your config to help

Basically all def_loads are zero.

Here’s my config:

{
  "adjusted_pv_model_max_age": 24,
  "adjusted_pv_regression_model": "LassoRegression",
  "adjusted_pv_solar_elevation_threshold": 10,
  "battery_charge_efficiency": 0.95,
  "battery_charge_power_max": 1000,
  "battery_discharge_efficiency": 0.95,
  "battery_discharge_power_max": 1000,
  "battery_dynamic_max": 0.9,
  "battery_dynamic_min": -0.9,
  "battery_maximum_state_of_charge": 0.9,
  "battery_minimum_state_of_charge": 0.3,
  "battery_nominal_energy_capacity": 5000,
  "battery_stress_cost": 0,
  "battery_stress_segments": 10,
  "battery_target_state_of_charge": 0.6,
  "compute_curtailment": false,
  "continual_publish": false,
  "costfun": "self-consumption",
  "delta_forecast_daily": 1,
  "end_timesteps_of_each_deferrable_load": [
    0,
    28,
    64,
    0
  ],
  "historic_days_to_retrieve": 2,
  "influxdb_database": "homeassistant",
  "influxdb_host": "192.168.178.149",
  "influxdb_measurement": "W",
  "influxdb_password": "influx-db-user",
  "influxdb_port": 8086,
  "influxdb_retention_policy": "autogen",
  "influxdb_use_ssl": false,
  "influxdb_username": "influx-db-user",
  "influxdb_verify_ssl": false,
  "inverter_ac_input_max": 1000,
  "inverter_ac_output_max": 1000,
  "inverter_efficiency_ac_dc": 1,
  "inverter_efficiency_dc_ac": 1,
  "inverter_is_hybrid": false,
  "inverter_stress_cost": 0,
  "inverter_stress_segments": 10,
  "load_cost_forecast_method": "hp_hc_periods",
  "load_forecast_method": "naive",
  "load_negative": false,
  "load_offpeak_hours_cost": 0.1419,
  "load_peak_hour_periods": {
    "period_hp_1": [
      {
        "start": "08:00"
      },
      {
        "end": "12:00"
      }
    ],
    "period_hp_2": [
      {
        "start": "15:00"
      },
      {
        "end": "18:00"
      }
    ]
  },
  "load_peak_hours_cost": 0.1907,
  "logging_level": "DEBUG",
  "lp_solver": "default",
  "lp_solver_path": "empty",
  "lp_solver_timeout": 45,
  "maximum_power_from_grid": 9000,
  "maximum_power_to_grid": 9000,
  "method_ts_round": "first",
  "minimum_power_of_deferrable_loads": [
    0,
    0,
    0,
    0
  ],
  "model_type": "load_forecast",
  "modules_per_string": [
    12,
    11,
    12
  ],
  "nominal_power_of_deferrable_loads": [
    1750,
    2250,
    2250,
    2250
  ],
  "num_lags": 48,
  "num_threads": 0,
  "number_of_deferrable_loads": 4,
  "open_meteo_cache_max_age": 30,
  "operating_hours_of_each_deferrable_load": [
    0,
    0,
    0,
    0
  ],
  "optimization_time_step": 15,
  "perform_backtest": false,
  "photovoltaic_production_sell_price": 0.07553,
  "production_price_forecast_method": "constant",
  "pv_inverter_model": [
    "Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_",
    "Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_",
    "Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_"
  ],
  "pv_module_model": [
    "Trina_Solar_TSM_465DEG15VC_20_II_",
    "Trina_Solar_TSM_465DEG15VC_20_II_",
    "Trina_Solar_TSM_465DEG15VC_20_II_"
  ],
  "sensor_linear_interp": [
    "sensor.power_photovoltaics"
  ],
  "sensor_power_load_no_var_loads": "sensor.power_load_no_var_loads",
  "sensor_power_photovoltaics": "sensor.pv_inverter_watts",
  "sensor_power_photovoltaics_forecast": "sensor.p_pv_forecast",
  "sensor_replace_zero": [
    "sensor.power_photovoltaics"
  ],
  "set_battery_dynamic": false,
  "set_deferrable_load_single_constant": [
    false,
    false,
    false,
    false
  ],
  "set_deferrable_startup_penalty": [
    400,
    250,
    250,
    250
  ],
  "set_nocharge_from_grid": false,
  "set_nodischarge_to_grid": true,
  "set_total_pv_sell": false,
  "set_use_adjusted_pv": false,
  "set_use_battery": false,
  "set_use_pv": true,
  "set_zero_min": true,
  "sklearn_model": "KNeighborsRegressor",
  "split_date_delta": "48h",
  "start_timesteps_of_each_deferrable_load": [
    0,
    0,
    56,
    86
  ],
  "strings_per_inverter": [
    1,
    1,
    1
  ],
  "surface_azimuth": [
    85,
    175,
    265
  ],
  "surface_tilt": [
    21,
    21,
    21
  ],
  "treat_deferrable_load_as_semi_cont": [
    true,
    true,
    true,
    true
  ],
  "use_influxdb": true,
  "use_websocket": false,
  "var_model": "sensor.power_load_no_var_loads",
  "weather_forecast_method": "open-meteo",
  "weight_battery_charge": 0,
  "weight_battery_discharge": 0
}

Here’s the log:

[2026-01-13 22:36:43,173] INFO in web_server:  >> Obtaining params: 
[2026-01-13 22:36:43,175] INFO in web_server: Passed runtime parameters: {'load_cost_forecast': [0.301, 0.296, 0.303, 0.292, 0.288, 0.281, 0.299, 0.296, 0.291, 0.291, 0.294, 0.292, 0.293, 0.292, 0.295, 0.295, 0.295, 0.294, 0.295, 0.295, 0.295, 0.295, 0.294, 0.296, 0.298, 0.3, 0.299, 0.299, 0.299, 0.3, 0.297, 0.304, 0.308, 0.314, 0.306, 0.312, 0.317, 0.336, 0.337, 0.348, 0.349, 0.349, 0.363, 0.356, 0.345, 0.335, 0.342, 0.332, 0.326, 0.324, 0.326, 0.322, 0.318, 0.316, 0.317, 0.315, 0.316, 0.315, 0.315, 0.314, 0.315, 0.32, 0.315, 0.323, 0.341, 0.354, 0.336, 0.348, 0.385, 0.389, 0.326, 0.35, 0.381, 0.44, 0.389, 0.435, 0.459, 0.439, 0.42, 0.408, 0.401, 0.409, 0.418, 0.385, 0.368, 0.355, 0.374, 0.354, 0.346, 0.334, 0.359, 0.35, 0.326, 0.315, 0.342, 0.346], 'outdoor_temperature_forecast': [3.9, 3.9, 3.9, 3.9, 4.1, 4.1, 4.1, 4.1, 4.7, 4.7, 4.7, 4.7, 5.1, 5.1, 5.1, 5.1, 5.2, 5.2, 5.2, 5.2, 5.0, 5.0, 5.0, 5.0, 4.7, 4.7, 4.7, 4.7, 4.4, 4.4, 4.4, 4.4, 4.0, 4.0, 4.0, 4.0, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 3.9, 4.1, 4.1, 4.1, 4.1, 4.5, 4.5, 4.5, 4.5, 4.8, 4.8, 4.8, 4.8, 4.7, 4.7, 4.7, 4.7, 4.9, 4.9, 4.9, 4.9, 4.8, 4.8, 4.8, 4.8, 4.7, 4.7, 4.7, 4.7, 4.4, 4.4, 4.4, 4.4, 4.2, 4.2, 4.2, 4.2, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.2, 4.2, 4.2, 4.2, 4.1, 4.1, 4.1, 4.1], 'def_load_config': [{'thermal_battery': {'supply_temperature': 32.0, 'volume': 42.5, 'start_temperature': 22, 'min_temperatures': [20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0], 'max_temperatures': [24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0], 'carnot_efficiency': 0.42, 'u_value': 0.35, 'envelope_area': 773.0, 'ventilation_rate': 0.4, 'heated_volume': 900.0, 'window_area': 110.0, 'shgc': 0.6}}, {}, {}, {}]}
[2026-01-13 22:36:43,175] INFO in web_server:  >> Setting input data dict
[2026-01-13 22:36:43,176] INFO in command_line: Setting up needed data
[2026-01-13 22:36:43,179] INFO in retrieve_hass: InfluxDB integration enabled: 192.168.178.149:8086/homeassistant
[2026-01-13 22:36:43,179] INFO in retrieve_hass: get HA config from rest api.
[2026-01-13 22:36:43,188] INFO in forecast: Retrieving weather forecast data using method = open-meteo
[2026-01-13 22:36:43,188] INFO in forecast: Loading existing cached Open-Meteo JSON file: /data/cached-open-meteo-forecast-b.json
[2026-01-13 22:36:43,190] INFO in forecast: The cached Open-Meteo JSON file is recent (age=5m, max_age=30m)
[2026-01-13 22:36:43,946] INFO in forecast: Retrieving data from hass for load forecast using method = naive
[2026-01-13 22:36:43,946] INFO in retrieve_hass: InfluxDB integration enabled: 192.168.178.149:8086/homeassistant
[2026-01-13 22:36:43,948] INFO in retrieve_hass: Retrieve InfluxDB get data method initiated...
[2026-01-13 22:36:43,951] INFO in retrieve_hass: Retrieving 1 sensors over 1 days from InfluxDB
[2026-01-13 22:36:43,969] INFO in retrieve_hass: Retrieved 183 data points for sensor.power_load_no_var_loads
[2026-01-13 22:36:43,979] INFO in retrieve_hass: InfluxDB data retrieval completed: (183, 1)
[2026-01-13 22:36:43,986] INFO in web_server:  >> Performing dayahead-optim...
[2026-01-13 22:36:43,986] INFO in command_line: Performing day-ahead forecast optimization
[2026-01-13 22:36:44,003] INFO in optimization: Perform optimization for the day-ahead
[2026-01-13 22:36:44,050] WARNING in optimization: Solver default unknown, using default
[2026-01-13 22:36:44,161] INFO in optimization: Status: Optimal
[2026-01-13 22:36:44,162] INFO in optimization: Total value of the Cost function = -4075.10
[2026-01-13 22:36:44,167] INFO in optimization: Optimization status: Optimal

And here’s the output:

Maybe your parameters are leading to an ā€œOptimalā€ solution of doing nothing.
From your config this is normal for loads 2, 3 and 4 since you set operating_hours_of_each_deferrable_load for those to 0.
Now for the thermal load, maybe increase your min_temperatures to be higher than your start_temperature to force heating. Your 110m2 area is correct or a typo?

A new version has been released!

In this version there are a lots of improvements to the code reliability and maintainability.

There is one new feature that tries to greatly simplify the setup of the PV installation, now we can select PV module and inverter models by approximate power rating in addition to explicit database names. The code will automatically search an existent model in the database that matches the given nominal power.

Also reorganized and gave a new look to the documentation! :partying_face:

4 Likes

In the meantime I was exactly looking at operating_hours_of_each_deferrable_load. I erased all the 0…now I’m unable to view the config as code in the UI…just no reaction.
And the operating_hours_of_each_deferrable_load is not visible anymore :grimacing:

Can you share the debug logs. These should include the information, if the thermal battery load is correctly detected.

Thanks for your help. I will post them.
But first I need to get my UI working again. It seems that I can’t make any changes there anymore. It’s just not reacting to any changes. So, no save possible, deferrable loads settings are incomplete.
I would like to get into the ā€œcode-modeā€


to set the 0’s again for ā€˜operating_hours_of_each_deferrable_load’ but that’s also not possible. I kind of crashed the configuration page.

[2026-01-14 07:40:00,481] DEBUG in optimization: Initialized Optimization with retrieve_hass_conf: {'optimization_time_step': Timedelta('0 days 00:15:00'), 'historic_days_to_retrieve': 2, 'sensor_power_photovoltaics': 'sensor.pv_inverter_watts', 'sensor_power_photovoltaics_forecast': 'sensor.p_pv_forecast', 'sensor_power_load_no_var_loads': 'sensor.power_load_no_var_loads', 'load_negative': False, 'set_zero_min': True, 'sensor_replace_zero': ['sensor.power_photovoltaics'], 'sensor_linear_interp': ['sensor.power_photovoltaics'], 'use_influxdb': True, 'influxdb_host': '192.168.178.149', 'influxdb_port': 8086, 'influxdb_username': 'influx-db-user', 'influxdb_password': 'influx-db-user', 'influxdb_database': 'homeassistant', 'influxdb_measurement': 'W', 'influxdb_retention_policy': 'autogen', 'influxdb_use_ssl': False, 'influxdb_verify_ssl': False, 'method_ts_round': 'first', 'continual_publish': False, 'use_websocket': False, 'hass_url': 'http://supervisor/core/api', 'long_lived_token': '0e270787fc67c3cec2f9250a067c981a6c0ecd49115c102232745a8119cd14e76677e00d4a3074386cf82d5706b06f0e8ae7a6d669fbf58d', 'time_zone': <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD>, 'Latitude': 50.64753866400673, 'Longitude': 7.933228611946107, 'Altitude': 525}
[2026-01-14 07:40:00,482] DEBUG in optimization: Optimization configuration: {'costfun': 'self-consumption', 'logging_level': 'DEBUG', 'set_use_pv': True, 'set_use_adjusted_pv': False, 'adjusted_pv_regression_model': 'LassoRegression', 'adjusted_pv_solar_elevation_threshold': 10, 'adjusted_pv_model_max_age': 24, 'set_use_battery': False, 'number_of_deferrable_loads': 4, 'nominal_power_of_deferrable_loads': [1750, 2250, 2250, 2250], 'minimum_power_of_deferrable_loads': [0, 0, 0, 0], 'operating_hours_of_each_deferrable_load': [None, None, None, None], 'treat_deferrable_load_as_semi_cont': [True, True, True, True], 'set_deferrable_load_single_constant': [False, False, False, False], 'set_deferrable_startup_penalty': [400, 250, 250, 250], 'delta_forecast_daily': Timedelta('1 days 00:00:00'), 'load_forecast_method': 'naive', 'load_cost_forecast_method': 'hp_hc_periods', 'load_peak_hours_cost': 0.1907, 'load_offpeak_hours_cost': 0.1419, 'production_price_forecast_method': 'constant', 'photovoltaic_production_sell_price': 0.07553, 'set_total_pv_sell': False, 'lp_solver': 'default', 'lp_solver_path': 'empty', 'lp_solver_timeout': 45, 'num_threads': 0, 'set_nocharge_from_grid': False, 'set_nodischarge_to_grid': True, 'set_battery_dynamic': False, 'battery_dynamic_max': 0.9, 'battery_dynamic_min': -0.9, 'weight_battery_discharge': 0.0, 'weight_battery_charge': 0.0, 'weather_forecast_method': 'open-meteo', 'open_meteo_cache_max_age': 30, 'start_timesteps_of_each_deferrable_load': [0, 0, 56, 86], 'end_timesteps_of_each_deferrable_load': [0, 28, 64, 0], 'load_peak_hour_periods': {'period_hp_1': [{'start': '08:00'}, {'end': '12:00'}], 'period_hp_2': [{'start': '15:00'}, {'end': '18:00'}]}, 'model_type': 'load_forecast', 'var_model': 'sensor.power_load_no_var_loads', 'sklearn_model': 'KNeighborsRegressor', 'num_lags': 48, 'split_date_delta': '48h', 'perform_backtest': False}
[2026-01-14 07:40:00,482] DEBUG in optimization: Plant configuration: {'maximum_power_from_grid': 9000, 'maximum_power_to_grid': 9000, 'pv_module_model': ['Trina_Solar_TSM_465DEG15VC_20_II_', 'Trina_Solar_TSM_465DEG15VC_20_II_', 'Trina_Solar_TSM_465DEG15VC_20_II_'], 'pv_inverter_model': ['Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_', 'Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_', 'Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_'], 'surface_tilt': [21, 21, 21], 'surface_azimuth': [85, 175, 265], 'modules_per_string': [12, 11, 12], 'strings_per_inverter': [1, 1, 1], 'inverter_is_hybrid': False, 'inverter_ac_output_max': 1000, 'inverter_ac_input_max': 1000, 'inverter_efficiency_dc_ac': 1, 'inverter_efficiency_ac_dc': 1, 'inverter_stress_cost': 0, 'inverter_stress_segments': 10, 'compute_curtailment': False, 'battery_discharge_power_max': 1000, 'battery_charge_power_max': 1000, 'battery_discharge_efficiency': 0.95, 'battery_charge_efficiency': 0.95, 'battery_nominal_energy_capacity': 5000, 'battery_minimum_state_of_charge': 0.3, 'battery_maximum_state_of_charge': 0.9, 'battery_target_state_of_charge': 0.6, 'battery_stress_cost': 0.0, 'battery_stress_segments': 10}

please see → 'operating_hours_of_each_deferrable_load': [None, None, None, None]

There must be some way to change that again…

@soco

Although I haven’t yet solved my configuration UI problem, here are the logs from the rest command:

emhass_thermal_battery_optim:
    url: http://192.168.178.149:5005/action/dayahead-optim
    method: POST
    content_type: "application/json"
    timeout: 300
    payload: >-
      {
      "load_cost_forecast":{{((state_attr('sensor.nord_pool_electricity_prices', 'data') | map(attribute='price') | list))[now().hour*4 + (now().minute / 15) | int:][:96] }},
      "outdoor_temperature_forecast": {{ (state_attr('sensor.temperaturvorhersage_24h_15min', 'forecast') | map(attribute='temperature') | list)[:96] }},
      "operating_hours_of_each_deferrable_load": [0,0,0,0],
      "def_load_config": [
          {
            "thermal_battery": 
            {
              "supply_temperature": 32.0,
              "volume": 26.5,
              "start_temperature": 22,
              "min_temperatures": {{ [23.0] * 96 }},
              "max_temperatures": {{ [24.0] * 96 }},
              "carnot_efficiency": 0.42,
              "u_value": 0.35,
              "envelope_area": 473.0,
              "ventilation_rate": 0.4,
              "heated_volume": 500.0,
              "window_area": 45.0,
              "shgc": 0.6
            }
           },
          {},
          {},
          {}
        ]
      }
[2026-01-14 15:12:26,010] INFO in web_server:  >> Obtaining params: 
[2026-01-14 15:12:26,017] INFO in web_server: Passed runtime parameters: {'load_cost_forecast': [0.336, 0.348, 0.385, 0.389, 0.326, 0.35, 0.381, 0.44, 0.389, 0.435, 0.459, 0.439, 0.42, 0.408, 0.401, 0.409, 0.418, 0.385, 0.368, 0.355, 0.374, 0.354, 0.346, 0.334, 0.359, 0.35, 0.326, 0.315, 0.342, 0.346, 0.315, 0.309, 0.319, 0.309, 0.305, 0.299, 0.324, 0.316, 0.307, 0.303, 0.31, 0.306, 0.303, 0.3, 0.305, 0.299, 0.296, 0.296, 0.296, 0.295, 0.293, 0.291, 0.291, 0.291, 0.291, 0.293, 0.293, 0.293, 0.296, 0.299, 0.304, 0.307, 0.309, 0.317, 0.312, 0.315, 0.318, 0.324, 0.318, 0.321, 0.318, 0.314, 0.32, 0.315, 0.311, 0.307, 0.32, 0.314, 0.309, 0.306, 0.314, 0.31, 0.307, 0.306, 0.307, 0.304, 0.305, 0.307, 0.31, 0.312, 0.314, 0.314, 0.313, 0.318, 0.317, 0.326], 'outdoor_temperature_forecast': [5.3, 5.3, 5.3, 5.3, 5.1, 5.1, 5.1, 5.1, 5.2, 5.2, 5.2, 5.2, 5.1, 5.1, 5.1, 5.1, 5.0, 5.0, 5.0, 5.0, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 4.6, 4.6, 4.6, 4.6, 4.1, 4.1, 4.1, 4.1, 4.2, 4.2, 4.2, 4.2, 3.8, 3.8, 3.8, 3.8, 3.7, 3.7, 3.7, 3.7, 3.9, 3.9, 3.9, 3.9, 4.1, 4.1, 4.1, 4.1, 4.2, 4.2, 4.2, 4.2, 4.3, 4.3, 4.3, 4.3, 4.1, 4.1, 4.1, 4.1, 4.2, 4.2, 4.2, 4.2, 4.6, 4.6, 4.6, 4.6, 4.8, 4.8, 4.8, 4.8, 5.1, 5.1, 5.1, 5.1, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.7, 5.8, 5.8, 5.8, 5.8], 'operating_hours_of_each_deferrable_load': [0, 0, 0, 0], 'def_load_config': [{'thermal_battery': {'supply_temperature': 32.0, 'volume': 26.5, 'start_temperature': 22, 'min_temperatures': [23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0], 'max_temperatures': [24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0, 24.0], 'carnot_efficiency': 0.42, 'u_value': 0.35, 'envelope_area': 473.0, 'ventilation_rate': 0.4, 'heated_volume': 500.0, 'window_area': 45.0, 'shgc': 0.6}}, {}, {}, {}]}
[2026-01-14 15:12:26,018] INFO in web_server:  >> Setting input data dict
[2026-01-14 15:12:26,018] INFO in command_line: Setting up needed data
[2026-01-14 15:12:26,032] DEBUG in utils: setting`passed_data:days_to_retrieve` to 9 for fit/predict/tune
[2026-01-14 15:12:26,034] DEBUG in retrieve_hass: Websocket integration disabled, using Home Assistant API
[2026-01-14 15:12:26,034] INFO in retrieve_hass: InfluxDB integration enabled: 192.168.178.149:8086/homeassistant
[2026-01-14 15:12:26,035] INFO in retrieve_hass: get HA config from rest api.
[2026-01-14 15:12:26,055] DEBUG in optimization: Initialized Optimization with retrieve_hass_conf: {'optimization_time_step': Timedelta('0 days 00:15:00'), 'historic_days_to_retrieve': 2, 'sensor_power_photovoltaics': 'sensor.pv_inverter_watts', 'sensor_power_photovoltaics_forecast': 'sensor.p_pv_forecast', 'sensor_power_load_no_var_loads': 'sensor.power_load_no_var_loads', 'load_negative': False, 'set_zero_min': True, 'sensor_replace_zero': ['sensor.power_photovoltaics'], 'sensor_linear_interp': ['sensor.power_photovoltaics'], 'use_influxdb': True, 'influxdb_host': '192.168.178.149', 'influxdb_port': 8086, 'influxdb_username': 'influx-db-user', 'influxdb_password': 'influx-db-user', 'influxdb_database': 'homeassistant', 'influxdb_measurement': 'W', 'influxdb_retention_policy': 'autogen', 'influxdb_use_ssl': False, 'influxdb_verify_ssl': False, 'method_ts_round': 'first', 'continual_publish': False, 'use_websocket': False, 'hass_url': 'http://supervisor/core/api', 'long_lived_token': '0e270787fc67c3cec2f9250a067c981a6c0ecd49115c102232745a8119cd14e76677e00d4a3074386cf82d5706b06f0e8ae7a6d669fbf58d', 'time_zone': <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD>, 'Latitude': 50.64753866400673, 'Longitude': 7.933228611946107, 'Altitude': 525}
[2026-01-14 15:12:26,055] DEBUG in optimization: Optimization configuration: {'costfun': 'self-consumption', 'logging_level': 'DEBUG', 'set_use_pv': True, 'set_use_adjusted_pv': False, 'adjusted_pv_regression_model': 'LassoRegression', 'adjusted_pv_solar_elevation_threshold': 10, 'adjusted_pv_model_max_age': 24, 'set_use_battery': False, 'number_of_deferrable_loads': 4, 'nominal_power_of_deferrable_loads': [1750, 2250, 2250, 2250], 'minimum_power_of_deferrable_loads': [0, 0, 0, 0], 'operating_hours_of_each_deferrable_load': [0, 0, 0, 0], 'treat_deferrable_load_as_semi_cont': [True, True, True, True], 'set_deferrable_load_single_constant': [False, False, False, False], 'set_deferrable_startup_penalty': [400, 250, 250, 250], 'delta_forecast_daily': Timedelta('1 days 00:00:00'), 'load_forecast_method': 'naive', 'load_cost_forecast_method': 'list', 'load_peak_hours_cost': 0.1907, 'load_offpeak_hours_cost': 0.1419, 'production_price_forecast_method': 'constant', 'photovoltaic_production_sell_price': 0.07553, 'set_total_pv_sell': False, 'lp_solver': 'default', 'lp_solver_path': 'empty', 'lp_solver_timeout': 45, 'num_threads': 0, 'set_nocharge_from_grid': False, 'set_nodischarge_to_grid': True, 'set_battery_dynamic': False, 'battery_dynamic_max': 0.9, 'battery_dynamic_min': -0.9, 'weight_battery_discharge': 0.0, 'weight_battery_charge': 0.0, 'weather_forecast_method': 'open-meteo', 'open_meteo_cache_max_age': 30, 'start_timesteps_of_each_deferrable_load': [0, 0, 56, 86], 'end_timesteps_of_each_deferrable_load': [0, 28, 64, 0], 'load_peak_hour_periods': {'period_hp_1': [{'start': '08:00'}, {'end': '12:00'}], 'period_hp_2': [{'start': '15:00'}, {'end': '18:00'}]}, 'model_type': 'load_forecast', 'var_model': 'sensor.power_load_no_var_loads', 'sklearn_model': 'KNeighborsRegressor', 'num_lags': 48, 'split_date_delta': '48h', 'perform_backtest': False, 'outdoor_temperature_forecast_method': 'list'}
[2026-01-14 15:12:26,055] DEBUG in optimization: Plant configuration: {'maximum_power_from_grid': 9000, 'maximum_power_to_grid': 9000, 'pv_module_model': ['Trina_Solar_TSM_465DEG15VC_20_II_', 'Trina_Solar_TSM_465DEG15VC_20_II_', 'Trina_Solar_TSM_465DEG15VC_20_II_'], 'pv_inverter_model': ['Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_', 'Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_', 'Fronius_International_GmbH__Fronius_Primo_10_0_1_208_240__240V_'], 'surface_tilt': [21, 21, 21], 'surface_azimuth': [85, 175, 265], 'modules_per_string': [12, 11, 12], 'strings_per_inverter': [1, 1, 1], 'inverter_is_hybrid': False, 'inverter_ac_output_max': 1000, 'inverter_ac_input_max': 1000, 'inverter_efficiency_dc_ac': 1, 'inverter_efficiency_ac_dc': 1, 'inverter_stress_cost': 0, 'inverter_stress_segments': 10, 'compute_curtailment': False, 'battery_discharge_power_max': 1000, 'battery_charge_power_max': 1000, 'battery_discharge_efficiency': 0.95, 'battery_charge_efficiency': 0.95, 'battery_nominal_energy_capacity': 5000, 'battery_minimum_state_of_charge': 0.3, 'battery_maximum_state_of_charge': 0.9, 'battery_target_state_of_charge': 0.6, 'battery_stress_cost': 0.0, 'battery_stress_segments': 10}
[2026-01-14 15:12:26,056] DEBUG in optimization: Solver configuration: lp_solver=default, lp_solver_path=empty
[2026-01-14 15:12:26,056] DEBUG in optimization: Number of threads: 2
[2026-01-14 15:12:26,057] INFO in forecast: Retrieving weather forecast data using method = open-meteo
[2026-01-14 15:12:26,058] DEBUG in forecast: Open-Meteo forecast_days is low (1) so defaulting to 3 days
[2026-01-14 15:12:26,058] INFO in forecast: Loading existing cached Open-Meteo JSON file: /data/cached-open-meteo-forecast-b.json
[2026-01-14 15:12:26,061] INFO in forecast: The cached Open-Meteo JSON file is recent (age=8m, max_age=30m)
[2026-01-14 15:12:26,084] DEBUG in forecast: get_weather_forecast returning:
                           temp_air  relative_humidity  ...   dhi    dni
2026-01-14 15:00:00+01:00       6.1                100  ...  24.7    0.0
2026-01-14 15:15:00+01:00       6.1                100  ...  18.7    0.0
2026-01-14 15:30:00+01:00       6.1                100  ...  17.5    0.0
2026-01-14 15:45:00+01:00       6.0                 99  ...  10.8    0.0
2026-01-14 16:00:00+01:00       6.0                 99  ...   6.9    0.0
...                             ...                ...  ...   ...    ...
2026-01-15 13:45:00+01:00       6.4                 94  ...  85.5   97.0
2026-01-15 14:00:00+01:00       6.4                 94  ...  95.8  148.7
2026-01-15 14:15:00+01:00       6.4                 93  ...  79.7  104.8
2026-01-15 14:30:00+01:00       6.4                 92  ...  70.5  106.8
2026-01-15 14:45:00+01:00       6.4                 91  ...  57.5   61.2
[96 rows x 8 columns]
[2026-01-14 15:12:26,933] DEBUG in forecast: get_power_from_weather returning:
2026-01-14 15:00:00+01:00     223.164155
2026-01-14 15:15:00+01:00     129.513101
2026-01-14 15:30:00+01:00     110.860924
2026-01-14 15:45:00+01:00       7.600377
2026-01-14 16:00:00+01:00       0.000000
                                ...     
2026-01-15 13:45:00+01:00    1752.908022
2026-01-15 14:00:00+01:00    2192.669374
2026-01-15 14:15:00+01:00    1658.385429
2026-01-15 14:30:00+01:00    1493.941598
2026-01-15 14:45:00+01:00    1037.679020
Freq: 15min, Length: 96, dtype: float64
[2026-01-14 15:12:26,936] INFO in forecast: Retrieving data from hass for load forecast using method = naive
[2026-01-14 15:12:26,936] DEBUG in retrieve_hass: Websocket integration disabled, using Home Assistant API
[2026-01-14 15:12:26,936] INFO in retrieve_hass: InfluxDB integration enabled: 192.168.178.149:8086/homeassistant
[2026-01-14 15:12:26,937] INFO in retrieve_hass: Retrieve InfluxDB get data method initiated...
[2026-01-14 15:12:26,940] DEBUG in retrieve_hass: Successfully connected to InfluxDB at 192.168.178.149:8086
[2026-01-14 15:12:26,941] INFO in retrieve_hass: Retrieving 1 sensors over 1 days from InfluxDB
[2026-01-14 15:12:26,941] DEBUG in retrieve_hass: Time range: 2026-01-13 00:00:00 to 2026-01-14 14:12:26.941213
[2026-01-14 15:12:26,941] DEBUG in retrieve_hass: End time capped at current time (requested: 2026-01-15 00:00:00)
[2026-01-14 15:12:26,941] DEBUG in retrieve_hass: Retrieving sensor: sensor.power_load_no_var_loads
[2026-01-14 15:12:26,945] DEBUG in retrieve_hass: Searching for entity 'power_load_no_var_loads' across 37 measurements
[2026-01-14 15:12:26,946] DEBUG in retrieve_hass: Checking measurement 'EUR/kWh' with tag query: SHOW TAG VALUES FROM "EUR/kWh" WITH KEY = "entity_id"
[2026-01-14 15:12:26,950] DEBUG in retrieve_hass: Checking measurement '€/kWh' with tag query: SHOW TAG VALUES FROM "€/kWh" WITH KEY = "entity_id"
[2026-01-14 15:12:26,953] DEBUG in retrieve_hass: Checking measurement 'W' with tag query: SHOW TAG VALUES FROM "W" WITH KEY = "entity_id"
[2026-01-14 15:12:26,957] DEBUG in retrieve_hass: Found entity 'power_load_no_var_loads' in measurement 'W'
[2026-01-14 15:12:26,958] DEBUG in retrieve_hass: InfluxDB query: 
        SELECT mean("value") AS "mean_value"
        FROM "homeassistant"."autogen"."W"
        WHERE time >= '2026-01-13T00:00:00Z'
        AND time < '2026-01-14T14:12:26Z'
        AND "entity_id"='power_load_no_var_loads'
        GROUP BY time(15m) FILL(previous)
[2026-01-14 15:12:26,972] INFO in retrieve_hass: Retrieved 153 data points for sensor.power_load_no_var_loads
[2026-01-14 15:12:26,977] DEBUG in retrieve_hass: Successfully retrieved 153 data points for 'power_load_no_var_loads' from measurement 'W'
[2026-01-14 15:12:26,980] INFO in retrieve_hass: InfluxDB data retrieval completed: (153, 1)
[2026-01-14 15:12:26,980] DEBUG in retrieve_hass: prepare_data self.var_list=['sensor.power_load_no_var_loads']
[2026-01-14 15:12:26,981] DEBUG in retrieve_hass: prepare_data var_load=sensor.power_load_no_var_loads
[2026-01-14 15:12:26,982] DEBUG in retrieve_hass: prepare_data var_list updated after rename: ['sensor.power_load_no_var_loads_positive']
[2026-01-14 15:12:26,985] WARNING in retrieve_hass: Unable to find all the sensors in sensor_replace_zero parameter
[2026-01-14 15:12:26,985] WARNING in retrieve_hass: Confirm sure all sensors in sensor_replace_zero are sensor_power_photovoltaics and/or sensor_power_load_no_var_loads
[2026-01-14 15:12:26,990] DEBUG in forecast: get_load_forecast returning:
2026-01-14 15:00:00+01:00     758.607143
2026-01-14 15:15:00+01:00    2517.000000
2026-01-14 15:30:00+01:00     903.518519
2026-01-14 15:45:00+01:00     539.148148
2026-01-14 16:00:00+01:00     478.785714
                                ...     
2026-01-15 13:45:00+01:00      99.068966
2026-01-15 14:00:00+01:00     544.545714
2026-01-15 14:15:00+01:00     275.457576
2026-01-15 14:30:00+01:00     275.181818
2026-01-15 14:45:00+01:00     319.682759
Name: yhat, Length: 96, dtype: float64
[2026-01-14 15:12:26,993] INFO in web_server:  >> Performing dayahead-optim...
[2026-01-14 15:12:26,993] INFO in command_line: Performing day-ahead forecast optimization
[2026-01-14 15:12:27,003] DEBUG in forecast: get_load_cost_forecast returning:
                           p_pv_forecast  p_load_forecast  unit_load_cost
2026-01-14 15:00:00+01:00     223.164155       758.607143           0.336
2026-01-14 15:15:00+01:00     129.513101      2517.000000           0.348
2026-01-14 15:30:00+01:00     110.860924       903.518519           0.385
2026-01-14 15:45:00+01:00       7.600377       539.148148           0.389
2026-01-14 16:00:00+01:00       0.000000       478.785714           0.326
...                                  ...              ...             ...
2026-01-15 13:45:00+01:00    1752.908022        99.068966           0.314
2026-01-15 14:00:00+01:00    2192.669374       544.545714           0.313
2026-01-15 14:15:00+01:00    1658.385429       275.457576           0.318
2026-01-15 14:30:00+01:00    1493.941598       275.181818           0.317
2026-01-15 14:45:00+01:00    1037.679020       319.682759           0.326
[96 rows x 3 columns]
[2026-01-14 15:12:27,020] DEBUG in forecast: get_prod_price_forecast returning:
                           p_pv_forecast  ...  unit_prod_price
2026-01-14 15:00:00+01:00     223.164155  ...          0.07553
2026-01-14 15:15:00+01:00     129.513101  ...          0.07553
2026-01-14 15:30:00+01:00     110.860924  ...          0.07553
2026-01-14 15:45:00+01:00       7.600377  ...          0.07553
2026-01-14 16:00:00+01:00       0.000000  ...          0.07553
...                                  ...  ...              ...
2026-01-15 13:45:00+01:00    1752.908022  ...          0.07553
2026-01-15 14:00:00+01:00    2192.669374  ...          0.07553
2026-01-15 14:15:00+01:00    1658.385429  ...          0.07553
2026-01-15 14:30:00+01:00    1493.941598  ...          0.07553
2026-01-15 14:45:00+01:00    1037.679020  ...          0.07553
[96 rows x 4 columns]
[2026-01-14 15:12:27,041] DEBUG in command_line: Merged GHI data into optimization input: mean=18.2 W/m², max=137.8 W/m²
[2026-01-14 15:12:27,041] INFO in optimization: Perform optimization for the day-ahead
[2026-01-14 15:12:27,079] DEBUG in optimization: Processing deferrable load 0
[2026-01-14 15:12:27,079] DEBUG in optimization: Deferrable load 0: Proposed optimization window: 0 --> 0
[2026-01-14 15:12:27,079] DEBUG in optimization: Deferrable load 0: Validated optimization window: 0 --> 0
[2026-01-14 15:12:27,083] DEBUG in optimization: Processing deferrable load 1
[2026-01-14 15:12:27,083] DEBUG in optimization: Deferrable load 1: Proposed optimization window: 0 --> 28
[2026-01-14 15:12:27,084] DEBUG in optimization: Deferrable load 1: Validated optimization window: 0 --> 28
[2026-01-14 15:12:27,088] DEBUG in optimization: Processing deferrable load 2
[2026-01-14 15:12:27,089] DEBUG in optimization: Deferrable load 2: Proposed optimization window: 56 --> 64
[2026-01-14 15:12:27,089] DEBUG in optimization: Deferrable load 2: Validated optimization window: 56 --> 64
[2026-01-14 15:12:27,094] DEBUG in optimization: Processing deferrable load 3
[2026-01-14 15:12:27,094] DEBUG in optimization: Deferrable load 3: Proposed optimization window: 86 --> 0
[2026-01-14 15:12:27,094] DEBUG in optimization: Deferrable load 3: Validated optimization window: 86 --> 0
[2026-01-14 15:12:27,101] WARNING in optimization: Solver default unknown, using default
[2026-01-14 15:12:27,215] INFO in optimization: Status: Optimal
[2026-01-14 15:12:27,216] INFO in optimization: Total value of the Cost function = -2970.92
[2026-01-14 15:12:27,232] DEBUG in optimization: Deferrable load operating hours: [0, 0, 0, 0]
[2026-01-14 15:12:27,233] DEBUG in optimization: Deferrable load timesteps: None
[2026-01-14 15:12:27,233] DEBUG in optimization: Deferrable load start timesteps: [0, 0, 56, 86]
[2026-01-14 15:12:27,234] DEBUG in optimization: Deferrable load end timesteps: [0, 28, 64, 0]
[2026-01-14 15:12:27,235] DEBUG in optimization: Selected cost function type: self-consumption
[2026-01-14 15:12:27,235] DEBUG in optimization: Solver selected: default
[2026-01-14 15:12:27,236] INFO in optimization: Optimization status: Optimal

Following the latest update I see this in the log


[2026-01-14 23:30:07,165] WARNING in retrieve_hass: Unable to find all the sensors in sensor_replace_zero parameter
[2026-01-14 23:30:07,165] WARNING in retrieve_hass: Confirm sure all sensors in sensor_replace_zero are sensor_power_photovoltaics and/or sensor_power_load_no_var_loads

I didn’t change the setup page and the sensor names are correct and exactly the same as before.
Anybody else?

In addition I also see (unsure whether related to the latest release):

[2026-01-14 23:25:35 +0100] [23] [ERROR] Worker (pid:29) was sent SIGTERM!
   Building emhass @ file:///app
      Built emhass @ file:///app
Uninstalled 2 packages in 60ms
Installed 2 packages in 5ms

The def_load_config for thermal_battery and thermal_config is only available with the MPC calls. The day ahead ignores these configurations.

Can you share your configuration?

Did you update EMHASS at 14.01.25 23:25:35? This error indicates, that something (the supervisor or you) stopped the add-on. The following four lines are normal output and don’t indicate any error.

Why??
Is it due to the nature of the model or has it just not yet been implemented for day_ahead?