davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
MIT License
315 stars 63 forks source link

Documentation: The meaning of alpha and beta values ​​is reversed #301

Closed heinemannj closed 4 months ago

heinemannj commented 5 months ago

https://emhass.readthedocs.io/en/latest/forecasts.html#now-current-values-in-forecasts

The meaning of alpha and beta values ​​is reversed!

Based on my investigations:

As a default they will be at 0.5, but if you want to give more weight to measured persistance values, then you can try lower and rising , for example: alpha=0.75, beta=0.25

      {
        "pv_power_forecast": {{
          ([states('sensor.inverter_input_power')|float(0)] +
          (state_attr('sensor.epex_spot_data_net_quantile_forcast', 'data')|map(attribute='p_pv_forecast')|list)[1:48]
          )| tojson
        }},
        "load_cost_forecast": {{
          ([states('sensor.epex_spot_data_net_price')|float(0)|round(2)/100] +
          (state_attr('sensor.epex_spot_data_net_quantile_forcast', 'data')|map(attribute='price_eur_per_kwh')|list)[1:48] 
          )| tojson 
        }},
        "prediction_horizon": {{prediction_horizon}},
        "soc_init": {{states('sensor.battery_state_of_capacity')|float(0)/100}},
        "soc_final": 1.0,
        "def_total_hours": [0,0],
        "alpha": 1,
        "beta": 0,
        "continual_publish":true
      }

image

image

davidusb-geek commented 5 months ago

No I don't agree. Double checked this. A beta=1 and alpha=0 should lead you to fully persistance of rzal current/now values. Which what is said in the documentation.