jonasbkarlsson / ev_smart_charging

Electric vehicle smart charging for Home Assistant.
MIT License
191 stars 28 forks source link

Incorporate fixed electricity tariffs? #130

Open agoberg2 opened 1 year ago

agoberg2 commented 1 year ago

Not an issue, more like an idea for a feature. In Norway we have to pay an extra fixed prices on top of our electricity bill. The amount you have to pay is set based on how much electricity you use within one hour. See for example this page https://www.elvia.no/nettleie/alt-om-nettleiepriser/nettleiepriser-for-privatkunder/

What do you think about trying to incorporate this into the integration? For example by turning off charging for a little while if electricity usage is close to the limits of the tariff. And turning it on again when it resets every hour. Would obviously need a sensor that monitors electricity usage, but alot of people have that.

Great integration by the way!

jonasbkarlsson commented 1 year ago

Thanks for the suggestion. I'm aware of this need. However, there a couple of other things I plan to do first, and also, this is a rather big feature so it's difficult to make any promises.

MrNice2028 commented 1 year ago

I have adjusted the price in the data_generator in the apexcharts-card


type: custom:apexcharts-card now: show: true color: rgb(244,160,0) locale: en header: show: false show_states: true colorize_states: true graph_span: 2d yaxis:

natterangell commented 1 year ago

@agoberg2 I'm not sure if this is useful to you, but I use a statistics sensor to monitor electricity usage over the last 58 minutes, and reduce amps to the charger if the average is approaching the level where the extra tariff will be imposed.

In my case, the source sensor here is a Tibber pulse, adjust as needed

sensor:

  - platform: statistics
    name: "Average power consumption last 58 minutes"
    entity_id: sensor.power_my_address
    state_characteristic: mean
    max_age:
        minutes: 58
    sampling_size: 766
    precision: 0

And then I have a simple automation to limit the charger to 18A and notify me by phone.

alias: Limit charging speed if exceeding 10 kWh
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.average_power_consumption_last_58_minutes
    above: 10000
condition:
  - condition: state
    entity_id: sensor.ehp2w7gj_status
    state: charging
action:
  - service: easee.set_circuit_dynamic_limit
    data:
      device_id: 3f7d4e22a56efcc339b5b00196b881ee
      currentP1: 18
  - service: notify.mobile_app_my_iphone
    data:
      message: Begrenser ladehastighet
mode: single

It usually kicks in a few times a month from November through March. Where I live the tariff component is determined by the average of the three hours with highest consumption during a calendar month, and reducing the charger is by far the most effective way to stay under the desired limit (10 kWh in my case), while still allowing charging at reasonable speeds during the night when its is generally cheaper (22:00-06:00).

I have an additional helper to keep track of the number of times (hours) I've exceeded the threshold, so far that has only happened twice in a year and a half. So this works, this little automation saves me almost 300 NOK per month during the winter.