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

Separate WebRelay class and provide status #11

Merged
merged 36 commits into from
Aug 26, 2022
Merged

Conversation

dboulware
Copy link
Contributor

The purpose of this PR is to make changes that will allow sensors to have a preselector and multiple switches (web relays). To accomplish this, it:

  • Provides an abstract WebRelay class
  • Provides a ControlByWeb based implementation of the WebRelay class
  • Modifies the WebRelayPreselector to use the WebRelayClass
  • Adds status and name method and property to Preselector and WebRelay
  • Modifies config to separate control from status to support the status method and reconfigurable status.
  • Modifies preselector control to use rf_path names in utility methods.
  • Modifies ControlByWebWebRelay and WebRelayPreselector to require name and base_url.
  • Adds docstrings and type hints
  • Adds changes from Update backend #10 (comment)

dboulware and others added 28 commits August 4, 2022 08:32
… sections to support configurable status requests. Added id and name properties and get_status method to preselector and web_relay interfaces.
…ngs. Change rf_paths to dictionary and use rf_path names for interactions.
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good-see comments

.pre-commit-config.yaml Show resolved Hide resolved
src/its_preselector/controlbyweb_web_relay.py Outdated Show resolved Hide resolved
src/its_preselector/controlbyweb_web_relay.py Outdated Show resolved Hide resolved
src/its_preselector/preselector.py Show resolved Hide resolved
src/its_preselector/preselector.py Show resolved Hide resolved
src/its_preselector/preselector.py Show resolved Hide resolved
src/its_preselector/preselector.py Show resolved Hide resolved
src/its_preselector/preselector.py Show resolved Hide resolved
src/its_preselector/web_relay.py Show resolved Hide resolved
tests/test_controlbyweb_web_relay.py Outdated Show resolved Hide resolved
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@dboulware dboulware merged commit b954743 into master Aug 26, 2022
@dboulware dboulware deleted the WebRelayAndStatus branch November 30, 2022 17:25
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 this pull request may close these issues.

None yet

2 participants