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

Consolidate Turn X endpoints #790

Open
TomerFi opened this issue Dec 31, 2024 · 1 comment
Open

Consolidate Turn X endpoints #790

TomerFi opened this issue Dec 31, 2024 · 1 comment
Labels
type: enhancement New feature or request

Comments

@TomerFi
Copy link
Owner

TomerFi commented Dec 31, 2024

What did you have in mind?

When this project started, we only had Turn On and Turn Off. We should consider replacing the existing three pairs with three endpoints (instead of 6) and have said endpoints take On/Off as a query parameter.

image

Are you trying to fix a problem?

No response

Any lead on how this feature can be implemented?

We don't need to break anything at the start; we can add wrapper endpoints around the existing endpoints, which we will deprecate and eventually remove from the docs and make private.

Following other endpoints' naming conventions and clarifying the turn_on/off endpoints while we're at it. I suggest adding the following endpoints:

  • Control Power (/switcher/control_power)
    • Turn On (/switcher/turn_on)
    • Turn Off (/switcher/turn_off)
  • Control Shutter (/switcher/control_shutter)
    • Turn On Shutter Child Lock (/switcher/turn_on_shutter_child_lock)
    • Turn Off Shutter Child Lock (/switcher/turn_off_shutter_child_lock)
  • Control Light (/switcher/control_light)
    • Turn On Light (/switcher/turn_on_light)
    • Turn Off Light (/switcher/turn_off_light)
@TomerFi TomerFi added the type: enhancement New feature or request label Dec 31, 2024
@TomerFi
Copy link
Owner Author

TomerFi commented Dec 31, 2024

@dmatik, Any thoughts/objections on this one?

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

No branches or pull requests

1 participant