JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
Apache License 2.0
185 stars 31 forks source link

Unable to update various entries due to data processing error: None and error: unsupported operand type(s) for /: 'NoneType' and 'float' #172

Closed nohn closed 2 months ago

nohn commented 2 months ago

After update to 0.4.0 my entities don’t update anymore. Log says:

Unable to update entity 'sensor.entso_e_current_percentage_of_highest_electricity_price_today' due to data processing error: None and error: unsupported operand type(s) for /: 'NoneType' and 'float' , data: {'data': {Timestamp('2024-09-02 01:00:00+0200', tz='Europe/Berlin'): 0.33626, Timestamp('2024-09-02 02:00:00+0200', tz='Europe/Berlin'): 0.33343, Timestamp('2024-09-02 03:00:00+0200', tz='Europe/Berlin'): 0.33357, Timestamp('2024-09-02 04:00:00+0200', tz='Europe/Berlin'): 0.33247, Timestamp('2024-09-02 05:00:00+0200', tz='Europe/Berlin'): 0.34429, Timestamp('2024-09-02 06:00:00+0200', tz='Europe/Berlin'): 0.36001, Timestamp('2024-09-02 07:00:00+0200', tz='Europe/Berlin'): 0.38407, Timestamp('2024-09-02 08:00:00+0200', tz='Europe/Berlin'): 0.38049, Timestamp('2024-09-02 09:00:00+0200', tz='Europe/Berlin'): 0.36942, Timestamp('2024-09-02 10:00:00+0200', tz='Europe/Berlin'): 0.34585, Timestamp('2024-09-02 11:00:00+0200', tz='Europe/Berlin'): 0.33156, Timestamp('2024-09-02 12:00:00+0200', tz='Europe/Berlin'): 0.32469, Timestamp('2024-09-02 13:00:00+0200', tz='Europe/Berlin'): 0.3201, Timestamp('2024-09-02 14:00:00+0200', tz='Europe/Berlin'): 0.323, Timestamp('2024-09-02 15:00:00+0200', tz='Europe/Berlin'): 0.32849, Timestamp('2024-09-02 16:00:00+0200', tz='Europe/Berlin'): 0.3349, Timestamp('2024-09-02 17:00:00+0200', tz='Europe/Berlin'): 0.35781, Timestamp('2024-09-02 18:00:00+0200', tz='Europe/Berlin'): 0.38744, Timestamp('2024-09-02 19:00:00+0200', tz='Europe/Berlin'): 0.52741, Timestamp('2024-09-02 20:00:00+0200', tz='Europe/Berlin'): 0.47583, Timestamp('2024-09-02 21:00:00+0200', tz='Europe/Berlin'): 0.38044, Timestamp('2024-09-02 22:00:00+0200', tz='Europe/Berlin'): 0.35943, Timestamp('2024-09-02 23:00:00+0200', tz='Europe/Berlin'): 0.34705}, 'dataToday': {Timestamp('2024-09-02 01:00:00+0200', tz='Europe/Berlin'): 0.33626, Timestamp('2024-09-02 02:00:00+0200', tz='Europe/Berlin'): 0.33343, Timestamp('2024-09-02 03:00:00+0200', tz='Europe/Berlin'): 0.33357, Timestamp('2024-09-02 04:00:00+0200', tz='Europe/Berlin'): 0.33247, Timestamp('2024-09-02 05:00:00+0200', tz='Europe/Berlin'): 0.34429, Timestamp('2024-09-02 06:00:00+0200', tz='Europe/Berlin'): 0.36001, Timestamp('2024-09-02 07:00:00+0200', tz='Europe/Berlin'): 0.38407, Timestamp('2024-09-02 08:00:00+0200', tz='Europe/Berlin'): 0.38049, Timestamp('2024-09-02 09:00:00+0200', tz='Europe/Berlin'): 0.36942, Timestamp('2024-09-02 10:00:00+0200', tz='Europe/Berlin'): 0.34585, Timestamp('2024-09-02 11:00:00+0200', tz='Europe/Berlin'): 0.33156, Timestamp('2024-09-02 12:00:00+0200', tz='Europe/Berlin'): 0.32469, Timestamp('2024-09-02 13:00:00+0200', tz='Europe/Berlin'): 0.3201, Timestamp('2024-09-02 14:00:00+0200', tz='Europe/Berlin'): 0.323, Timestamp('2024-09-02 15:00:00+0200', tz='Europe/Berlin'): 0.32849, Timestamp('2024-09-02 16:00:00+0200', tz='Europe/Berlin'): 0.3349, Timestamp('2024-09-02 17:00:00+0200', tz='Europe/Berlin'): 0.35781, Timestamp('2024-09-02 18:00:00+0200', tz='Europe/Berlin'): 0.38744, Timestamp('2024-09-02 19:00:00+0200', tz='Europe/Berlin'): 0.52741, Timestamp('2024-09-02 20:00:00+0200', tz='Europe/Berlin'): 0.47583, Timestamp('2024-09-02 21:00:00+0200', tz='Europe/Berlin'): 0.38044, Timestamp('2024-09-02 22:00:00+0200', tz='Europe/Berlin'): 0.35943, Timestamp('2024-09-02 23:00:00+0200', tz='Europe/Berlin'): 0.34705}, 'dataTomorrow': {}}

micvdh commented 2 months ago

Same issue here for Brussels TZ.

Now, looking at the data, I suspect that like last week there is an issue at ENTSOE API side, as the extract below is from logs during the night (September 3rd) and the JSON data only contain data for yesterday. I also notice this yesterday night, that the graphs were ending at midnight with yesterday's data.

2024-09-03 03:00:00.561 WARNING (MainThread) [custom_components.entsoe.sensor] Unable to update entity 'sensor.espot_current_percentage_of_highest_electricity_price_today' due to data processing error: None and error: unsupported operand type(s) for /: 'NoneType' and 'float' , data: { 'data': { Timestamp('2024-09-02 01:00:00+0200', tz='Europe/Brussels'): 0.0949, Timestamp('2024-09-02 02:00:00+0200', tz='Europe/Brussels'): 0.09242, Timestamp('2024-09-02 03:00:00+0200', tz='Europe/Brussels'): 0.09253, Timestamp('2024-09-02 04:00:00+0200', tz='Europe/Brussels'): 0.08951, Timestamp('2024-09-02 05:00:00+0200', tz='Europe/Brussels'): 0.09732, Timestamp('2024-09-02 06:00:00+0200', tz='Europe/Brussels'): 0.10779, Timestamp('2024-09-02 07:00:00+0200', tz='Europe/Brussels'): 0.12763, Timestamp('2024-09-02 08:00:00+0200', tz='Europe/Brussels'): 0.13152, Timestamp('2024-09-02 09:00:00+0200', tz='Europe/Brussels'): 0.12264, Timestamp('2024-09-02 10:00:00+0200', tz='Europe/Brussels'): 0.10283, Timestamp('2024-09-02 11:00:00+0200', tz='Europe/Brussels'): 0.09087, Timestamp('2024-09-02 12:00:00+0200', tz='Europe/Brussels'): 0.08525, Timestamp('2024-09-02 13:00:00+0200', tz='Europe/Brussels'): 0.0814, Timestamp('2024-09-02 14:00:00+0200', tz='Europe/Brussels'): 0.08393, Timestamp('2024-09-02 15:00:00+0200', tz='Europe/Brussels'): 0.08918, Timestamp('2024-09-02 16:00:00+0200', tz='Europe/Brussels'): 0.09407, Timestamp('2024-09-02 17:00:00+0200', tz='Europe/Brussels'): 0.10619, Timestamp('2024-09-02 18:00:00+0200', tz='Europe/Brussels'): 0.12776, Timestamp('2024-09-02 19:00:00+0200', tz='Europe/Brussels'): 0.18648, Timestamp('2024-09-02 20:00:00+0200', tz='Europe/Brussels'): 0.17181, Timestamp('2024-09-02 21:00:00+0200', tz='Europe/Brussels'): 0.13298, Timestamp('2024-09-02 22:00:00+0200', tz='Europe/Brussels'): 0.11524, Timestamp('2024-09-02 23:00:00+0200', tz='Europe/Brussels'): 0.10421 }, 'dataToday': { Timestamp('2024-09-02 01:00:00+0200', tz='Europe/Brussels'): 0.0949, Timestamp('2024-09-02 02:00:00+0200', tz='Europe/Brussels'): 0.09242, Timestamp('2024-09-02 03:00:00+0200', tz='Europe/Brussels'): 0.09253, Timestamp('2024-09-02 04:00:00+0200', tz='Europe/Brussels'): 0.08951, Timestamp('2024-09-02 05:00:00+0200', tz='Europe/Brussels'): 0.09732, Timestamp('2024-09-02 06:00:00+0200', tz='Europe/Brussels'): 0.10779, Timestamp('2024-09-02 07:00:00+0200', tz='Europe/Brussels'): 0.12763, Timestamp('2024-09-02 08:00:00+0200', tz='Europe/Brussels'): 0.13152, Timestamp('2024-09-02 09:00:00+0200', tz='Europe/Brussels'): 0.12264, Timestamp('2024-09-02 10:00:00+0200', tz='Europe/Brussels'): 0.10283, Timestamp('2024-09-02 11:00:00+0200', tz='Europe/Brussels'): 0.09087, Timestamp('2024-09-02 12:00:00+0200', tz='Europe/Brussels'): 0.08525, Timestamp('2024-09-02 13:00:00+0200', tz='Europe/Brussels'): 0.0814, Timestamp('2024-09-02 14:00:00+0200', tz='Europe/Brussels'): 0.08393, Timestamp('2024-09-02 15:00:00+0200', tz='Europe/Brussels'): 0.08918, Timestamp('2024-09-02 16:00:00+0200', tz='Europe/Brussels'): 0.09407, Timestamp('2024-09-02 17:00:00+0200', tz='Europe/Brussels'): 0.10619, Timestamp('2024-09-02 18:00:00+0200', tz='Europe/Brussels'): 0.12776, Timestamp('2024-09-02 19:00:00+0200', tz='Europe/Brussels'): 0.18648, Timestamp('2024-09-02 20:00:00+0200', tz='Europe/Brussels'): 0.17181, Timestamp('2024-09-02 21:00:00+0200', tz='Europe/Brussels'): 0.13298, Timestamp('2024-09-02 22:00:00+0200', tz='Europe/Brussels'): 0.11524, Timestamp('2024-09-02 23:00:00+0200', tz='Europe/Brussels'): 0.10421 }, 'dataTomorrow': {} }

micvdh commented 2 months ago

Seems confirmed that issue is not with the plug-in, transparency platform itself doesn't display the graphs as of today.

Yesterday's data : image

Today's data : image

nohn commented 2 months ago

In this case, I'll close this issue.

Roeland54 commented 2 months ago

The prices of today are now added to the api. So your sensors should recover and show the correct prices again in the next 2 hours if you are running the latest version.

let me now if your values are not recovering.