Skip to content

Consolidate Turn X endpoints #790

@TomerFi

Description

@TomerFi

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions