custom-components / nordpool

This component allows you to pull in the energy prices into Home-Assistant.
422 stars 101 forks source link

Not getting values from Nordpool after latest HA-Update #385

Open toMTen023 opened 1 week ago

toMTen023 commented 1 week ago

Version of the custom_component

Not sure if it is this version? MINIMUM_HA_VERSION = "2023.6.0"

Homeassistant version

Core 2024.6.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240610.1

Configuration


# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate

  ######### SSL Inställningar ##########
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

##### YAML  file locations ###############
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml

homeassistant:
  packages:
    car_heater: !include car_heater.yaml

## Describe the bug
Integration does not get any values from Nordpool after latest Home Assistant update.

## Debug log
Not sure what log you want but i getting some errors about Norpool integration in the log that since last HA update.

Log details (ERROR)
Logger: homeassistant.util.logging
Source: util/logging.py:95
First occurred: 00:00:00 (9 occurrences)
Last logged: 07:00:00

Exception in handle_new_day when dispatching 'nordpool_update_day': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 475, in handle_new_day await self.handle_new_hr() File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
MaBeniu commented 1 week ago

Same here stopped working

Logger: homeassistant.util.logging
Source: util/logging.py:95
First occurred: 4:04:49 PM (1 occurrences)
Last logged: 4:04:49 PM

Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
DewGew commented 1 week ago

Count me in also.

Hellowlol commented 1 week ago

It’s probably some null value in the json response but I would t know as no one posted what is needed to debug. Please provide what zone your are trying to get data from?

toMTen023 commented 1 week ago

I'm in SE03.

Erwiiinst commented 1 week ago

Zone: NL

Swerfer commented 1 week ago

Same for me. NL.

Logger: homeassistant.util.logging Source: util/logging.py:95 First occurred: 18:00:00 (4 occurrences) Last logged: 19:00:00

Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator

arno-millenaar commented 1 week ago

Same here, no longer getting updates. Need to restart HA and then there is an update. However it will not update itself without a restart.

Zone: NL

rogerthn2019 commented 38 minutes ago

SE3, error logged every hour since 2024-06-26 00:00:00

2024-07-07 10:00:00.265 ERROR (MainThread) [homeassistant.util.logging] Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/home/homeassistant/.homeassistant/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator