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

Fix io:DiscreteGateOpenerIOComponent #488

Merged
merged 1 commit into from
Jul 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions custom_components/tahoma/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
COMMAND_SET_CLOSURE_AND_LINEAR_SPEED = "setClosureAndLinearSpeed"
COMMAND_SET_DEPLOYMENT = "setDeployment"
COMMAND_SET_ORIENTATION = "setOrientation"
# io:DiscreteGateOpenerIOComponent
COMMAND_SET_PEDESTRIAN_POSITION = "setPedestrianPosition"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well actually it’s not really correct:

    {
      "commandName": "setPedestrianPosition",
      "nparams": 0
    },

It’s a setPosition like we are used to. This one does not take any parameters.


COMMAND_STOP = "stop"
COMMAND_STOP_IDENTIFY = "stopIdentify"
COMMAND_UNDEPLOY = "undeploy"
Expand All @@ -60,8 +63,12 @@
CORE_MEMORIZED_1_POSITION_STATE = "core:Memorized1PositionState"
CORE_MOVING_STATE = "core:MovingState"
CORE_OPEN_CLOSED_PARTIAL_STATE = "core:OpenClosedPartialState"
# io:DiscreteGateOpenerIOComponent
CORE_OPEN_CLOSED_PEDESTRIAN_STATE = "core:OpenClosedPedestrianState"
CORE_OPEN_CLOSED_STATE = "core:OpenClosedState"
CORE_OPEN_CLOSED_UNKNOWN_STATE = "core:OpenClosedUnknownState"
# io:DiscreteGateOpenerIOComponent
CORE_PEDESTRIAN_POSITION_STATE = "core:PedestrianPositionState"
CORE_PRIORITY_LOCK_TIMER_STATE = "core:PriorityLockTimerState"
CORE_SLATS_OPEN_CLOSED_STATE = "core:SlatsOpenClosedState"
CORE_SLATE_ORIENTATION_STATE = "core:SlateOrientationState"
Expand Down Expand Up @@ -147,6 +154,7 @@ def current_cover_position(self):
position = self.select_state(
CORE_CLOSURE_STATE,
CORE_CLOSURE_OR_ROCKER_POSITION_STATE,
CORE_PEDESTRIAN_POSITION_STATE,
)

# Uno devices can have a position not in 0 to 100 range when unknown
Expand Down Expand Up @@ -198,6 +206,7 @@ def is_closed(self):
CORE_OPEN_CLOSED_STATE,
CORE_SLATS_OPEN_CLOSED_STATE,
CORE_OPEN_CLOSED_PARTIAL_STATE,
CORE_OPEN_CLOSED_PEDESTRIAN_STATE,
CORE_OPEN_CLOSED_UNKNOWN_STATE,
MYFOX_SHUTTER_STATUS_STATE,
)
Expand Down