Closed petermnt closed 3 months ago
This happens to me too. But for me is at 11PM and resumes at midnight. I think this has to do with Timezone and pricing. In ev_smart_charging addon I would see that price is Unknown in that interval.
@petermnt and @bartashevich, In which time zone are in (HA->Settings->System->General->Time zone)? Which price source do you use? Which type of HA installation do you use (HA OS, Container, Core or Supervised)?
@jonasbkarlsson Time zone: Europe/Brussels Installation type: HA OS as VM (OVA) Price source: This I think is the source of the problem. When using nordpool there seems to be no issue. The issue only exists with Entso-e. I recently went back to Nordpool and the problem seems to have disappeared again.
I think Entso-e has some very short times of being unavailable around the midnight time, when it recalculates the today/tomorrow attributes. And ev_smart_charging tries to update its schedule during this time, which causes charging to stop or not start.
I prefer to use Entso-e though as that one is slightly more reliable for me. But I'm not sure if it's the job of ev_smart_charging to handle the 'bad' behaviour of the Entso-e integration. Although if there's an easy safety check to avoid this, it would be great of course.
Just confirming that I'm observing exactly the same issue. Charging stops at midnight and resumes at 01:00. I'm using Entso-e.
I'm at London timezone and using Entso-e. I've fixed this in the past, I'll try to remember what have I done.
@jonasbkarlsson
Change prices_today (only includes todays prices except 11PM) to prices (include all prices including tomorrow if exist):
# ev_smart_charging/helpers/price_adaptor.py
if self._price_platform == PLATFORM_ENTSOE:
- return Raw(state.attributes["prices_today"], self._price_platform)
+ return Raw(state.attributes["prices"], self._price_platform)
if price_platform == PLATFORM_ENTSOE:
- if not "prices_today" in price_state.attributes.keys():
+ if not "prices" in price_state.attributes.keys():
Remove extend, since tomorrow prices are already included in raw_today_local from previous statement.
# ev_smart_charging/coordinator.py
# Change to UTC time
self.raw_two_days = self.raw_today_local.copy().to_utc()
- self.raw_two_days.extend(self.raw_tomorrow_local.copy().to_utc())
state_class: measurement
prices_today:
- time: '2024-01-15 23:00:00+00:00'
price: 0.12488
- time: '2024-01-16 00:00:00+00:00'
price: 0.12113
- time: '2024-01-16 01:00:00+00:00'
price: 0.11838
- time: '2024-01-16 02:00:00+00:00'
price: 0.11575
- time: '2024-01-16 03:00:00+00:00'
price: 0.1154
- time: '2024-01-16 04:00:00+00:00'
price: 0.11773
- time: '2024-01-16 05:00:00+00:00'
price: 0.12305
- time: '2024-01-16 06:00:00+00:00'
price: 0.12305
- time: '2024-01-16 07:00:00+00:00'
price: 0.1265
- time: '2024-01-16 08:00:00+00:00'
price: 0.18128
- time: '2024-01-16 09:00:00+00:00'
price: 0.18047
- time: '2024-01-16 10:00:00+00:00'
price: 0.17174
- time: '2024-01-16 11:00:00+00:00'
price: 0.17325
- time: '2024-01-16 12:00:00+00:00'
price: 0.16913
- time: '2024-01-16 13:00:00+00:00'
price: 0.1698
- time: '2024-01-16 14:00:00+00:00'
price: 0.1675
- time: '2024-01-16 15:00:00+00:00'
price: 0.16391
- time: '2024-01-16 16:00:00+00:00'
price: 0.1675
- time: '2024-01-16 17:00:00+00:00'
price: 0.16867
- time: '2024-01-16 18:00:00+00:00'
price: 0.17534
- time: '2024-01-16 19:00:00+00:00'
price: 0.18105
- time: '2024-01-16 20:00:00+00:00'
price: 0.16836
- time: '2024-01-16 21:00:00+00:00'
price: 0.15369
- time: '2024-01-16 22:00:00+00:00'
price: 0.0943
prices_tomorrow:
- time: '2024-01-16 23:00:00+00:00'
price: 0.0473
- time: '2024-01-17 00:00:00+00:00'
price: 0.04362
- time: '2024-01-17 01:00:00+00:00'
price: 0.0322
- time: '2024-01-17 02:00:00+00:00'
price: 0.03093
- time: '2024-01-17 03:00:00+00:00'
price: 0.03093
- time: '2024-01-17 04:00:00+00:00'
price: 0.03105
- time: '2024-01-17 05:00:00+00:00'
price: 0.0445
- time: '2024-01-17 06:00:00+00:00'
price: 0.07613
- time: '2024-01-17 07:00:00+00:00'
price: 0.07762
- time: '2024-01-17 08:00:00+00:00'
price: 0.11862
- time: '2024-01-17 09:00:00+00:00'
price: 0.11782
- time: '2024-01-17 10:00:00+00:00'
price: 0.106
- time: '2024-01-17 11:00:00+00:00'
price: 0.08618
- time: '2024-01-17 12:00:00+00:00'
price: 0.08124
- time: '2024-01-17 13:00:00+00:00'
price: 0.07217
- time: '2024-01-17 14:00:00+00:00'
price: 0.07205
- time: '2024-01-17 15:00:00+00:00'
price: 0.08744
- time: '2024-01-17 16:00:00+00:00'
price: 0.11632
- time: '2024-01-17 17:00:00+00:00'
price: 0.11851
- time: '2024-01-17 18:00:00+00:00'
price: 0.12276
- time: '2024-01-17 19:00:00+00:00'
price: 0.12941
- time: '2024-01-17 20:00:00+00:00'
price: 0.12012
- time: '2024-01-17 21:00:00+00:00'
price: 0.11618
- time: '2024-01-17 22:00:00+00:00'
price: 0.04603
prices:
- time: '2024-01-15 23:00:00+00:00'
price: 0.12488
- time: '2024-01-16 00:00:00+00:00'
price: 0.12113
- time: '2024-01-16 01:00:00+00:00'
price: 0.11838
- time: '2024-01-16 02:00:00+00:00'
price: 0.11575
- time: '2024-01-16 03:00:00+00:00'
price: 0.1154
- time: '2024-01-16 04:00:00+00:00'
price: 0.11773
- time: '2024-01-16 05:00:00+00:00'
price: 0.12305
- time: '2024-01-16 06:00:00+00:00'
price: 0.12305
- time: '2024-01-16 07:00:00+00:00'
price: 0.1265
- time: '2024-01-16 08:00:00+00:00'
price: 0.18128
- time: '2024-01-16 09:00:00+00:00'
price: 0.18047
- time: '2024-01-16 10:00:00+00:00'
price: 0.17174
- time: '2024-01-16 11:00:00+00:00'
price: 0.17325
- time: '2024-01-16 12:00:00+00:00'
price: 0.16913
- time: '2024-01-16 13:00:00+00:00'
price: 0.1698
- time: '2024-01-16 14:00:00+00:00'
price: 0.1675
- time: '2024-01-16 15:00:00+00:00'
price: 0.16391
- time: '2024-01-16 16:00:00+00:00'
price: 0.1675
- time: '2024-01-16 17:00:00+00:00'
price: 0.16867
- time: '2024-01-16 18:00:00+00:00'
price: 0.17534
- time: '2024-01-16 19:00:00+00:00'
price: 0.18105
- time: '2024-01-16 20:00:00+00:00'
price: 0.16836
- time: '2024-01-16 21:00:00+00:00'
price: 0.15369
- time: '2024-01-16 22:00:00+00:00'
price: 0.0943
- time: '2024-01-16 23:00:00+00:00'
price: 0.0473
- time: '2024-01-17 00:00:00+00:00'
price: 0.04362
- time: '2024-01-17 01:00:00+00:00'
price: 0.0322
- time: '2024-01-17 02:00:00+00:00'
price: 0.03093
- time: '2024-01-17 03:00:00+00:00'
price: 0.03093
- time: '2024-01-17 04:00:00+00:00'
price: 0.03105
- time: '2024-01-17 05:00:00+00:00'
price: 0.0445
- time: '2024-01-17 06:00:00+00:00'
price: 0.07613
- time: '2024-01-17 07:00:00+00:00'
price: 0.07762
- time: '2024-01-17 08:00:00+00:00'
price: 0.11862
- time: '2024-01-17 09:00:00+00:00'
price: 0.11782
- time: '2024-01-17 10:00:00+00:00'
price: 0.106
- time: '2024-01-17 11:00:00+00:00'
price: 0.08618
- time: '2024-01-17 12:00:00+00:00'
price: 0.08124
- time: '2024-01-17 13:00:00+00:00'
price: 0.07217
- time: '2024-01-17 14:00:00+00:00'
price: 0.07205
- time: '2024-01-17 15:00:00+00:00'
price: 0.08744
- time: '2024-01-17 16:00:00+00:00'
price: 0.11632
- time: '2024-01-17 17:00:00+00:00'
price: 0.11851
- time: '2024-01-17 18:00:00+00:00'
price: 0.12276
- time: '2024-01-17 19:00:00+00:00'
price: 0.12941
- time: '2024-01-17 20:00:00+00:00'
price: 0.12012
- time: '2024-01-17 21:00:00+00:00'
price: 0.11618
- time: '2024-01-17 22:00:00+00:00'
price: 0.04603
unit_of_measurement: €/kWh
attribution: Data provided by ENTSO-e Transparency Platform
device_class: monetary
icon: mdi:currency-eur
friendly_name: Average electricity price today
@petermnt and @bartashevich, In which time zone are in (HA->Settings->System->General->Time zone)? Which price source do you use? Which type of HA installation do you use (HA OS, Container, Core or Supervised)?
Thanks a lot @bartashevich for the detailed report and suggestion of solution! I think I have an idea now of what is the root cause of the problem. I will check if I can fix that, or if I take your suggested solution instead.
@jonasbkarlsson thanks for taking this in consideration. Mine solution isn't great. I don't know exact logic behind prices for tomorrow in your integration, but that also needs a review, since I'm ignoring that.
Hi all! Sorry for not looking into this sooner. I have made a v1.11.0-dev4 that includes a more robust checking of the price information. I think it might fix this problem. Can anyone of you test this version and let me know if this problem is solved?
This might have been fixed in v1.11.0. I will close this issue now, but please let me know if the problem still exists.
Version of the custom_component
Version 1.9.0
Configuration
Apply price limit: on Continuous charging preferred: on Charge start time: None Charge end time: None Limit: 80% Minimum EV Soc: 35%
Describe the bug
When a charging is planned from before midnight, the charging stops at midnight and continues at 1 o'clock. When the charging is supposed to start at midnight, it doesn't start.
Debug log