hass-entso-e icon indicating copy to clipboard operation
hass-entso-e copied to clipboard

V0.3.0 doesn't seem to download the data anymore

Open MrOzzOnline opened this issue 1 year ago • 25 comments

It looks like the platform is up, but the data isn't updating since I updated to v0.3.0. I don't see any errors. Reverting to V0.2.0 seems to fix it for now.

MrOzzOnline avatar Dec 20 '22 14:12 MrOzzOnline

I have the same problem and switched back to 0.2.0. It seems all fields contain zero values.

rest77 avatar Dec 20 '22 16:12 rest77

What did the logs say?

sfstar avatar Dec 21 '22 06:12 sfstar

What did the logs say?

There is not a single entry in the logs relating to this integration.

I only got a template error right after restarting the integration:

2022-12-20 14:59:34.784 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{% set totaal_prijs = states('sensor.current_electricity_market_price') | float %} {% set netto_prijs = states('sensor.injectie_current_electricity_market_price') | float %}
{{ totaal_prijs - netto_prijs | float }}' but no default was specified') while processing template 'Template("{% set totaal_prijs = states('sensor.current_electricity_market_price') | float %} {% set netto_prijs = states('sensor.injectie_current_electricity_market_price') | float %}
{{ totaal_prijs - netto_prijs | float }}")' for attribute '_attr_native_value' in entity 'sensor.distributiekosten_en_btw'

MrOzzOnline avatar Dec 21 '22 08:12 MrOzzOnline

I'm running V0.3.0 again with debug logging enabled. I'll keep an eye on it and see what happens.

MrOzzOnline avatar Dec 21 '22 08:12 MrOzzOnline

Last update was successful.

Behavior yesterday: The attributes of sensor.average_electricity_price_today still contained the old values at 15:15 which is well past the time that the API updates (it updates at 14:00 local time). No warnings or errors in the logs.

Reverting to 0.2 and now back to 0.3 seems to fix it. @rest77 maybe you can try again?

I'll leave the debug log running for a while.

MrOzzOnline avatar Dec 21 '22 13:12 MrOzzOnline

Update:

There was a HA core update and after reboot (? I think) the values got messed up somehow. The prices for tomorrow seem to come a bit early. Maybe a timezone issue? image

MrOzzOnline avatar Dec 21 '22 21:12 MrOzzOnline

Did some more testing. Reverting it back to v0.2 fixed it.

I saw it short after 23:00, so I guess it's a timezone thing. I'm in Belgium at GMT+1

MrOzzOnline avatar Dec 21 '22 22:12 MrOzzOnline

Might be interesting: it seems to be version 0.2 is an hour late. This is what it looks like right after 0:00 using V0.2:

image

MrOzzOnline avatar Dec 21 '22 23:12 MrOzzOnline

V 0.3 right after 0:00, I guess the previous day should be gone?

image

MrOzzOnline avatar Dec 21 '22 23:12 MrOzzOnline

I tried again with the loggs on debug but there are no errors.

I get: state_class: measurement unit_of_measurement: SEK/kWh device_class: monetary icon: mdi:cash-minus friendly_name: Average electricity price today prices_today:

  • time: '2022-12-22 00:00:00+01:00' price: 0.251
  • time: '2022-12-22 01:00:00+01:00' price: 0.251
  • time: '2022-12-22 02:00:00+01:00' price: 0.251
  • time: '2022-12-22 03:00:00+01:00' price: 0.251
  • time: '2022-12-22 04:00:00+01:00' price: 0.251
  • time: '2022-12-22 05:00:00+01:00' price: 0.251
  • time: '2022-12-22 06:00:00+01:00' price: 0.251
  • time: '2022-12-22 07:00:00+01:00' price: 0.251
  • time: '2022-12-22 08:00:00+01:00' price: 0.251
  • time: '2022-12-22 09:00:00+01:00' price: 0.251
  • time: '2022-12-22 10:00:00+01:00' price: 0.251
  • time: '2022-12-22 11:00:00+01:00' price: 0.251
  • time: '2022-12-22 12:00:00+01:00' price: 0.251
  • time: '2022-12-22 13:00:00+01:00' price: 0.251
  • time: '2022-12-22 14:00:00+01:00' price: 0.251
  • time: '2022-12-22 15:00:00+01:00' price: 0.251
  • time: '2022-12-22 16:00:00+01:00' price: 0.251
  • time: '2022-12-22 17:00:00+01:00' price: 0.251
  • time: '2022-12-22 18:00:00+01:00' price: 0.251
  • time: '2022-12-22 19:00:00+01:00' price: 0.251
  • time: '2022-12-22 20:00:00+01:00' price: 0.251
  • time: '2022-12-22 21:00:00+01:00' price: 0.251
  • time: '2022-12-22 22:00:00+01:00' price: 0.251
  • time: '2022-12-22 23:00:00+01:00' price: 0.251

prices_tomorrow: prices:

  • time: '2022-12-21 00:00:00+01:00' price: 0.251
  • time: '2022-12-21 01:00:00+01:00' price: 0.251
  • time: '2022-12-21 02:00:00+01:00' price: 0.251
  • time: '2022-12-21 03:00:00+01:00' price: 0.251
  • time: '2022-12-21 04:00:00+01:00' price: 0.251
  • time: '2022-12-21 05:00:00+01:00' price: 0.251
  • time: '2022-12-21 06:00:00+01:00' price: 0.251
  • time: '2022-12-21 07:00:00+01:00' price: 0.251
  • time: '2022-12-21 08:00:00+01:00' price: 0.251
  • time: '2022-12-21 09:00:00+01:00' price: 0.251
  • time: '2022-12-21 10:00:00+01:00' price: 0.251
  • time: '2022-12-21 11:00:00+01:00' price: 0.251
  • time: '2022-12-21 12:00:00+01:00' price: 0.251
  • time: '2022-12-21 13:00:00+01:00' price: 0.251
  • time: '2022-12-21 14:00:00+01:00' price: 0.251
  • time: '2022-12-21 15:00:00+01:00' price: 0.251
  • time: '2022-12-21 16:00:00+01:00' price: 0.251
  • time: '2022-12-21 17:00:00+01:00' price: 0.251
  • time: '2022-12-21 18:00:00+01:00' price: 0.251
  • time: '2022-12-21 19:00:00+01:00' price: 0.251
  • time: '2022-12-21 20:00:00+01:00' price: 0.251
  • time: '2022-12-21 21:00:00+01:00' price: 0.251
  • time: '2022-12-21 22:00:00+01:00' price: 0.251
  • time: '2022-12-21 23:00:00+01:00' price: 0.251
  • time: '2022-12-22 00:00:00+01:00' price: 0.251
  • time: '2022-12-22 01:00:00+01:00' price: 0.251
  • time: '2022-12-22 02:00:00+01:00' price: 0.251
  • time: '2022-12-22 03:00:00+01:00' price: 0.251
  • time: '2022-12-22 04:00:00+01:00' price: 0.251
  • time: '2022-12-22 05:00:00+01:00' price: 0.251
  • time: '2022-12-22 06:00:00+01:00' price: 0.251
  • time: '2022-12-22 07:00:00+01:00' price: 0.251
  • time: '2022-12-22 08:00:00+01:00' price: 0.251
  • time: '2022-12-22 09:00:00+01:00' price: 0.251
  • time: '2022-12-22 10:00:00+01:00' price: 0.251
  • time: '2022-12-22 11:00:00+01:00' price: 0.251
  • time: '2022-12-22 12:00:00+01:00' price: 0.251
  • time: '2022-12-22 13:00:00+01:00' price: 0.251
  • time: '2022-12-22 14:00:00+01:00' price: 0.251
  • time: '2022-12-22 15:00:00+01:00' price: 0.251
  • time: '2022-12-22 16:00:00+01:00' price: 0.251
  • time: '2022-12-22 17:00:00+01:00' price: 0.251
  • time: '2022-12-22 18:00:00+01:00' price: 0.251
  • time: '2022-12-22 19:00:00+01:00' price: 0.251
  • time: '2022-12-22 20:00:00+01:00' price: 0.251
  • time: '2022-12-22 21:00:00+01:00' price: 0.251
  • time: '2022-12-22 22:00:00+01:00' price: 0.251
  • time: '2022-12-22 23:00:00+01:00' price: 0.251

attribution: Data provided by ENTSO-e Transparency Platform

0.251 is my fixed additional cost which is added with the template.

rest77 avatar Dec 22 '22 11:12 rest77

I can't reproduce this. What mode of calculation are you using?

JaccoR avatar Dec 23 '22 16:12 JaccoR

I use "rotation" and area Sweden 3 (SE3).

rest77 avatar Dec 23 '22 17:12 rest77

Perhaps this can be fixed with the same solution that will fix #77?

sfstar avatar Dec 23 '22 17:12 sfstar

So I'm currently seeing the behaviour as well on my "on publish" instance of the integration. Seems to happen if internet connectivity was lost during a update attempt in combination with the AVG sensor only being updated when the avg value changes.

sfstar avatar Dec 25 '22 13:12 sfstar

Had this yesterday as well. Not sure what the cause was. Has this been introduced with #95?

JaccoR avatar Dec 30 '22 12:12 JaccoR

If you look at the changed code in case data or self.data is none, nothing happens and nothing is logged. Maybe add an else section and log a warning in it?

MrOzzOnline avatar Dec 31 '22 09:12 MrOzzOnline

FYI I've updated back to V0.3.0 with no issues so far. No idea why it went wrong a few weeks ago.

MrOzzOnline avatar Jan 12 '23 13:01 MrOzzOnline

I tried again but in v0.3.0 all prices are zero. In v0.2.0 everything works as expected.

rest77 avatar Jan 16 '23 21:01 rest77

It happend / is happening again. The integration doesn't seem to be updating anymore. With debug logging enabled I don't see any warning or errors. I'm not sure what I can do to check what goes wrong? Any help would be appreciated.

@sfstar ?

MrOzzOnline avatar Jan 23 '23 14:01 MrOzzOnline

The data got downloaded somehow. Nothing in the logs so I don't know when/how it got fixed.

MrOzzOnline avatar Jan 23 '23 16:01 MrOzzOnline

I've been observing this error for a while now. The data always seems to recover after 1 or 2 hours. I often receive the data an hour late while it's still published in the Entso-e API.

my hypothesis: Is it possible this integration only polls for new data once each hour on xx:00? If the entso-e data is published late the integration will wait for an hour to try again? Can someone check this in the code?

MrOzzOnline avatar Feb 10 '23 13:02 MrOzzOnline

Where do you find those version numbers 0.2.0 and 0.3.0?

martin3000 avatar Feb 20 '23 10:02 martin3000

Where do you find those version numbers 0.2.0 and 0.3.0?

Using HACS, click on the integration:

image

MrOzzOnline avatar Feb 20 '23 12:02 MrOzzOnline

I don't have HACS. I checked manifest.json

martin3000 avatar Feb 20 '23 15:02 martin3000

I've been observing this error for a while now. The data always seems to recover after 1 or 2 hours. I often receive the data an hour late while it's still published in the Entso-e API.

my hypothesis: Is it possible this integration only polls for new data once each hour on xx:00? If the entso-e data is published late the integration will wait for an hour to try again? Can someone check this in the code?

Yes it does that, it collects the data again at the next hour sharp:

# Schedule the next update at exactly the next whole hour sharp
        self._unsub_update = event.async_track_point_in_utc_time(
            self.hass,
            self._update_job,
            utcnow().replace(minute=0, second=0) + timedelta(hours=1),
        )

LeonJansen avatar Mar 01 '23 13:03 LeonJansen