PiotrMachowski / Home-Assistant-custom-components-Tauron-AMIplus

This sensor uses unofficial API to get energy usage and generation data from https://elicznik.tauron-dystrybucja.pl.
MIT License
138 stars 34 forks source link

get_last_statistics() takes 4 positional arguments but 5 were given #97

Closed mmg1t closed 1 year ago

mmg1t commented 1 year ago

czysta instalacja HA, prawie nic nie pozmieniane jeszcze, jeden z pierwszych komponentow to ten tu AMIplus Zaznaczone opcje: (nie wiem co one oznaczaja niestety jeszcze) [x] ENable generation sensors [x] Enable 12 months sensors [x] ENable balanced sensors [x] Enable configurable sensors wybrana data z poprzedniego roku kiedy licznik zostal zamontowany (poprawnie?)

takim błędem sypie co ok. pół minuty:

2023-01-28 00:00:57.941 ERROR (MainThread) [custom_components.tauron_amiplus.coordinator] Unexpected error fetching tauron_amiplus data: get_last_statistics() takes 4 positional arguments but 5 were given Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/tauron_amiplus/coordinator.py", line 31, in _async_update_data await self.generate_statistics(data) File "/config/custom_components/tauron_amiplus/coordinator.py", line 37, in generate_statistics await statistics_updater.update_all(data) File "/config/custom_components/tauron_amiplus/statistics.py", line 38, in update_all all_stat_ids = await self.prepare_stats_ids(zones) File "/config/custom_components/tauron_amiplus/statistics.py", line 118, in prepare_stats_ids v["has_stats"] = await self.has_stats(k) File "/config/custom_components/tauron_amiplus/statistics.py", line 199, in has_stats return len(await self.get_last_stats(statistic_id)) > 0 File "/config/custom_components/tauron_amiplus/statistics.py", line 202, in get_last_stats return await get_instance(self.hass).async_add_executor_job( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) TypeError: get_last_statistics() takes 4 positional arguments but 5 were given

PiotrMachowski commented 1 year ago

A jaka wersja HA?

mmg1t commented 1 year ago

settings -> about : Home Assistant 2022.11.5 Frontend 20221108.0 - latest

PiotrMachowski commented 1 year ago

Aktualna wersja tej integracji wymaga HA o wersji 2022.12 bądź nowszej

mmg1t commented 1 year ago

o faktcznie sa nowsze (calosc leci docker-compose'm) - poprawię

PiotrMachowski commented 1 year ago

Co miesiąc (w pierwszą środę miesiąca) wychodzi nowa wersja :)

mmg1t commented 1 year ago

aha, dzieki! Upgrade zrobiony, na razie cisza w logach :)