BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
535 stars 50 forks source link

Weighting on target rate sensors #733

Closed BottlecapDave closed 1 month ago

BottlecapDave commented 5 months ago

Describe the feature

As mentioned in https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/discussions/721

For space heating, when I first switch the HP on it ramps up power to heat the large volume of water (typically around 2 to 3kW) and after 30 minutes to 1hr it gets to a stable state and will run at somewhere between 0.7 and 2kW depending on demand. So in an ideal world the start window would recognise the power demand profile and use a weighting to seek the optimum start time based on cost. Other use cases would be around washing machine (~70% of energy in first 30 minutes of a 3hr cycle) or dishwasher (~50% of energy in first 30 mins, then ~30% 2 hours later).

Expected behaviour

  1. The config sensor should support a new optional field where weightings can be specified
  2. The weightings should be comma separated and be decimals
  3. The number of items should match the number of required 30 minute chunks (e.g. if 2 hours is required, the weighting field should be 1,1.5,1.5,1 which would put additional weighting in the middle of the target times)
  4. The weighting field should error if not enough chunks are specified (e.g. if 2 hours is required, 1, 1,1,1,1,1, etc would fail)
  5. This should be unit tested

Use Case

For space heating, when I first switch the HP on it ramps up power to heat the large volume of water (typically around 2 to 3kW) and after 30 minutes to 1hr it gets to a stable state and will run at somewhere between 0.7 and 2kW depending on demand. So in an ideal world the start window would recognise the power demand profile and use a weighting to seek the optimum start time based on cost. Other use cases would be around washing machine (~70% of energy in first 30 minutes of a 3hr cycle) or dishwasher (~50% of energy in first 30 mins, then ~30% 2 hours later).

Confirmation

ragg987 commented 5 months ago

Thanks for considering this request. If you ever get round to it I'd be happy to test.

rozza-m commented 2 months ago

I raised an almost identical issue over at #807.

The only suggestion I'd make is that the integration has the awesome ability to modify existing target rates, which is great for things that change duration. It would be great to have a way to support (or rather: not break this) with weighting, so I suggest an ability to weight either the end or the beginning and have the rest filled as 1s. More explanation in #807 .

BottlecapDave commented 1 month ago

Weighting within target rates are now supported with v11.0.0. Please see the docs for how this can be done.

rozza-m commented 3 weeks ago

This looks amazing @BottlecapDave thanks so much!