I use negative values in load_no_var history, without an issue.
I think the sensitivity is if there is a gap in the data over the minimum 2 days, EMHASS cannot do the calculation from internal data.
My workaround is to provide an explicit load_power_forecast in my MPC payload, so EMHASS doesnât need to be calculated. The power forecast can be anything, but I use my HVAC power consumption (as a function of temperature) as that is one of my big loads.
"load_power_forecast": {{
([states('sensor.power_load_no_var_loads')|int] +
states('sensor.hvac_power_forecast') | from_json | map('multiply', 1000) | list
)| tojson
}},
"load_power_forecast": [4217, 6000.0, 6000.0, 6000.0, 6000.0, 6000.0, 8000.0, 8000.0, 8000.0, 8000.0, 6000.0, 6000.0, 4000.0, 4000.0, 4000.0, 4000.0, 2000.0, 2000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 2000.0, 2000.0, 4000.0, 4000.0, 6000.0],