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

Demand Tariff Support (Time of use) #56

Open
trankillity opened this issue Aug 17, 2020 · 1 comment
Open

Demand Tariff Support (Time of use) #56

trankillity opened this issue Aug 17, 2020 · 1 comment

Comments

@trankillity
Copy link

trankillity commented Aug 17, 2020

I understand that the money view currently doesn't support having variable tariffs based on time of use, but would like to propose a design solution for allowing it to do so.

I don't have that much programming experience, but here's how I'd envisage it in my head. The logic should check if energy_consumption_rate or energy_production_rate are List/Dict types. If they are, it should look for the rate and entity variables under each, then run calculations based off those.

An example of the adapted configuration would be:

energy_consumption_rate:
  - rate: 0.2233
    entity: 'sensor.consumption_shoulder'
  - rate: 0.3625
    entity: 'sensor.consumption_peak'
  - rate: 0.2013
    entity: 'sensor.consumption_offpeak'

So this would equate to:

  • 22.33c/kWh for the consumption_shoulder sensor
  • 36.25c/kWh for the consumption_peak sensor
  • 20.13c/kWh for the consumption_offpeak sensor

Generating these sensors with templates shouldn't be particularly difficult, and can easily have a combined sensor too. Correct me if I'm wrong, but I believe this is likely the most elegant solution for this problem.

@gurbyz
Copy link
Owner

gurbyz commented Aug 28, 2020

Good thinking! Since both the money view and the energy view are closely related, this also has to be done for the energy view. You could say that users currently supply their sensor.energy_consumption_total and they should supply the parts (shoulder, peak and offpeak sensor) which this total is made of.

This is also a better solution for #57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants