mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix onvif error with non ptz cameras (#32783)
This commit is contained in:
parent
9db3900cff
commit
628f77f8f2
@ -375,7 +375,7 @@ class ONVIFHassCamera(Camera):
|
||||
def setup_ptz(self):
|
||||
"""Set up PTZ if available."""
|
||||
_LOGGER.debug("Setting up the ONVIF PTZ service")
|
||||
if self._camera.get_service("ptz") is None:
|
||||
if self._camera.get_service("ptz", create=False) is None:
|
||||
_LOGGER.debug("PTZ is not available")
|
||||
else:
|
||||
self._ptz_service = self._camera.create_ptz_service()
|
||||
|
Loading…
x
Reference in New Issue
Block a user