Add pan tilt camera module (#1261)

Add ptz controls for smartcameras.

---------

Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
Steven B.
2024-11-19 10:11:51 +00:00
committed by GitHub
parent a01247d48f
commit 5b5a148f9a
3 changed files with 112 additions and 1 deletions

View File

@@ -160,12 +160,14 @@ async def test_precision_hint(dummy_feature, precision_hint):
async def test_feature_setters(dev: Device, mocker: MockerFixture):
"""Test that all feature setters query something."""
# setters that do not call set on the device itself.
internal_setters = {"pan_step", "tilt_step"}
async def _test_feature(feat, query_mock):
if feat.attribute_setter is None:
return
expecting_call = True
expecting_call = feat.id not in internal_setters
if feat.type == Feature.Type.Number:
await feat.set_value(feat.minimum_value)