Skip to content

Commit

Permalink
PTZ using cover #921
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Jul 25, 2023
1 parent 3cbf47d commit 644d48b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app/wyzebridge/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,19 @@ def get_entities(base_topic: str, pan_cam: bool = False, rtsp: bool = False) ->
"entity_category": "diagnostic",
},
},
"pan_tilt": {
"type": "cover",
"payload": {
"command_topic": f"{base_topic}rotary_degree/set",
"tilt_command_topic": f"{base_topic}rotary_degree/set",
"payload_open": "up",
"payload_close": "down",
"payload_stop": None,
"tilt_opened_value": 90,
"tilt_closed_value": -90,
"icon": "mdi:rotate-orbit",
},
},
}
if pan_cam:
entities |= {
Expand Down
2 changes: 1 addition & 1 deletion app/wyzecam/tutk/tutk_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ class K11000SetRotaryByDegree(TutkWyzeProtocolMessage):
"""

def __init__(self, horizontal: int, vertical: int, speed: int = 5):
def __init__(self, horizontal: int, vertical: int = 0, speed: int = 5):
super().__init__(11000)
self.horizontal = horizontal
self.vertical = vertical
Expand Down

0 comments on commit 644d48b

Please sign in to comment.