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

fixes and refactor for api data fetching #113

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

KirilKurkianec
Copy link
Collaborator

No description provided.

@KirilKurkianec KirilKurkianec added code fix REFACTOR REFACTORING WAS PERFORMED labels Dec 10, 2024
@KirilKurkianec KirilKurkianec self-assigned this Dec 10, 2024
@KirilKurkianec KirilKurkianec linked an issue Dec 10, 2024 that may be closed by this pull request
@KirilKurkianec
Copy link
Collaborator Author

@jontofront you can checkout the branch to confirm that error are gone

@jontofront
Copy link
Owner

Thanks, erros are gone

@jontofront jontofront merged commit 16aa048 into master Dec 10, 2024
6 checks passed
@jontofront
Copy link
Owner

This pull request includes several changes to the custom_components/econet300/api.py file to improve the consistency and clarity of the API data fetching methods. The most significant changes involve replacing the _fetch_reg_key and _fetch_reg_names methods with a new _fetch_api_data_by_key method, and updating various methods to use this new method.

Improvements to API data fetching:

  • custom_components/econet300/api.py: Replaced _fetch_reg_key and _fetch_reg_names methods with a new _fetch_api_data_by_key method to standardize the process of fetching API data by key.
  • custom_components/econet300/api.py: Updated the get_param_limits, fetch_reg_params_data, and fetch_param_edit_data methods to use the new _fetch_api_data_by_key method instead of the removed _fetch_reg_key method. [1] [2] [3]
  • custom_components/econet300/api.py: Updated the fetch_sys_params method to use the new _fetch_api_data_by_key method for fetching system parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code fix REFACTOR REFACTORING WAS PERFORMED
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: rewrite _fetch_reg_key function
2 participants