Giter Club home page Giter Club logo

ev_smart_charging's People

Contributors

dependabot[bot] avatar janneho avatar jonasbkarlsson avatar moorgrove avatar quartien avatar tubalainen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ev_smart_charging's Issues

EV SOC not "live", but available after a refresh - however,...

Version of the custom_component

Version 1.6.0

Configuration

Mazda MX-30, Raspberry Pi 4, Home Assistant Supervisor with countless customizations

Describe the issue

My Mazda provides SOC, however, only after a request from the API of the MyMazda app. The SOC is provided by the API, which requests it from the car over cell network. That update has a couple issues:

  • it takes a while after the request
  • it is not exactly reliable all the time
  • it is rate limited
  • it wakes the car up, which costs charge of the 12V board battery every time (I learned the hard way)

So it should not be requested too many times in a row.

On the plus side, charging the car is pretty slow anyway (it only charges with a single phase, so max 7.5kW). So I guess it should suffice to update SOC once or max twice an hour or something, or request SOC once and assume a fixed rate of charge and a given max capacity of the battery. I think I can achieve that with a custom sensor built in Node RED or AppDaemon.

My point is, is ev_smart_charging able to handle such a situation?

Incorporate fixed electricity tariffs?

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!

Multiple cars using one charger

Would it be possible to support two or more cars using one charger? In my case I have two EVs using the same home charger. A possible solution would be during setup to add two (or more) cars and then to have a switch in the UI to switch between which car is connected, this switch can then be automated using the cars location, "charging port open", "cable connected" etc to automatically determine which car is connected.

On a side note, thank you for this excellent integration, very good :)

Bug after restart

Hi,

I'm running your latest version 1.5.1, but every time I restarted this happens:

Logger: homeassistant.config_entries
Source: config_entries.py:424
First occurred: 13:35:59 (2 occurrences)
Last logged: 13:36:03

Config entry 'EV Smart Charging' for ev_smart_charging integration not ready yet: Input sensors not ready.; Retrying in background

It will work after that, but I'm losing my configuration, I need to adjust the charging speed and the elec. price everytime.

Dynamic setup parameters

Is it possible to set parameters (max price, min soc, target soc, charging complete time) as dynamic inputs eg. input_number.max_price?

BUG: More hours than needed are scheduled when not finding continuous hours

I just noticed that today it was scheduling 6 hours, while it only needs 1 hour to reach the targeted charge (100%) the same issues does not happen if I enable continuous hours.

I guess that the issue may be related to all of the hours chosen having the exact same price and maybe something with it crossing midnight? (I haven't looked into it much)

It may not be the highest priority bug, but I tought I would report it anyways.

Screenshot 2022-12-30 at 18 49 45

Attributes of the sensor with continuous disabled.

current_price: 2.329
EV SOC: 92
EV target SOC: 100.0
Charging is planned: true
Charging start time: 2022-12-30T23:00:00+01:00
Charging stop time: 2022-12-31T07:00:00+01:00
Charging number of hours: 6
raw_two_days: 
- start: '2022-12-30T00:00:00+01:00'
  end: '2022-12-30T01:00:00+01:00'
  value: 1.584
- start: '2022-12-30T01:00:00+01:00'
  end: '2022-12-30T02:00:00+01:00'
  value: 1.536
- start: '2022-12-30T02:00:00+01:00'
  end: '2022-12-30T03:00:00+01:00'
  value: 1.517
- start: '2022-12-30T03:00:00+01:00'
  end: '2022-12-30T04:00:00+01:00'
  value: 1.494
- start: '2022-12-30T04:00:00+01:00'
  end: '2022-12-30T05:00:00+01:00'
  value: 1.494
- start: '2022-12-30T05:00:00+01:00'
  end: '2022-12-30T06:00:00+01:00'
  value: 1.532
- start: '2022-12-30T06:00:00+01:00'
  end: '2022-12-30T07:00:00+01:00'
  value: 1.591
- start: '2022-12-30T07:00:00+01:00'
  end: '2022-12-30T08:00:00+01:00'
  value: 1.713
- start: '2022-12-30T08:00:00+01:00'
  end: '2022-12-30T09:00:00+01:00'
  value: 1.746
- start: '2022-12-30T09:00:00+01:00'
  end: '2022-12-30T10:00:00+01:00'
  value: 1.759
- start: '2022-12-30T10:00:00+01:00'
  end: '2022-12-30T11:00:00+01:00'
  value: 1.731
- start: '2022-12-30T11:00:00+01:00'
  end: '2022-12-30T12:00:00+01:00'
  value: 1.718
- start: '2022-12-30T12:00:00+01:00'
  end: '2022-12-30T13:00:00+01:00'
  value: 1.713
- start: '2022-12-30T13:00:00+01:00'
  end: '2022-12-30T14:00:00+01:00'
  value: 1.715
- start: '2022-12-30T14:00:00+01:00'
  end: '2022-12-30T15:00:00+01:00'
  value: 1.732
- start: '2022-12-30T15:00:00+01:00'
  end: '2022-12-30T16:00:00+01:00'
  value: 1.755
- start: '2022-12-30T16:00:00+01:00'
  end: '2022-12-30T17:00:00+01:00'
  value: 1.762
- start: '2022-12-30T17:00:00+01:00'
  end: '2022-12-30T18:00:00+01:00'
  value: 2.355
- start: '2022-12-30T18:00:00+01:00'
  end: '2022-12-30T19:00:00+01:00'
  value: 2.329
- start: '2022-12-30T19:00:00+01:00'
  end: '2022-12-30T20:00:00+01:00'
  value: 2.301
- start: '2022-12-30T20:00:00+01:00'
  end: '2022-12-30T21:00:00+01:00'
  value: 1.673
- start: '2022-12-30T21:00:00+01:00'
  end: '2022-12-30T22:00:00+01:00'
  value: 1.502
- start: '2022-12-30T22:00:00+01:00'
  end: '2022-12-30T23:00:00+01:00'
  value: 1.494
- start: '2022-12-30T23:00:00+01:00'
  end: '2022-12-31T00:00:00+01:00'
  value: 1.488
- start: '2022-12-31T00:00:00+01:00'
  end: '2022-12-31T01:00:00+01:00'
  value: 1.507
- start: '2022-12-31T01:00:00+01:00'
  end: '2022-12-31T02:00:00+01:00'
  value: 1.489
- start: '2022-12-31T02:00:00+01:00'
  end: '2022-12-31T03:00:00+01:00'
  value: 1.488
- start: '2022-12-31T03:00:00+01:00'
  end: '2022-12-31T04:00:00+01:00'
  value: 1.488
- start: '2022-12-31T04:00:00+01:00'
  end: '2022-12-31T05:00:00+01:00'
  value: 1.488
- start: '2022-12-31T05:00:00+01:00'
  end: '2022-12-31T06:00:00+01:00'
  value: 1.488
- start: '2022-12-31T06:00:00+01:00'
  end: '2022-12-31T07:00:00+01:00'
  value: 1.488
- start: '2022-12-31T07:00:00+01:00'
  end: '2022-12-31T08:00:00+01:00'
  value: 1.488
- start: '2022-12-31T08:00:00+01:00'
  end: '2022-12-31T09:00:00+01:00'
  value: 1.494
- start: '2022-12-31T09:00:00+01:00'
  end: '2022-12-31T10:00:00+01:00'
  value: 1.507
- start: '2022-12-31T10:00:00+01:00'
  end: '2022-12-31T11:00:00+01:00'
  value: 1.519
- start: '2022-12-31T11:00:00+01:00'
  end: '2022-12-31T12:00:00+01:00'
  value: 1.526
- start: '2022-12-31T12:00:00+01:00'
  end: '2022-12-31T13:00:00+01:00'
  value: 1.582
- start: '2022-12-31T13:00:00+01:00'
  end: '2022-12-31T14:00:00+01:00'
  value: 1.587
- start: '2022-12-31T14:00:00+01:00'
  end: '2022-12-31T15:00:00+01:00'
  value: 1.635
- start: '2022-12-31T15:00:00+01:00'
  end: '2022-12-31T16:00:00+01:00'
  value: 1.732
- start: '2022-12-31T16:00:00+01:00'
  end: '2022-12-31T17:00:00+01:00'
  value: 1.736
- start: '2022-12-31T17:00:00+01:00'
  end: '2022-12-31T18:00:00+01:00'
  value: 2.307
- start: '2022-12-31T18:00:00+01:00'
  end: '2022-12-31T19:00:00+01:00'
  value: 2.313
- start: '2022-12-31T19:00:00+01:00'
  end: '2022-12-31T20:00:00+01:00'
  value: 2.209
- start: '2022-12-31T20:00:00+01:00'
  end: '2022-12-31T21:00:00+01:00'
  value: 1.596
- start: '2022-12-31T21:00:00+01:00'
  end: '2022-12-31T22:00:00+01:00'
  value: 1.627
- start: '2022-12-31T22:00:00+01:00'
  end: '2022-12-31T23:00:00+01:00'
  value: 1.581
- start: '2022-12-31T23:00:00+01:00'
  end: '2023-01-01T00:00:00+01:00'
  value: 1.533

charging_schedule: 
- start: '2022-12-30T00:00:00+01:00'
  end: '2022-12-30T01:00:00+01:00'
  value: 0
- start: '2022-12-30T01:00:00+01:00'
  end: '2022-12-30T02:00:00+01:00'
  value: 0
- start: '2022-12-30T02:00:00+01:00'
  end: '2022-12-30T03:00:00+01:00'
  value: 0
- start: '2022-12-30T03:00:00+01:00'
  end: '2022-12-30T04:00:00+01:00'
  value: 0
- start: '2022-12-30T04:00:00+01:00'
  end: '2022-12-30T05:00:00+01:00'
  value: 0
- start: '2022-12-30T05:00:00+01:00'
  end: '2022-12-30T06:00:00+01:00'
  value: 0
- start: '2022-12-30T06:00:00+01:00'
  end: '2022-12-30T07:00:00+01:00'
  value: 0
- start: '2022-12-30T07:00:00+01:00'
  end: '2022-12-30T08:00:00+01:00'
  value: 0
- start: '2022-12-30T08:00:00+01:00'
  end: '2022-12-30T09:00:00+01:00'
  value: 0
- start: '2022-12-30T09:00:00+01:00'
  end: '2022-12-30T10:00:00+01:00'
  value: 0
- start: '2022-12-30T10:00:00+01:00'
  end: '2022-12-30T11:00:00+01:00'
  value: 0
- start: '2022-12-30T11:00:00+01:00'
  end: '2022-12-30T12:00:00+01:00'
  value: 0
- start: '2022-12-30T12:00:00+01:00'
  end: '2022-12-30T13:00:00+01:00'
  value: 0
- start: '2022-12-30T13:00:00+01:00'
  end: '2022-12-30T14:00:00+01:00'
  value: 0
- start: '2022-12-30T14:00:00+01:00'
  end: '2022-12-30T15:00:00+01:00'
  value: 0
- start: '2022-12-30T15:00:00+01:00'
  end: '2022-12-30T16:00:00+01:00'
  value: 0
- start: '2022-12-30T16:00:00+01:00'
  end: '2022-12-30T17:00:00+01:00'
  value: 0
- start: '2022-12-30T17:00:00+01:00'
  end: '2022-12-30T18:00:00+01:00'
  value: 0
- start: '2022-12-30T18:00:00+01:00'
  end: '2022-12-30T19:00:00+01:00'
  value: 0
- start: '2022-12-30T19:00:00+01:00'
  end: '2022-12-30T20:00:00+01:00'
  value: 0
- start: '2022-12-30T20:00:00+01:00'
  end: '2022-12-30T21:00:00+01:00'
  value: 0
- start: '2022-12-30T21:00:00+01:00'
  end: '2022-12-30T22:00:00+01:00'
  value: 0
- start: '2022-12-30T22:00:00+01:00'
  end: '2022-12-30T23:00:00+01:00'
  value: 0
- start: '2022-12-30T23:00:00+01:00'
  end: '2022-12-31T00:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T00:00:00+01:00'
  end: '2022-12-31T01:00:00+01:00'
  value: 0
- start: '2022-12-31T01:00:00+01:00'
  end: '2022-12-31T02:00:00+01:00'
  value: 0
- start: '2022-12-31T02:00:00+01:00'
  end: '2022-12-31T03:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T03:00:00+01:00'
  end: '2022-12-31T04:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T04:00:00+01:00'
  end: '2022-12-31T05:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T05:00:00+01:00'
  end: '2022-12-31T06:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T06:00:00+01:00'
  end: '2022-12-31T07:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T07:00:00+01:00'
  end: '2022-12-31T08:00:00+01:00'
  value: 0
- start: '2022-12-31T08:00:00+01:00'
  end: '2022-12-31T09:00:00+01:00'
  value: 0
- start: '2022-12-31T09:00:00+01:00'
  end: '2022-12-31T10:00:00+01:00'
  value: 0
- start: '2022-12-31T10:00:00+01:00'
  end: '2022-12-31T11:00:00+01:00'
  value: 0
- start: '2022-12-31T11:00:00+01:00'
  end: '2022-12-31T12:00:00+01:00'
  value: 0
- start: '2022-12-31T12:00:00+01:00'
  end: '2022-12-31T13:00:00+01:00'
  value: 0
- start: '2022-12-31T13:00:00+01:00'
  end: '2022-12-31T14:00:00+01:00'
  value: 0
- start: '2022-12-31T14:00:00+01:00'
  end: '2022-12-31T15:00:00+01:00'
  value: 0
- start: '2022-12-31T15:00:00+01:00'
  end: '2022-12-31T16:00:00+01:00'
  value: 0
- start: '2022-12-31T16:00:00+01:00'
  end: '2022-12-31T17:00:00+01:00'
  value: 0
- start: '2022-12-31T17:00:00+01:00'
  end: '2022-12-31T18:00:00+01:00'
  value: 0
- start: '2022-12-31T18:00:00+01:00'
  end: '2022-12-31T19:00:00+01:00'
  value: 0
- start: '2022-12-31T19:00:00+01:00'
  end: '2022-12-31T20:00:00+01:00'
  value: 0
- start: '2022-12-31T20:00:00+01:00'
  end: '2022-12-31T21:00:00+01:00'
  value: 0
- start: '2022-12-31T21:00:00+01:00'
  end: '2022-12-31T22:00:00+01:00'
  value: 0
- start: '2022-12-31T22:00:00+01:00'
  end: '2022-12-31T23:00:00+01:00'
  value: 0
- start: '2022-12-31T23:00:00+01:00'
  end: '2023-01-01T00:00:00+01:00'
  value: 0

icon: mdi:flash
friendly_name: EV Smart Charging Charging

Attributes of the sensor with continuous enabled

current_price: 2.329
EV SOC: 92
EV target SOC: 100.0
Charging is planned: true
Charging start time: 2022-12-30T23:00:00+01:00
Charging stop time: 2022-12-31T00:00:00+01:00
Charging number of hours: 1
raw_two_days: 
- start: '2022-12-30T00:00:00+01:00'
  end: '2022-12-30T01:00:00+01:00'
  value: 1.584
- start: '2022-12-30T01:00:00+01:00'
  end: '2022-12-30T02:00:00+01:00'
  value: 1.536
- start: '2022-12-30T02:00:00+01:00'
  end: '2022-12-30T03:00:00+01:00'
  value: 1.517
- start: '2022-12-30T03:00:00+01:00'
  end: '2022-12-30T04:00:00+01:00'
  value: 1.494
- start: '2022-12-30T04:00:00+01:00'
  end: '2022-12-30T05:00:00+01:00'
  value: 1.494
- start: '2022-12-30T05:00:00+01:00'
  end: '2022-12-30T06:00:00+01:00'
  value: 1.532
- start: '2022-12-30T06:00:00+01:00'
  end: '2022-12-30T07:00:00+01:00'
  value: 1.591
- start: '2022-12-30T07:00:00+01:00'
  end: '2022-12-30T08:00:00+01:00'
  value: 1.713
- start: '2022-12-30T08:00:00+01:00'
  end: '2022-12-30T09:00:00+01:00'
  value: 1.746
- start: '2022-12-30T09:00:00+01:00'
  end: '2022-12-30T10:00:00+01:00'
  value: 1.759
- start: '2022-12-30T10:00:00+01:00'
  end: '2022-12-30T11:00:00+01:00'
  value: 1.731
- start: '2022-12-30T11:00:00+01:00'
  end: '2022-12-30T12:00:00+01:00'
  value: 1.718
- start: '2022-12-30T12:00:00+01:00'
  end: '2022-12-30T13:00:00+01:00'
  value: 1.713
- start: '2022-12-30T13:00:00+01:00'
  end: '2022-12-30T14:00:00+01:00'
  value: 1.715
- start: '2022-12-30T14:00:00+01:00'
  end: '2022-12-30T15:00:00+01:00'
  value: 1.732
- start: '2022-12-30T15:00:00+01:00'
  end: '2022-12-30T16:00:00+01:00'
  value: 1.755
- start: '2022-12-30T16:00:00+01:00'
  end: '2022-12-30T17:00:00+01:00'
  value: 1.762
- start: '2022-12-30T17:00:00+01:00'
  end: '2022-12-30T18:00:00+01:00'
  value: 2.355
- start: '2022-12-30T18:00:00+01:00'
  end: '2022-12-30T19:00:00+01:00'
  value: 2.329
- start: '2022-12-30T19:00:00+01:00'
  end: '2022-12-30T20:00:00+01:00'
  value: 2.301
- start: '2022-12-30T20:00:00+01:00'
  end: '2022-12-30T21:00:00+01:00'
  value: 1.673
- start: '2022-12-30T21:00:00+01:00'
  end: '2022-12-30T22:00:00+01:00'
  value: 1.502
- start: '2022-12-30T22:00:00+01:00'
  end: '2022-12-30T23:00:00+01:00'
  value: 1.494
- start: '2022-12-30T23:00:00+01:00'
  end: '2022-12-31T00:00:00+01:00'
  value: 1.488
- start: '2022-12-31T00:00:00+01:00'
  end: '2022-12-31T01:00:00+01:00'
  value: 1.507
- start: '2022-12-31T01:00:00+01:00'
  end: '2022-12-31T02:00:00+01:00'
  value: 1.489
- start: '2022-12-31T02:00:00+01:00'
  end: '2022-12-31T03:00:00+01:00'
  value: 1.488
- start: '2022-12-31T03:00:00+01:00'
  end: '2022-12-31T04:00:00+01:00'
  value: 1.488
- start: '2022-12-31T04:00:00+01:00'
  end: '2022-12-31T05:00:00+01:00'
  value: 1.488
- start: '2022-12-31T05:00:00+01:00'
  end: '2022-12-31T06:00:00+01:00'
  value: 1.488
- start: '2022-12-31T06:00:00+01:00'
  end: '2022-12-31T07:00:00+01:00'
  value: 1.488
- start: '2022-12-31T07:00:00+01:00'
  end: '2022-12-31T08:00:00+01:00'
  value: 1.488
- start: '2022-12-31T08:00:00+01:00'
  end: '2022-12-31T09:00:00+01:00'
  value: 1.494
- start: '2022-12-31T09:00:00+01:00'
  end: '2022-12-31T10:00:00+01:00'
  value: 1.507
- start: '2022-12-31T10:00:00+01:00'
  end: '2022-12-31T11:00:00+01:00'
  value: 1.519
- start: '2022-12-31T11:00:00+01:00'
  end: '2022-12-31T12:00:00+01:00'
  value: 1.526
- start: '2022-12-31T12:00:00+01:00'
  end: '2022-12-31T13:00:00+01:00'
  value: 1.582
- start: '2022-12-31T13:00:00+01:00'
  end: '2022-12-31T14:00:00+01:00'
  value: 1.587
- start: '2022-12-31T14:00:00+01:00'
  end: '2022-12-31T15:00:00+01:00'
  value: 1.635
- start: '2022-12-31T15:00:00+01:00'
  end: '2022-12-31T16:00:00+01:00'
  value: 1.732
- start: '2022-12-31T16:00:00+01:00'
  end: '2022-12-31T17:00:00+01:00'
  value: 1.736
- start: '2022-12-31T17:00:00+01:00'
  end: '2022-12-31T18:00:00+01:00'
  value: 2.307
- start: '2022-12-31T18:00:00+01:00'
  end: '2022-12-31T19:00:00+01:00'
  value: 2.313
- start: '2022-12-31T19:00:00+01:00'
  end: '2022-12-31T20:00:00+01:00'
  value: 2.209
- start: '2022-12-31T20:00:00+01:00'
  end: '2022-12-31T21:00:00+01:00'
  value: 1.596
- start: '2022-12-31T21:00:00+01:00'
  end: '2022-12-31T22:00:00+01:00'
  value: 1.627
- start: '2022-12-31T22:00:00+01:00'
  end: '2022-12-31T23:00:00+01:00'
  value: 1.581
- start: '2022-12-31T23:00:00+01:00'
  end: '2023-01-01T00:00:00+01:00'
  value: 1.533

charging_schedule: 
- start: '2022-12-30T00:00:00+01:00'
  end: '2022-12-30T01:00:00+01:00'
  value: 0
- start: '2022-12-30T01:00:00+01:00'
  end: '2022-12-30T02:00:00+01:00'
  value: 0
- start: '2022-12-30T02:00:00+01:00'
  end: '2022-12-30T03:00:00+01:00'
  value: 0
- start: '2022-12-30T03:00:00+01:00'
  end: '2022-12-30T04:00:00+01:00'
  value: 0
- start: '2022-12-30T04:00:00+01:00'
  end: '2022-12-30T05:00:00+01:00'
  value: 0
- start: '2022-12-30T05:00:00+01:00'
  end: '2022-12-30T06:00:00+01:00'
  value: 0
- start: '2022-12-30T06:00:00+01:00'
  end: '2022-12-30T07:00:00+01:00'
  value: 0
- start: '2022-12-30T07:00:00+01:00'
  end: '2022-12-30T08:00:00+01:00'
  value: 0
- start: '2022-12-30T08:00:00+01:00'
  end: '2022-12-30T09:00:00+01:00'
  value: 0
- start: '2022-12-30T09:00:00+01:00'
  end: '2022-12-30T10:00:00+01:00'
  value: 0
- start: '2022-12-30T10:00:00+01:00'
  end: '2022-12-30T11:00:00+01:00'
  value: 0
- start: '2022-12-30T11:00:00+01:00'
  end: '2022-12-30T12:00:00+01:00'
  value: 0
- start: '2022-12-30T12:00:00+01:00'
  end: '2022-12-30T13:00:00+01:00'
  value: 0
- start: '2022-12-30T13:00:00+01:00'
  end: '2022-12-30T14:00:00+01:00'
  value: 0
- start: '2022-12-30T14:00:00+01:00'
  end: '2022-12-30T15:00:00+01:00'
  value: 0
- start: '2022-12-30T15:00:00+01:00'
  end: '2022-12-30T16:00:00+01:00'
  value: 0
- start: '2022-12-30T16:00:00+01:00'
  end: '2022-12-30T17:00:00+01:00'
  value: 0
- start: '2022-12-30T17:00:00+01:00'
  end: '2022-12-30T18:00:00+01:00'
  value: 0
- start: '2022-12-30T18:00:00+01:00'
  end: '2022-12-30T19:00:00+01:00'
  value: 0
- start: '2022-12-30T19:00:00+01:00'
  end: '2022-12-30T20:00:00+01:00'
  value: 0
- start: '2022-12-30T20:00:00+01:00'
  end: '2022-12-30T21:00:00+01:00'
  value: 0
- start: '2022-12-30T21:00:00+01:00'
  end: '2022-12-30T22:00:00+01:00'
  value: 0
- start: '2022-12-30T22:00:00+01:00'
  end: '2022-12-30T23:00:00+01:00'
  value: 0
- start: '2022-12-30T23:00:00+01:00'
  end: '2022-12-31T00:00:00+01:00'
  value: 1.7662499999999999
- start: '2022-12-31T00:00:00+01:00'
  end: '2022-12-31T01:00:00+01:00'
  value: 0
- start: '2022-12-31T01:00:00+01:00'
  end: '2022-12-31T02:00:00+01:00'
  value: 0
- start: '2022-12-31T02:00:00+01:00'
  end: '2022-12-31T03:00:00+01:00'
  value: 0
- start: '2022-12-31T03:00:00+01:00'
  end: '2022-12-31T04:00:00+01:00'
  value: 0
- start: '2022-12-31T04:00:00+01:00'
  end: '2022-12-31T05:00:00+01:00'
  value: 0
- start: '2022-12-31T05:00:00+01:00'
  end: '2022-12-31T06:00:00+01:00'
  value: 0
- start: '2022-12-31T06:00:00+01:00'
  end: '2022-12-31T07:00:00+01:00'
  value: 0
- start: '2022-12-31T07:00:00+01:00'
  end: '2022-12-31T08:00:00+01:00'
  value: 0
- start: '2022-12-31T08:00:00+01:00'
  end: '2022-12-31T09:00:00+01:00'
  value: 0
- start: '2022-12-31T09:00:00+01:00'
  end: '2022-12-31T10:00:00+01:00'
  value: 0
- start: '2022-12-31T10:00:00+01:00'
  end: '2022-12-31T11:00:00+01:00'
  value: 0
- start: '2022-12-31T11:00:00+01:00'
  end: '2022-12-31T12:00:00+01:00'
  value: 0
- start: '2022-12-31T12:00:00+01:00'
  end: '2022-12-31T13:00:00+01:00'
  value: 0
- start: '2022-12-31T13:00:00+01:00'
  end: '2022-12-31T14:00:00+01:00'
  value: 0
- start: '2022-12-31T14:00:00+01:00'
  end: '2022-12-31T15:00:00+01:00'
  value: 0
- start: '2022-12-31T15:00:00+01:00'
  end: '2022-12-31T16:00:00+01:00'
  value: 0
- start: '2022-12-31T16:00:00+01:00'
  end: '2022-12-31T17:00:00+01:00'
  value: 0
- start: '2022-12-31T17:00:00+01:00'
  end: '2022-12-31T18:00:00+01:00'
  value: 0
- start: '2022-12-31T18:00:00+01:00'
  end: '2022-12-31T19:00:00+01:00'
  value: 0
- start: '2022-12-31T19:00:00+01:00'
  end: '2022-12-31T20:00:00+01:00'
  value: 0
- start: '2022-12-31T20:00:00+01:00'
  end: '2022-12-31T21:00:00+01:00'
  value: 0
- start: '2022-12-31T21:00:00+01:00'
  end: '2022-12-31T22:00:00+01:00'
  value: 0
- start: '2022-12-31T22:00:00+01:00'
  end: '2022-12-31T23:00:00+01:00'
  value: 0
- start: '2022-12-31T23:00:00+01:00'
  end: '2023-01-01T00:00:00+01:00'
  value: 0

icon: mdi:flash
friendly_name: EV Smart Charging Charging

Do not start/stop charging when switching smart charging on/off

Is your feature request related to a problem? Please describe.
I've observed that the addon toggles actual charging (by calling the turn_on service?) when I turn smart charging on or off.

Describe the solution you'd like
The button to toggle smart charging should only switch on/off the scheduled charging, not mess with the current charging status.

What's the correct way to start a manual charge?

Version of the custom_component

Version: latest

Configuration

Tesla Model 3 + Easee Home charger. Car set to charge to 100%, Smart charging is enabled, and it should be done at 7 AM.

So last night I wanted to be 100% sure that I had a 100% charge when I woke up. I've been using the integration for 2-3 days now, and with great success, but I always have that "what if it doesn't charge" in the back of my head. I am using your card example:

image

However, as you might be able to see, I have added my Easee Home charger at the bottom as a switch. And surely enough, when I enable the switch, the car starts charging manually.

HOWEVER, and this is probably entirely my fault, charging stopped randomly at 03:44 tonight, but I don't know why.

image

As you can see, the integration reported that charging was set to true between 3 AM and 7 AM, however, I started charging at 02:03 AM, by enabling the charger. I did NOT press the "Manual start" button. Is this the problem?

Also, take a look at this. I did turn on the charger at 02:03, but nothing turned it off until 05:00 (and then on again 1 second later). So the charger never turned off around 03:44, yet it stopped charging the car at about 85% SoC:

image

Let me know if you want more data.

price_in_cents required?

Version 1.0.3

In the Nordpool integration I am having:
price_in_cents: false (and that is the standard value)

It seems that this integration requires the price to be in cents from Nordpool?
In the APEX chart I see my price from Nordpool treated as "öre"=cents, hence guessing that this integration is requiring the price from Nordpool to be in cents?

Apex chart:
image

Current Nordpool prices:
image

Allow "EV SOC entity" to be optional

Is your feature request related to a problem? Please describe.
I have an older PHEV, and there is no state of charge reporting. I know it typically needs ~3 hour to charge with my openEVSE at 16A, and I use a custom script that calculates the cheapest 3 hour interval ending before 7 am (8 am in weekends, holidays and when on "vacation_mode").

I'd like to try out this integration, as mine is just a hacky AppDaemon script, but since it requires a SOC sensor to set up, I can't.

Describe the solution you'd like
Make SOC sensor optional, replace by stating the kWh needed to charge each night, or just a charging interval to use in place of an SOC sensor.

Describe alternatives you've considered
I am currently using an alternative (home made script), as I didn't know this integration existed until at few days ago (following a mention in an Issue for the Nordpool sensor).

Time offset by timezone?

Hi,

the graph indicates that the charging should have been started already:

time_offset

but not yet started as seen in the state.

Data indicates a one hour offset in opposite to the graph:

current_price: 0.131
EV SOC: 70
EV target SOC: 100
Charging status: Waiting for charging to begin
Charging is planned: true
Charging start time: 2023-03-03T11:00:00+01:00
Charging stop time: 2023-03-03T16:00:00+01:00
Charging number of hours: 5
raw_two_days: 
- start: '2023-03-03T00:00:00+01:00'
  end: '2023-03-03T01:00:00+01:00'
  value: 0.14
- start: '2023-03-03T01:00:00+01:00'
  end: '2023-03-03T02:00:00+01:00'
  value: 0.13
- start: '2023-03-03T02:00:00+01:00'
  end: '2023-03-03T03:00:00+01:00'
  value: 0.131
- start: '2023-03-03T03:00:00+01:00'
  end: '2023-03-03T04:00:00+01:00'
  value: 0.128
- start: '2023-03-03T04:00:00+01:00'
  end: '2023-03-03T05:00:00+01:00'
  value: 0.128
- start: '2023-03-03T05:00:00+01:00'
  end: '2023-03-03T06:00:00+01:00'
  value: 0.135
- start: '2023-03-03T06:00:00+01:00'
  end: '2023-03-03T07:00:00+01:00'
  value: 0.162
- start: '2023-03-03T07:00:00+01:00'
  end: '2023-03-03T08:00:00+01:00'
  value: 0.187
- start: '2023-03-03T08:00:00+01:00'
  end: '2023-03-03T09:00:00+01:00'
  value: 0.195
- start: '2023-03-03T09:00:00+01:00'
  end: '2023-03-03T10:00:00+01:00'
  value: 0.166
- start: '2023-03-03T10:00:00+01:00'
  end: '2023-03-03T11:00:00+01:00'
  value: 0.131
- start: '2023-03-03T11:00:00+01:00'
  end: '2023-03-03T12:00:00+01:00'
  value: 0.123
- start: '2023-03-03T12:00:00+01:00'
  end: '2023-03-03T13:00:00+01:00'
  value: 0.115
- start: '2023-03-03T13:00:00+01:00'
  end: '2023-03-03T14:00:00+01:00'
  value: 0.112
- start: '2023-03-03T14:00:00+01:00'
  end: '2023-03-03T15:00:00+01:00'
  value: 0.111
- start: '2023-03-03T15:00:00+01:00'
  end: '2023-03-03T16:00:00+01:00'
  value: 0.115
- start: '2023-03-03T16:00:00+01:00'
  end: '2023-03-03T17:00:00+01:00'
  value: 0.129
- start: '2023-03-03T17:00:00+01:00'
  end: '2023-03-03T18:00:00+01:00'
  value: 0.156
- start: '2023-03-03T18:00:00+01:00'
  end: '2023-03-03T19:00:00+01:00'
  value: 0.165
- start: '2023-03-03T19:00:00+01:00'
  end: '2023-03-03T20:00:00+01:00'
  value: 0.153
- start: '2023-03-03T20:00:00+01:00'
  end: '2023-03-03T21:00:00+01:00'
  value: 0.133
- start: '2023-03-03T21:00:00+01:00'
  end: '2023-03-03T22:00:00+01:00'
  value: 0.122
- start: '2023-03-03T22:00:00+01:00'
  end: '2023-03-03T23:00:00+01:00'
  value: 0.112
- start: '2023-03-03T23:00:00+01:00'
  end: '2023-03-04T00:00:00+01:00'
  value: 0.102

charging_schedule: 
- start: '2023-03-03T00:00:00+01:00'
  end: '2023-03-03T01:00:00+01:00'
  value: 0
- start: '2023-03-03T01:00:00+01:00'
  end: '2023-03-03T02:00:00+01:00'
  value: 0
- start: '2023-03-03T02:00:00+01:00'
  end: '2023-03-03T03:00:00+01:00'
  value: 0
- start: '2023-03-03T03:00:00+01:00'
  end: '2023-03-03T04:00:00+01:00'
  value: 0
- start: '2023-03-03T04:00:00+01:00'
  end: '2023-03-03T05:00:00+01:00'
  value: 0
- start: '2023-03-03T05:00:00+01:00'
  end: '2023-03-03T06:00:00+01:00'
  value: 0
- start: '2023-03-03T06:00:00+01:00'
  end: '2023-03-03T07:00:00+01:00'
  value: 0
- start: '2023-03-03T07:00:00+01:00'
  end: '2023-03-03T08:00:00+01:00'
  value: 0
- start: '2023-03-03T08:00:00+01:00'
  end: '2023-03-03T09:00:00+01:00'
  value: 0
- start: '2023-03-03T09:00:00+01:00'
  end: '2023-03-03T10:00:00+01:00'
  value: 0
- start: '2023-03-03T10:00:00+01:00'
  end: '2023-03-03T11:00:00+01:00'
  value: 0
- start: '2023-03-03T11:00:00+01:00'
  end: '2023-03-03T12:00:00+01:00'
  value: 0.14625
- start: '2023-03-03T12:00:00+01:00'
  end: '2023-03-03T13:00:00+01:00'
  value: 0.14625
- start: '2023-03-03T13:00:00+01:00'
  end: '2023-03-03T14:00:00+01:00'
  value: 0.14625
- start: '2023-03-03T14:00:00+01:00'
  end: '2023-03-03T15:00:00+01:00'
  value: 0.14625
- start: '2023-03-03T15:00:00+01:00'
  end: '2023-03-03T16:00:00+01:00'
  value: 0.14625
- start: '2023-03-03T16:00:00+01:00'
  end: '2023-03-03T17:00:00+01:00'
  value: 0
- start: '2023-03-03T17:00:00+01:00'
  end: '2023-03-03T18:00:00+01:00'
  value: 0
- start: '2023-03-03T18:00:00+01:00'
  end: '2023-03-03T19:00:00+01:00'
  value: 0
- start: '2023-03-03T19:00:00+01:00'
  end: '2023-03-03T20:00:00+01:00'
  value: 0
- start: '2023-03-03T20:00:00+01:00'
  end: '2023-03-03T21:00:00+01:00'
  value: 0
- start: '2023-03-03T21:00:00+01:00'
  end: '2023-03-03T22:00:00+01:00'
  value: 0
- start: '2023-03-03T22:00:00+01:00'
  end: '2023-03-03T23:00:00+01:00'
  value: 0
- start: '2023-03-03T23:00:00+01:00'
  end: '2023-03-04T00:00:00+01:00'
  value: 0

"Keep charger on" turns off charger if SOC dips below 100 after charge completion.

Version of the custom_component

Version 1.5.1

Describe the bug

I have "Keep charger on" turned on to allow the EV to draw power from the house when warming up in the morning. This is after the EV has been fully charged.
The issue is that when the EV reports back that the climate control has been turned on, it also (for whatever reason) returns a SOC of 98%. When this happens the integration turns off the charger which in turn makes the EV turn off the climate control. If the SOC is bumped back up to 100%, the charger is turned on again (but the EV remains cold 🥶).

Rescheduling when car is plugged into charger

As discussed in #48

Now it seems, that integration does not know if car is plugged in charger or not, so it is possible that charging is scheduled so that charging is started when car is not plugged in. If car is plugged in when charging is scheduled, charging is not triggered.
This also makes it possible to reschedule when car is plugged in, so that when you plug car in charging is scheduled from that time to "Charge completion time".
If you then unplug car, and plug it again later schedule is again updated (as you plugged car into charger again).

This way only change that car is not charged to "Minimum EV SOC" or "EV target SOC entity" (depending electricity price) is when you plug in so close "Charge completion time" that there is no time to charge it fully. In this case it still charges as much as possible (becouse every hour would be one of cheapest hours).

Option to use absolute cheapest hours (not sequential)

Is your feature request related to a problem? Please describe.
No,

Describe the solution you'd like
It would nice to have option to schedule charging to cheapest hours. Now it seems that charging is done in one slot.
Cheapest hours are not always sequential, so instead for example charging between 02-05, charging could be done at 02-04 and 05-06 (if at 4:00 electricity is more expensive than at 5:00)

Describe alternatives you've considered
Possibly to have switch for charging cheapest sequential hours or to charge on absolute cheapest hours.

Additional context
Not a big deal, but nice to have.

Recalculation

When SoC is lower than Target Soc, and you have disabled Continuous charging it needs to recalculate the charge schedule.

From the picture here, you see that time has passed the first charge point.

image

Sensor for summery of schedule

Is your feature request related to a problem? Please describe.
Not with how the integration works, but with my small main fuses... 😂

Describe the solution you'd like
A sensor with the summery of next charge period. Can't decide what the state should be, but I lean towards a binary sensor that is on if there is a upcoming loading session scheduled and off if not. So it would be off after the last session and until a new is scheduled after next days prices is received, unless the price limit causes that there is no upcoming session.

And then as extra state attributes I would like to get next start and stop time (datetime), and the length i hours of the period.

Describe alternatives you've considered
One could course achieve the above with a super complicated template sensors, but why should one?

Additional context
Why do I need this then?

I need to be able to plan (automate) the heating of my spa (which is also connected to Home Assistant off course). Because when I heat it, the automatic load limit (external, not connected to Home Assistant) of my Wallbox will reduce the power which means the calculations of time needed to charge the car will be wrong, and the wanted level will not be reached.

The second reason is I want an easy fast way of displaying if the car will be charged on a wall mounted tablet. The alternative to see the calculated period now is as the example with an apex chart. But my home view has no room for more charts... 😆

Easee integration

Hi,
have not seen anything that describes this but when you connect your charge cable to your car the ev-robot will start to charge instantly, will ev smart charging stop this after x amount of time?

For now I rely on a schedule where the easee box will say the ev charge between 22-07:00 , but this will trigger my EVs to start charging at 22 when we really want it to start when esm decides to.

Request: Allow max_price to be set from a sensor

Is your feature request related to a problem? Please describe.
Currently it is not possible to dynamically set the max price, however the price of power seems to fluctuate quite a bit in periods.

I would love to be able to set the max_price with a sensor, such that I can for example define the max_price as the 25th percentile of the last 30 days, such that charging will only happen if the power is cheap compared to the last 30 days.

Describe the solution you'd like
Allow defining the max_price using a sensor.

Same soc target on two applikation

I have two chargers and two electric cars one id3 and one ford. id3 soc support target entity but not my Ford. My problem is that the id3 target entity is then on both cars aplikation. This has come after the last updates.

Thanks for a nice work.

Didn't charge as expected

Version of the custom_component

Version 0.9.48

Describe the bug

I have the "EV Smart Charging Continuous charging preferred"-switch turned off and last night it was supposed to charge between 23-00 and then from 01-06, if I remember the graph. However it just charged the first hour ending up with an almost empty battery. Before this I have never had any issues similar to this and have used the service since the beginning (thanks for creating it!).

I have the smart charging activated and the opportunistic switch is turned off. It is somehow hard to debug why it didn't continue charging but maybe you can help out in what info you need.

For some reason the sensor both turn on/off at the same time at 00:00, and both the automation to turn off (lower the Easee dynamic limit to 0A) and turn on (set the dynamic limit to 16A) run at the same time, which probably caused the charging to stop.

EV Smart Charging Charging slogs av
06:00:00 - För 7 timmar sedan
EV Smart Charging Charging slogs på
00:00:00 - För 13 timmar sedan
EV Smart Charging Charging slogs av
00:00:00 - För 13 timmar sedan
2 februari 2023
EV Smart Charging Charging slogs på
23:00:00 - För 14 timmar sedan

EV Smart charging kills charging everywhere.

EV Smart charging stops charging everywhere.

Since update 1.7.0 charging is stopped everywhere.

Normally EV Smart charging integration only affects the charging switch if the vehicle connected switch is on.

Now when I'm at work or somewhere else than home, and I connect the plug to the car, the car starts charging briefly and the charger switch of the Tesla integration is immediately switched off again by the EV Smart charging integration.

It seems that the vehicle connected switch of the EV Smart charging integration is completely ignored.

Debug log:
2023-03-07 14:03:55.364 DEBUG (MainThread) [teslajsonpy.controller] Get vehicles. Force: False Time: 10 Interval 60
2023-03-07 14:03:55.364 DEBUG (MainThread) [teslajsonpy.controller] 36298: online. Polling policy: normal. Update state: normal. Since last park: 4021.4210000038147. Since last wake up: 50626. Idle interval: 600. shift_state: None sentry: True climate: False, charging: Stopped
2023-03-07 14:03:55.364 DEBUG (MainThread) [teslajsonpy.controller] 36298: Skipping update with state online. Polling: True. Last update: 519 ago. Last parked: 4021.4210000038147 ago. Last wake up 50626 ago.
2023-03-07 14:03:56.916 DEBUG (MainThread) [teslajsonpy.car] Sending command: START_CHARGE
2023-03-07 14:03:56.917 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 3:53:27
2023-03-07 14:03:56.917 DEBUG (MainThread) [teslajsonpy.connection] post: https://owner-api.teslamotors.com/api/1/vehicles/XXXXXXXXXXXXXXXX/command/charge_start {}
2023-03-07 14:03:57.201 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"reason":"is_charging","result":false}}
2023-03-07 14:03:57.202 DEBUG (MainThread) [teslajsonpy.car] Response from command START_CHARGE: {'response': {'reason': 'is_charging', 'result': False}}
2023-03-07 14:04:05.365 DEBUG (MainThread) [teslajsonpy.controller] Get vehicles. Force: False Time: 20 Interval 60
2023-03-07 14:04:05.366 DEBUG (MainThread) [teslajsonpy.controller] 36298: online. Polling policy: normal. Update state: normal. Since last park: 4031.4210000038147. Since last wake up: 50636. Idle interval: 600. shift_state: None sentry: True climate: False, charging: Stopped
2023-03-07 14:04:05.366 DEBUG (MainThread) [teslajsonpy.controller] 36298: Skipping update with state online. Polling: True. Last update: 529 ago. Last parked: 4031.4210000038147 ago. Last wake up 50636 ago.
2023-03-07 14:04:10.643 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1191, in _sendfile_fallback
read = await self.run_in_executor(None, file.readinto, view)
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 514, in start
resp, reset = await task
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 460, in _handle_request
reset = await self.finish_response(request, resp, start_time)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 613, in finish_response
await prepare_meth(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_fileresponse.py", line 286, in prepare
return await self._sendfile(request, fobj, offset, count)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_fileresponse.py", line 99, in _sendfile
await loop.sendfile(transport, fobj, offset, count)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1170, in sendfile
return await self._sendfile_fallback(transport, file,
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1200, in _sendfile_fallback
await proto.restore()
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 268, in restore
self._transport.resume_reading()
File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 343, in resume_reading
self._ssl_protocol._transport.resume_reading()
AttributeError: 'NoneType' object has no attribute 'resume_reading'

Settings:
image
image

Open up for other providers (e.g., Tibber)

Is your feature request related to a problem? Please describe.
Sort of. Tibber for example offers a list of future prices for the next day by means of a GraphQL API. As far as I understand, this information could be used for this integration too to control charging of an EV.

Describe the solution you'd like
I propose a way to integrate arbitrary energy providers by using an entity as a source for current and future prices. That way any other extension, Node-RED flow, Python script could provide the price data.

Describe alternatives you've considered
Well, the alternative would be to integrate each and every energy provider individually

Additional context
Here's a link to the Tibber API reference docs: https://developer.tibber.com/docs/reference#price

"Leave charger on after charging cycle" switch

Is your feature request related to a problem? Please describe.
No, well ish.

Describe the solution you'd like
Hej Jonas! After the charging window has been finalized and the car has reached its target SOC, could we please implement a switch to leave the charger on? (And reset the cycle when the charger cable is unplugged, via an automation for example).
This new switch feature would have to interact with the new switch.ev_smart_charging_continuous_charging_preferred. The cannot co-exist (or be enabled at the same time).

The reason for this is during Swedish winter (du vet vad jag menar) it is by the manufacturer recommended to keep the cable "plugged in and enabled" when the car is idling. And also to draw power from the grid to perform "scheduled departures" (preheating etc), the preheating and warmup normally occurs after the charging cycle slot.

Describe alternatives you've considered
Doing an automation when the sensor.ev_smart_charging_charging goes to off and then re-enable it again. And reset the logic after the cable has been unplugged. The problem with this one is that this might cause the car to through a tantrum and say "problems with charger" when it is drawing some current when the charger "switch" is toggled like this.
I´d rather have the option to keep it on without having an automation to toggle it.

Additional context
Add any other context or screenshots about the feature request here.

Question: Configuration

Hi

I have some questions about this integration.

I have setup the NordPool integration with the following configuration

Skærmbillede 2022-12-25 kl  10 57 59

And Ev Smart Charging with the following configuration

Skærmbillede 2022-12-25 kl  10 58 40

However it seems like that the integration never plans for the charging even though the price is below the limit.

Skærmbillede 2022-12-25 kl  11 00 05

Have I done something wrong in the setup?

Drop down menu for entity selection

Is your feature request related to a problem? Please describe.
It’s annoying to have to search for the needed entities, copy them and paste them when setting up the integration.
Describe the solution you'd like
Have the entity menus that need to be filled out be drop down menus of all the entities, yes it will be a long list but if it’s on alfabet it shouldn’t be too hard to find the right ones.
Describe alternatives you've considered
Even better: have a search bar at the top but not sure if that’s possible, haven’t seen it before. .

Setup of EV Smart Charging does not accept external entities created by Remote HomeAsistant

I have two instances of Home assistant. One for regular, front end stuff and one for backend like solar panels, EV charge, etc.
The entities from the backend system is mirrored into the regular one with the integration Remote_Homeassistant by lukas-hetzenecker.

When I try to use entities created by this integration, like Charger Control Switch, the entity is not recognized by the config and therefore not possible to finalize. Eg. entity="switch.ha_power_laddbox_mode" --> Error message: "Charger control switch entity not found".

The switch entity is working with current automation rules.

I would appreciate any information if there is a workaround or fix, as it would complicate the setup to move integrations into one instance of HA instead of using already existing entities

Best regards

Charge value change from 100 to less triggers re-evaluation of periods

Version 1.5.1

Configuration

Easee charger and input_number describing SoC.

Describe the bug

This morning I noticed that charger has continued to re-start charging after this has stopped. I have an input_number describing the SoC which is updated when my car reports an updated SoC value. Charging was planned to stop at 05:00 and when charging stops I manually update the input_number.ev_smart_charging_soc to 100, as I understand is recommended.
15 minutes later my car reports a SoC of 98 and it seems like EV Smart Charging re-evaluates charging schedules then and then starts charging until 06:00 where the charging stops, sets SoC to 100, and then 06:03 charging starts again. The car is only charging very slow during the latest percentages.

Would it be possible to have a setting telling EV Smart Charging to not re-evaluate charging all the time (like before the change)? Or is there another workaround?

billede

Unfortunately I don't have any debug logs.

Add integration support for energidataservice to get prices

Add support for getting prices from https://github.com/MTrab/energidataservice

The format is very like nordpool, but differs in using price instead of value and using hour which is equal to start (end is implicit)

Format of raw_today:

raw_today: 
- hour: '2023-01-02T00:00:00+01:00'
  price: 0.92
- hour: '2023-01-02T01:00:00+01:00'
  price: 0.862
- hour: '2023-01-02T02:00:00+01:00'
  price: 0.873
- hour: '2023-01-02T03:00:00+01:00'
  price: 0.792
- hour: '2023-01-02T04:00:00+01:00'
  price: 0.847
- hour: '2023-01-02T05:00:00+01:00'
  price: 1.039
- hour: '2023-01-02T06:00:00+01:00'
  price: 1.774
- hour: '2023-01-02T07:00:00+01:00'
  price: 2.114
- hour: '2023-01-02T08:00:00+01:00'
  price: 2.164
- hour: '2023-01-02T09:00:00+01:00'
  price: 2.174
- hour: '2023-01-02T10:00:00+01:00'
  price: 2.16
- hour: '2023-01-02T11:00:00+01:00'
  price: 2.139
- hour: '2023-01-02T12:00:00+01:00'
  price: 2.149
- hour: '2023-01-02T13:00:00+01:00'
  price: 2.143
- hour: '2023-01-02T14:00:00+01:00'
  price: 2.184
- hour: '2023-01-02T15:00:00+01:00'
  price: 2.251
- hour: '2023-01-02T16:00:00+01:00'
  price: 2.321
- hour: '2023-01-02T17:00:00+01:00'
  price: 3.663
- hour: '2023-01-02T18:00:00+01:00'
  price: 3.707
- hour: '2023-01-02T19:00:00+01:00'
  price: 3.611
- hour: '2023-01-02T20:00:00+01:00'
  price: 3.505
- hour: '2023-01-02T21:00:00+01:00'
  price: 2.124
- hour: '2023-01-02T22:00:00+01:00'
  price: 2.031
- hour: '2023-01-02T23:00:00+01:00'
  price: 1.904

FR - Implement price sensor Energi Data Service

Currently, the integration only supports the Nordpool price integration. Still, there is a growing popularity towards the Energi Data Service price integration in Denmark, which a lot of people nowadays use for calculating their power prices, including transmission, etc.

It would benefit if the integration is altered, so it also works with the EDS.

The current issue with making that work is that the format of the raw_today prices differs between the two integrations.

Current raw_today format in Nordpool:
image

Current raw_today format in EDS:
image

Keep charger on after completion time

Is your feature request related to a problem? Please describe.
When keep charger on is active the charging stop when completion time (06:00) is reached. I have pre heating of cabin activated in the car at a time (06:10) after the completion time and therefore the power from that is drawn from the batteries instead of the charger.

Describe the solution you'd like
When keep charger on is active, the charger should be active until the car gets disconnected. Regardless if the completion time is reached.

Smart charging sometimes does not start with Tesla custom integration

Version of the custom_component

Version 1.0.4

Configuration

Home Assistant 2022.11.5
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221108.0 - latest

Describe the bug

  1. Smart charging sometimes does not start (did not start between the 2/12 and 3/12 for example)
    Possibly because random commands to turn off "EV Smart Charging Charging" and point 2)
  2. The integration spams out manually start- and stop charging command for history dates
  3. The integration randomly spams out the command to turn off "EV Smart Charging Apply price limit" (altough it is already turned off)

Debug log

EV Smart charging event log:

December 3, 2022

EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
12:25:33 - 44 minutes ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
12:25:33 - 44 minutes ago
EV Smart Charging Apply price limit turned off
12:25:32 - 44 minutes ago
EV Smart Charging Smart charging activated turned on
12:25:32 - 44 minutes ago
EV Smart Charging Charging turned off
12:25:32 - 44 minutes ago
December 2, 2022
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
19:57:18 - 17 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
19:57:18 - 17 hours ago
EV Smart Charging Charging turned off
19:57:18 - 17 hours ago
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
19:47:25 - 17 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
19:47:25 - 17 hours ago
EV Smart Charging Charging turned off
19:47:24 - 17 hours ago
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
19:08:13 - 18 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
19:08:13 - 18 hours ago
EV Smart Charging Apply price limit turned off
19:08:13 - 18 hours ago
EV Smart Charging Smart charging activated turned on
19:08:13 - 18 hours ago
EV Smart Charging Charging turned off
19:08:13 - 18 hours ago
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
15:27:27 - 22 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
15:27:27 - 22 hours ago
EV Smart Charging Charging turned off
15:27:27 - 22 hours ago
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
15:25:06 - 22 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
15:25:06 - 22 hours ago
EV Smart Charging Charging turned off
15:25:06 - 22 hours ago
EV Smart Charging Manually stop charging changed to November 27, 2022 at 09:02
15:23:11 - 22 hours ago
EV Smart Charging Manually start charging changed to November 28, 2022 at 21:28
15:23:11 - 22 hours ago
EV Smart Charging Charging turned off
15:23:11 - 22 hours ago

HA_log.txt

Problems with v1.7.0-dev1

Version of the custom_component

Version v1.7.0-dev1

Describe the bug

The start and stop of charging is sometimes not done.
Suspecting problems with the debounce implementation in #129

EV target SOC not updated

v1.5.2

Describe the bug

The EV target SOC (attibute of EV Smart Charging Charging) is not updated when i change the number.ev_smart_charging_minimum_ev_soc

Optimization for opportunistic charging

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Have option to trigger opportunistic charging when tomorrows price is lower than this night, even if price for this night is under price limit. Picture attached for this night. Something that would trigger opportunistic charging when price for last hour of tomorrow is cheaper than it would be tonight (maybe even another slider so that if tomorrows price is 0-200% from the price it would cost tonight to charge after minium SOC has been reached).

Describe alternatives you've considered
N/A

Additional context
Thanks for integration, it has been working great!

Here is charging schedule for tonight. Price tonight is under price limit and opportunistic level limit. It clearly still would be chaper to charge to minium SOC (in picture current EV SOC>minium EV SOC), and charge to full next night. Prices vary so much from night to night, that it is hard to have fixed monetary limit. It would be easy to set percent limit that controls opportunistic charging (for example 110% from tonights price).

kuva

Config entry title set by user

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Ability to change or set the config entry title in the config flow.

Describe alternatives you've considered
None.

Additional context
I have two instances of the integration. One for each of my two cars. I can change the name after installation but that only (optionally) affects the naming of the senors. It would be great if we could set the title of the config entry, so that it is displayed in the integration page in Home Assistant so that one could easily see which instance is which.

Support for Tesla via HA Custom Integration

I just discovered your HACS Integration and it fits well with what I am currently building.
I currently still have static electricity prices, but am thinking about going with Tibber in the future. To test things first I am currently getting prices from Nordpool integration.

Charging my PV battery with cheap electricity is something I have already integrated, so my Tesla is the next step. Since there is a well maintained Tesla integration within HA this should be easy to add, I guess.
One important factor for me is deciding between Solar Charging and cheap Grid Charging. I hope that is something that would he configurable within your Integration. For the PV battery I use the Solcast Forecast to determine how much to charge from Grid.

Start/end time weird

Hi,

First of all, many thanks for creating this!

I have a weird issue, apply price limit is on and the limit is above the 0,20 cents per kWh. But your script calculate this:

current_price: 0.2503792
EV SOC: '74'
EV target SOC: '80.0'
Charging is planned: true
**Charging start time: '2023-01-10T22:00:00+01:00'
Charging stop time: '2023-01-11T00:00:00+01:00'**
Charging number of hours: 2
raw_two_days:
  - start: '2023-01-09T00:00:00+01:00'
    end: '2023-01-09T01:00:00+01:00'
    value: 0.15950540000000002
  - start: '2023-01-09T01:00:00+01:00'
    end: '2023-01-09T02:00:00+01:00'
    value: 0.1481104
  - start: '2023-01-09T02:00:00+01:00'
    end: '2023-01-09T03:00:00+01:00'
    value: 0.14376440000000001
  - start: '2023-01-09T03:00:00+01:00'
    end: '2023-01-09T04:00:00+01:00'
    value: 0.1216422
  - start: '2023-01-09T04:00:00+01:00'
    end: '2023-01-09T05:00:00+01:00'
    value: 0.1116676
  - start: '2023-01-09T05:00:00+01:00'
    end: '2023-01-09T06:00:00+01:00'
    value: 0.126497
  - start: '2023-01-09T06:00:00+01:00'
    end: '2023-01-09T07:00:00+01:00'
    value: 0.171388
  - start: '2023-01-09T07:00:00+01:00'
    end: '2023-01-09T08:00:00+01:00'
    value: 0.2494676
  - start: '2023-01-09T08:00:00+01:00'
    end: '2023-01-09T09:00:00+01:00'
    value: 0.2706676
  - start: '2023-01-09T09:00:00+01:00'
    end: '2023-01-09T10:00:00+01:00'
    value: 0.26768899999999995
  - start: '2023-01-09T10:00:00+01:00'
    end: '2023-01-09T11:00:00+01:00'
    value: 0.2486408
  - start: '2023-01-09T11:00:00+01:00'
    end: '2023-01-09T12:00:00+01:00'
    value: 0.25029440000000003
  - start: '2023-01-09T12:00:00+01:00'
    end: '2023-01-09T13:00:00+01:00'
    value: 0.2278118
  - start: '2023-01-09T13:00:00+01:00'
    end: '2023-01-09T14:00:00+01:00'
    value: 0.2229676
  - start: '2023-01-09T14:00:00+01:00'
    end: '2023-01-09T15:00:00+01:00'
    value: 0.2251936
  - start: '2023-01-09T15:00:00+01:00'
    end: '2023-01-09T16:00:00+01:00'
    value: 0.2379772
  - start: '2023-01-09T16:00:00+01:00'
    end: '2023-01-09T17:00:00+01:00'
    value: 0.2508032
  - start: '2023-01-09T17:00:00+01:00'
    end: '2023-01-09T18:00:00+01:00'
    value: 0.2644242
  - start: '2023-01-09T18:00:00+01:00'
    end: '2023-01-09T19:00:00+01:00'
    value: 0.2729784
  - start: '2023-01-09T19:00:00+01:00'
    end: '2023-01-09T20:00:00+01:00'
    value: 0.2611276
  - start: '2023-01-09T20:00:00+01:00'
    end: '2023-01-09T21:00:00+01:00'
    value: 0.2503792
  - start: '2023-01-09T21:00:00+01:00'
    end: '2023-01-09T22:00:00+01:00'
    value: 0.22721819999999998
  - start: '2023-01-09T22:00:00+01:00'
    end: '2023-01-09T23:00:00+01:00'
    value: 0.2197876
  - start: '2023-01-09T23:00:00+01:00'
    end: '2023-01-10T00:00:00+01:00'
    value: 0.19467620000000002
  - start: '2023-01-10T00:00:00+01:00'
    end: '2023-01-10T01:00:00+01:00'
    value: 0.1922276
  - start: '2023-01-10T01:00:00+01:00'
    end: '2023-01-10T02:00:00+01:00'
    value: 0.182412
  - start: '2023-01-10T02:00:00+01:00'
    end: '2023-01-10T03:00:00+01:00'
    value: 0.1808008
  - start: '2023-01-10T03:00:00+01:00'
    end: '2023-01-10T04:00:00+01:00'
    value: 0.1755644
  - start: '2023-01-10T04:00:00+01:00'
    end: '2023-01-10T05:00:00+01:00'
    value: 0.1812036
  - start: '2023-01-10T05:00:00+01:00'
    end: '2023-01-10T06:00:00+01:00'
    value: 0.19498359999999998
  - start: '2023-01-10T06:00:00+01:00'
    end: '2023-01-10T07:00:00+01:00'
    value: 0.22651860000000001
  - start: '2023-01-10T07:00:00+01:00'
    end: '2023-01-10T08:00:00+01:00'
    value: 0.2452276
  - start: '2023-01-10T08:00:00+01:00'
    end: '2023-01-10T09:00:00+01:00'
    value: 0.2789144
  - start: '2023-01-10T09:00:00+01:00'
    end: '2023-01-10T10:00:00+01:00'
    value: 0.2757768
  - start: '2023-01-10T10:00:00+01:00'
    end: '2023-01-10T11:00:00+01:00'
    value: 0.2483334
  - start: '2023-01-10T11:00:00+01:00'
    end: '2023-01-10T12:00:00+01:00'
    value: 0.23632359999999997
  - start: '2023-01-10T12:00:00+01:00'
    end: '2023-01-10T13:00:00+01:00'
    value: 0.2303452
  - start: '2023-01-10T13:00:00+01:00'
    end: '2023-01-10T14:00:00+01:00'
    value: 0.230854
  - start: '2023-01-10T14:00:00+01:00'
    end: '2023-01-10T15:00:00+01:00'
    value: 0.23426719999999998
  - start: '2023-01-10T15:00:00+01:00'
    end: '2023-01-10T16:00:00+01:00'
    value: 0.2351364
  - start: '2023-01-10T16:00:00+01:00'
    end: '2023-01-10T17:00:00+01:00'
    value: 0.22980459999999997
  - start: '2023-01-10T17:00:00+01:00'
    end: '2023-01-10T18:00:00+01:00'
    value: 0.2366416
  - start: '2023-01-10T18:00:00+01:00'
    end: '2023-01-10T19:00:00+01:00'
    value: 0.233292
  - start: '2023-01-10T19:00:00+01:00'
    end: '2023-01-10T20:00:00+01:00'
    value: 0.2294018
  - start: '2023-01-10T20:00:00+01:00'
    end: '2023-01-10T21:00:00+01:00'
    value: 0.212198
  - start: '2023-01-10T21:00:00+01:00'
    end: '2023-01-10T22:00:00+01:00'
    value: 0.1878816
  - start: '2023-01-10T22:00:00+01:00'
    end: '2023-01-10T23:00:00+01:00'
    value: 0.16822920000000002
  - start: '2023-01-10T23:00:00+01:00'
    end: '2023-01-11T00:00:00+01:00'
    value: 0.1271648
charging_schedule:
  - start: '2023-01-09T00:00:00+01:00'
    end: '2023-01-09T01:00:00+01:00'
    value: 0
  - start: '2023-01-09T01:00:00+01:00'
    end: '2023-01-09T02:00:00+01:00'
    value: 0
  - start: '2023-01-09T02:00:00+01:00'
    end: '2023-01-09T03:00:00+01:00'
    value: 0
  - start: '2023-01-09T03:00:00+01:00'
    end: '2023-01-09T04:00:00+01:00'
    value: 0
  - start: '2023-01-09T04:00:00+01:00'
    end: '2023-01-09T05:00:00+01:00'
    value: 0
  - start: '2023-01-09T05:00:00+01:00'
    end: '2023-01-09T06:00:00+01:00'
    value: 0
  - start: '2023-01-09T06:00:00+01:00'
    end: '2023-01-09T07:00:00+01:00'
    value: 0
  - start: '2023-01-09T07:00:00+01:00'
    end: '2023-01-09T08:00:00+01:00'
    value: 0
  - start: '2023-01-09T08:00:00+01:00'
    end: '2023-01-09T09:00:00+01:00'
    value: 0
  - start: '2023-01-09T09:00:00+01:00'
    end: '2023-01-09T10:00:00+01:00'
    value: 0
  - start: '2023-01-09T10:00:00+01:00'
    end: '2023-01-09T11:00:00+01:00'
    value: 0
  - start: '2023-01-09T11:00:00+01:00'
    end: '2023-01-09T12:00:00+01:00'
    value: 0
  - start: '2023-01-09T12:00:00+01:00'
    end: '2023-01-09T13:00:00+01:00'
    value: 0
  - start: '2023-01-09T13:00:00+01:00'
    end: '2023-01-09T14:00:00+01:00'
    value: 0
  - start: '2023-01-09T14:00:00+01:00'
    end: '2023-01-09T15:00:00+01:00'
    value: 0
  - start: '2023-01-09T15:00:00+01:00'
    end: '2023-01-09T16:00:00+01:00'
    value: 0
  - start: '2023-01-09T16:00:00+01:00'
    end: '2023-01-09T17:00:00+01:00'
    value: 0
  - start: '2023-01-09T17:00:00+01:00'
    end: '2023-01-09T18:00:00+01:00'
    value: 0
  - start: '2023-01-09T18:00:00+01:00'
    end: '2023-01-09T19:00:00+01:00'
    value: 0
  - start: '2023-01-09T19:00:00+01:00'
    end: '2023-01-09T20:00:00+01:00'
    value: 0
  - start: '2023-01-09T20:00:00+01:00'
    end: '2023-01-09T21:00:00+01:00'
    value: 0
  - start: '2023-01-09T21:00:00+01:00'
    end: '2023-01-09T22:00:00+01:00'
    value: 0
  - start: '2023-01-09T22:00:00+01:00'
    end: '2023-01-09T23:00:00+01:00'
    value: 0
  - start: '2023-01-09T23:00:00+01:00'
    end: '2023-01-10T00:00:00+01:00'
    value: 0
  - start: '2023-01-10T00:00:00+01:00'
    end: '2023-01-10T01:00:00+01:00'
    value: 0
  - start: '2023-01-10T01:00:00+01:00'
    end: '2023-01-10T02:00:00+01:00'
    value: 0
  - start: '2023-01-10T02:00:00+01:00'
    end: '2023-01-10T03:00:00+01:00'
    value: 0
  - start: '2023-01-10T03:00:00+01:00'
    end: '2023-01-10T04:00:00+01:00'
    value: 0
  - start: '2023-01-10T04:00:00+01:00'
    end: '2023-01-10T05:00:00+01:00'
    value: 0
  - start: '2023-01-10T05:00:00+01:00'
    end: '2023-01-10T06:00:00+01:00'
    value: 0
  - start: '2023-01-10T06:00:00+01:00'
    end: '2023-01-10T07:00:00+01:00'
    value: 0
  - start: '2023-01-10T07:00:00+01:00'
    end: '2023-01-10T08:00:00+01:00'
    value: 0
  - start: '2023-01-10T08:00:00+01:00'
    end: '2023-01-10T09:00:00+01:00'
    value: 0
  - start: '2023-01-10T09:00:00+01:00'
    end: '2023-01-10T10:00:00+01:00'
    value: 0
  - start: '2023-01-10T10:00:00+01:00'
    end: '2023-01-10T11:00:00+01:00'
    value: 0
  - start: '2023-01-10T11:00:00+01:00'
    end: '2023-01-10T12:00:00+01:00'
    value: 0
  - start: '2023-01-10T12:00:00+01:00'
    end: '2023-01-10T13:00:00+01:00'
    value: 0
  - start: '2023-01-10T13:00:00+01:00'
    end: '2023-01-10T14:00:00+01:00'
    value: 0
  - start: '2023-01-10T14:00:00+01:00'
    end: '2023-01-10T15:00:00+01:00'
    value: 0
  - start: '2023-01-10T15:00:00+01:00'
    end: '2023-01-10T16:00:00+01:00'
    value: 0
  - start: '2023-01-10T16:00:00+01:00'
    end: '2023-01-10T17:00:00+01:00'
    value: 0
  - start: '2023-01-10T17:00:00+01:00'
    end: '2023-01-10T18:00:00+01:00'
    value: 0
  - start: '2023-01-10T18:00:00+01:00'
    end: '2023-01-10T19:00:00+01:00'
    value: 0
  - start: '2023-01-10T19:00:00+01:00'
    end: '2023-01-10T20:00:00+01:00'
    value: 0
  - start: '2023-01-10T20:00:00+01:00'
    end: '2023-01-10T21:00:00+01:00'
    value: 0
  - start: '2023-01-10T21:00:00+01:00'
    end: '2023-01-10T22:00:00+01:00'
    value: 0
  - start: '2023-01-10T22:00:00+01:00'
    end: '2023-01-10T23:00:00+01:00'
    value: 0.2091858
  - start: '2023-01-10T23:00:00+01:00'
    end: '2023-01-11T00:00:00+01:00'
    value: 0.2091858
icon: mdi:flash
friendly_name: EV Smart Charging Charging

Why does it takes tomorrow 22.00 hour and not earlier? For example, it can take 23.00 tonight (so this day and not tomorrow), the price is then 0,195.

Charging stops after 1 hour

Version of the custom_component

Version 1.2.0

Describe the bug

Only charged 1h (from 4:00 to 5:00). 3h charging was scheduled from 3:00 to 6:00.
This happens atleast when "Continous charging preferred" is off.

Unfortunately i did not have debug logging on, but logbook show that
EV Smart Charging Charging turned on 04:00:00
EV Smart Charging Charging turned off 05:00:00

No charging planned when charge completion time is after lates available price hour

I've noted that when charge completion time is before the current time, i.e. tomorrow, then no charging is planned, most likely due to EV Smart Charging not having price information available for tomorrow. This is in general alright, though during this weekend the electricity price in DK1 has been cheapest from 10:00-15:00, even cheaper than during the night.
The consequence is that EV Smart Charging does not plan any charging before prices for tomorrow is available, hence I miss the cheap spot during day hours. If I change charge completion time to 23:00 charging is planned just fine.

I understand the rationale of not planning charging periods until price periods for the entire charging period is available, but this has the mentioned drawback, when the spot prices are only available from 13:00 (in DK). Would it be better to plan charging for the time period where electricity prices are available? Electricity prices could be delayed too, of other services (Energi Data Service, Nord Pool, or other in the chain) fails.

ev_smart_charging_screendump_2
ev_smart_charging_settings

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

When trying to add the plugin in Hass following error appears and the installation fails:

Unexpected exception importing platform custom_components.ev_smart_charging.config_flow

Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 728, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 745, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/ev_smart_charging/init.py", line 10, in
from .coordinator import EVSmartChargingCoordinator
File "/home/homeassistant/.homeassistant/custom_components/ev_smart_charging/coordinator.py", line 26, in
from .helpers.coordinator import (
File "/home/homeassistant/.homeassistant/custom_components/ev_smart_charging/helpers/coordinator.py", line 215, in
class Scheduler:
File "/home/homeassistant/.homeassistant/custom_components/ev_smart_charging/helpers/coordinator.py", line 272, in Scheduler
def get_schedule(self, params: dict[str, Any]) -> list | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Optimisation: Use the cheapest hour as much as possible

Let me start with an example:

The car is 20% below the targeted charge level, the charger can add 15% charge per hour, which means that we will be looking for 2 hours. Now let's say that the first hour is more expensive than the second hour we find.

Currently the system will start at the beginning of the first hour, charging for the full duration of that hour and then only fill up the last 5% during the second (cheaper) hour.

It would be better if we could calculate the minute on which to start, so that we fill up 5% during the first hour and then fill up the 15% during the second hour.

I know that this adds a lot of complexity to the way that start times are calculated, but it could be a not insignificant saving, depending on the difference between the hours needed.

More versatile "Keep charger on" option

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Possibility to use the keep charger on function but only if SOC is above xx%, and the possibility to still use price limit.

Describe alternatives you've considered
None

Additional context
As discussed in #99, the last percent takes much longer time to charge and I would like to be able to get this last percents when it doesn't costs to much. By being able to switch on the switch.ev_smart_charging_keep_charger_on but with the condition that it should only be left on if SOC is greater than for example 98% and with the price limit applied as well, I would get this functionallity.

Cater for scheduled departure time (preheating etc)

Is your feature request related to a problem? Please describe.
NEJ! :)

Describe the solution you'd like
Hej Jonas!
Would it be possible to implement an optional feature where the logic of this component could have a "forced window of active charger" to provide power to the car for scheduled departures and climatization of the EV car?

Perhaps implementing a optional feature to set a "forced charger on window" feature where you can set start and stop time using an input_datetime?

Describe alternatives you've considered

  • Preheat on battery
  • Create my own timing automation "outside of the component"

Additional context
Like the orange line on the picture below.
image

Possibility to include last hour next day

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
The possibility to include 23:00-24:00 the next day in the calculations.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Now that there is a possibility to choose none continuous charging it would be great if the calculations could be done on all known hours. Today one can only choose until 23:00 the next day. This night this is the result then because of that:
After_23

If all hours where considered there wouldn't been any charging scheduled between 20:00 and 21:00. Instead that hour would have been scheduled between 23:00 and 24:00 the next night.

FR - Total cost of charging

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
Hej Jonas! Would it be possible to calculate and create a sensor that presents the total cost of last nights charging session?
And if possible a config option to set if this should be calculated in öre or kronor.

Describe alternatives you've considered
Create a quite template sensor for consumed energy per hour during the active session and then add the charging hours.

Additional context
Näe

Smart charging not updated

Version of the custom_component

Version 1.60

Configuration

Describe your configuration here.

Describe the bug

The smart charging on the curve (incl smart charging) is not updated. I have seen it several times that the curve is not updated and thereby, charging not activated during the night (when price is lowest). If I press the on/off switches in the intergration a few times then the smart price curve is updated but it is not done per default.

Debug log

Conditional continuous charging session

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I would like to be able set a minimum saved amount of money when switching to non-continuous charging.

Describe alternatives you've considered
None

Additional context
When ever a schedule is calculated and switch.ev_smart_charging_continuous_charging_preferred is off, the integration should do two schedules. One with continuous charging and one where the charging is split into different session, and then compare the amount of money saved by not use a continuous charging. This can be either the total amount (a bit harder) or the difference in average price for the selected hours. And only if the save is greater than the set minimum save, it should do non-continuous charging.
If you go for the total amount saved suggestion, there will be another nice feature for free. That is that there can be a sensor with the estimated total cost for the next planned charging period.

My thought is that there is no meaning in postponing the the final charging if there is not so much to save. As it is now there can be a gap in the charging and you only saves one or two cents in total. Then there is a question if you really did save those cents, because there is a small cost to start and stop the charging depending on battery temperatures. How much, though, is not known to me...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.