Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighting for target rate sensors #807

Closed
2 tasks done
rozza-m opened this issue Mar 27, 2024 · 2 comments
Closed
2 tasks done

Weighting for target rate sensors #807

rozza-m opened this issue Mar 27, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rozza-m
Copy link

rozza-m commented Mar 27, 2024

Describe the feature

When you set up a target rate sensor, the end goal isn't to find the cheapest rates, it's to run whatever the power-consumer is for the least amount of money. Which might seem like the same thing, but:

  • My car tails off its consumption as it gets nearly full, so the last hour of charging I'm less sensitive to cost if I can save money overall by having a cheaper rate in the first part
  • I want my immersion heater running for 3 hours, but it's normally up to temperature in the first hour so I care less about the following hours
  • My washer-dryer uses much more energy for the dry cycle at the end than the beginning so I really want that at the cheapest rate, even if it pushes the earlier part into a slightly more expensive rate.
  • I think probably most devices have some kind of non-constant power profile to them that could benefit from this.

Therefore I propose than an optional "weighting" could be added to the target rate sensor. In its simplest form, it is an array that's the same length as the number of half-hour slots and is a set of numbers that act as multipliers to the weight. Could be between >0 and 1, or 1 and 100, or floats. So for my car that's charging for 8 hours I might have [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.7, 0.5]. For my 3-hour long washer-dryer cycle I'd have [0.3, 0,3, 0.3, 0.3, 1, 1]. For my immersion heater perhaps it's [1, 1, 0.4, 0.2] or [2, 2, 1, 0.5]

It might also be worth thinking about a partial weights function so that people who use the service to update target rate sensors can keep a weighting without having to re-calculate it each time which might make automations more difficult. So if my car sometimes needs to charge for 4 hours and sometimes 10 hours I could have something like [..., 0.7, 0.5] to mean "a weighting of 1 until the last 2 slots which are 0.7 and 0.5] and my immersion heater could be [3, ...] which means that the first half hour is weighted 3 times as strongly as the rest. If there's a better solution than ... then obviously that could be used instead.

Expected behaviour

Target rate sensor updated with an optional weights property. The weights applied affect the evaluation of the cheapest (or, I guess most expensive if it's inverted) tariffs. It simply applies a multiplication factor to the rates before the evaluation.

e.g.

Tariff prices (p)                  14   14   10    7   15   21
Cheapest 3h with no weights                  ^^   ^^   ^^

With weights [0.5, 0.5, 1]	   ^^   ^^   ^^

With weights [1, 0.2, 0.2]			  ^^   ^^   ^^     

Weights supplied as an array or list of values, each of which is the weight for a half-hour period.
Some method of partially establishing weights at the beginning or end only.

Use Case

To be able to find the cheapest price to run appliances that have a non-linear power usage, for example using much more power at the end or beginning.

Confirmation

  • By submitting this feature request, you agree that you have read the documentation and confirmed it does not already exist
  • I am willing/able to help contribute to the solution of this feature
@rozza-m rozza-m added the enhancement New feature or request label Mar 27, 2024
@BottlecapDave
Copy link
Owner

Hello and sorry for the late response. This looks like a duplicate of #733 so closing in favour of that.

@BottlecapDave BottlecapDave closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
@rozza-m
Copy link
Author

rozza-m commented Apr 9, 2024

Aw. I should have checked! Glad it's been raised though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants