HomeAssistant-OctopusEnergy icon indicating copy to clipboard operation
HomeAssistant-OctopusEnergy copied to clipboard

Weighting on target rate sensors

Open BottlecapDave opened this issue 1 year ago • 2 comments

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

  • [X] By submitting this feature request, you agree that you have read the documentation and confirmed it does not already exist
  • [X] I am willing/able to help contribute to the solution of this feature

BottlecapDave avatar Feb 01 '24 19:02 BottlecapDave

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

ragg987 avatar Feb 01 '24 19:02 ragg987

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 .

rozza-m avatar Apr 09 '24 18:04 rozza-m

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

BottlecapDave avatar May 12 '24 14:05 BottlecapDave

This looks amazing @BottlecapDave thanks so much!

rozza-m avatar Jun 04 '24 17:06 rozza-m