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

Move use_data_service from PVOutput._api_query to PVOutput constructor #87

Open
JulianBriggs opened this issue Jan 24, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@JulianBriggs
Copy link
Collaborator

Move the attribute use_data_service
from PVOutput._api_query (to which is is passed by for example get_status(...use_data_service=True)
to PVOutput constructor eg:

def __init__(
    self,
    api_key: str=None,
    system_id: str=None,
    config_filename: Optional[str]=CONFIG_FILENAME,
    data_service_url: Optional[str]=None,

use_data_service: bool=False,
):

Detailed Description

Using the data service (rather than free service) is a connection level thing.
Better to set once on creation of PVOutput instance

Context

Counter-intuitive to set in every call to get status etc

see above

@JulianBriggs JulianBriggs added the enhancement New feature or request label Jan 24, 2022
@peterdudfield
Copy link
Contributor

Good idea

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

No branches or pull requests

2 participants