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

Two sites #7

Open
Owewolf opened this issue Jan 15, 2023 · 1 comment
Open

Two sites #7

Owewolf opened this issue Jan 15, 2023 · 1 comment

Comments

@Owewolf
Copy link

Owewolf commented Jan 15, 2023

I have two sites on my ids Hyyp app.
My log in returns
E7AF40B9-CE7D-4982-96BC-21439F267E26

@Owewolf
Copy link
Author

Owewolf commented Jan 24, 2023

This is the Trace error I receive Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/ids_hyyp/coordinator.py", line 35, in _async_update_data
return await 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)
File "/usr/local/lib/python3.10/site-packages/pyhyypapi/client.py", line 138, in load_alarm_infos
return HyypAlarmInfos(self).status()
File "/usr/local/lib/python3.10/site-packages/pyhyypapi/alarm_info.py", line 124, in status
formatted_data: dict[Any, Any] = self._format_data()
File "/usr/local/lib/python3.10/site-packages/pyhyypapi/alarm_info.py", line 79, in _format_data
site_ids[site]["partitions"][partition]["zones"] = {
File "/usr/local/lib/python3.10/site-packages/pyhyypapi/alarm_info.py", line 82, in
if key in site_ids[site]["partitions"][partition]["zoneIds"]
KeyError: 1638155
2023-01-24 20:57:40.429 WARNING (MainThread) [homeassistant.config_entries] Config entry '[email protected]' for ids_hyyp integration not ready yet: 1638155; Retrying in background
2023-01-24 20:57:46.520 ERROR (MainThread) [custom_components.ids_hyyp.coordinator] Unexpected error fetching ids_hyyp data: 1638155
Traceback (most recent call last):

The error message is indicating that there is a KeyError being raised in the _format_data method of the pyhyypapi.alarm_info module. This error is caused when the key variable, which is supposed to be a zone ID, is not found in the site_ids[site]["partitions"][partition]["zoneIds"] dictionary.

The error message also shows that the error is occurring in the HyypDataUpdateCoordinator class in the _async_update_data method. This class is used to update the data of the ids_hyyp component and this error is likely caused by an issue with the data returned by the ids_hyyp API.

It appears that the site_ids[site]["partitions"][partition]["zoneIds"] dictionary is missing a key with the value of 1638155. This zoneId is not present in the data returned by the API, the code is trying to access it, which is causing the KeyError.

You can try to check the API response if it's missing the key, or if there is any other issue with the data. It could also be caused by an issue with the API client configuration or the API endpoint.

I recommend checking the API documentation, ensuring that you are using the correct endpoint and that the API client is configured correctly. If the issue persists, please reach out to the API provider for further assistance.

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

No branches or pull requests

1 participant