Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brak urządzeń lub encji #56

Closed
b3cksy opened this issue Oct 31, 2023 · 12 comments · Fixed by #60
Closed

Brak urządzeń lub encji #56

b3cksy opened this issue Oct 31, 2023 · 12 comments · Fixed by #60

Comments

@b3cksy
Copy link

b3cksy commented Oct 31, 2023

Cześć,
Od jakiegoś już czasu mam ten problem, tzn "brak urządzeń lub encji". Ponowne wczytywanie, pobieranie, itp. nie przynosi skutku. Szkoda, że mi to nie działa, bo integracja jest naprawdę bardzo przydatna.

Log poniżej.

2023-10-31 14:22:24.495 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up pgnig_gas_sensor platform for sensor
Traceback (most recent call last):
File "/config/custom_components/pgnig_gas_sensor/sensor.py", line 38, in async_setup_entry
pgps = await hass.async_add_executor_job(api.meterList)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgnigApi.py", line 31, in meterList
return ppg_list_from_dict(dictionary)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 139, in ppg_list_from_dict
return PpgList.from_dict(s)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 119, in from_dict
ppg_list = from_list(PpgListElement.from_dict, obj.get("PpgList"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 25, in from_list
assert isinstance(x, list)
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/pgnig_gas_sensor/sensor.py", line 40, in async_setup_entry
raise ValueError
ValueError

@pawelhulek
Copy link
Owner

hmm dziwne - wyglada jakbys nie mial liczników podpietych.
Mógłbys wywołac endpoint https://ebok.pgnig.pl/crm/get-ppg-list?api-version=3.0
i wrzucic tutaj odpowiedz - tylko bardzo bardzo prosze - zamaskuj dane prywatne - takie jak numery liczników adresy.

@b3cksy
Copy link
Author

b3cksy commented Nov 5, 2023

hmm dziwne - wyglada jakbys nie mial liczników podpietych. Mógłbys wywołac endpoint https://ebok.pgnig.pl/crm/get-ppg-list?api-version=3.0 i wrzucic tutaj odpowiedz - tylko bardzo bardzo prosze - zamaskuj dane prywatne - takie jak numery liczników adresy.

Dzięki za odpowiedź. Wygląda to następująco:
image

@pawelhulek
Copy link
Owner

@b3cksy Wybacz za poślizg.

Dalej nie bangla?

@pawelhulek
Copy link
Owner

@b3cksy Dalej nie dziala?

@b3cksy
Copy link
Author

b3cksy commented Jan 23, 2024

Dalej nie działa. Sprawdzone przed chwilą.
image

@b3cksy
Copy link
Author

b3cksy commented Jan 30, 2024

w między czasie stawiałem nową instancję HA i tam też nie działa :|

@pawelhulek pawelhulek linked a pull request Jan 31, 2024 that will close this issue
@pawelhulek
Copy link
Owner

@b3cksy Przygotowałem na ślepo poprawkę, z danych które podesłałes wynika, że powinno działać 🤔 Mógłbys zainstalować i dać znać czy działa - usunąłem asercje na to czy obiekt z licznikami z API to jest lista?

Wersja: 56-brak-urządzeń-lub-encji

image

@b3cksy
Copy link
Author

b3cksy commented Jan 31, 2024

Wykonałem tę usługę co podesłałeś (ale poprzez tryb yaml, bo nie mam żadnym encji do wybory za wyjątkiem zainstalowanych dodatków) i bez zmian.

w logach dalej to samo, tj:
2024-01-31 10:44:10.045 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up pgnig_gas_sensor platform for sensor
Traceback (most recent call last):
File "/config/custom_components/pgnig_gas_sensor/sensor.py", line 38, in async_setup_entry
pgps = await hass.async_add_executor_job(api.meterList)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgnigApi.py", line 31, in meterList
return ppg_list_from_dict(dictionary)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 139, in ppg_list_from_dict
return PpgList.from_dict(s)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 119, in from_dict
ppg_list = from_list(PpgListElement.from_dict, obj.get("PpgList"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pgnig_gas_sensor/PgpList.py", line 25, in from_list
assert isinstance(x, list)
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/pgnig_gas_sensor/sensor.py", line 40, in async_setup_entry
raise ValueError

@pawelhulek
Copy link
Owner

Hmm, dziwne - a powiedz mi czy po zaaplikowany tej zmiany zrestartowałes HA?

@b3cksy
Copy link
Author

b3cksy commented Jan 31, 2024 via email

@pawelhulek
Copy link
Owner

Hmmm a versja dodatku tez sie zmieniła?

Wykonany sewis z yamla był takI?


service: update.install
target:
  entity_id: update.pgnig_sensor_update
data:
  version: 56-brak-urządzeń-lub-encji

Na taka jak na obrazku?
image

Wybacz ze dopytuje, ale kod ze stacktracu nie istnieje na tej wersji która zainstalowałes.

@maciejbuchert
Copy link

Jeśli dobrze doczytałem.
Taryfa W-3.6 działa na zasadach prognozowanego zużycia.

Przez co w eBOK nie ma możliwości podania odczytu i "brakuje licznika".

Rozwiązaniem będzie przejście na taryfę W–3.12T i podawanie odczytu ręcznie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants