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

Match adapter to controller based on module rather than key #29

Open
GDYendell opened this issue Aug 20, 2024 · 0 comments
Open

Match adapter to controller based on module rather than key #29

GDYendell opened this issue Aug 20, 2024 · 0 comments
Assignees

Comments

@GDYendell
Copy link
Contributor

GDYendell commented Aug 20, 2024

This method matches adapters based on the "index" the adapter is loaded as, which requires the deployments be configured with that exact name. The API exposes the name of the class of the adapter, which is static (unless the source code is changed), so would be much more reliable.

e.g. response = {..., 'module': {'value': 'EigerFanAdapter', 'writeable': False, 'type': 'str'}, ...}

Update _create_adapter_controller to read this status and match on the class name instead of the arbitrary index name. The initialise method should probably extract this and pass the class name into _create_adapter_controller, as it has already done a request of the full tree here so has that available.

@GDYendell GDYendell changed the title Match adapter to controlle based on module rather than key Match adapter to controller based on module rather than key Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Next Sprint
Development

No branches or pull requests

2 participants