Skip to content

Hide "PTZ is not available on this camera" warning#26649

Merged
balloob merged 2 commits into
home-assistant:devfrom
definitio:hide-ptz-warning
Sep 18, 2019
Merged

Hide "PTZ is not available on this camera" warning#26649
balloob merged 2 commits into
home-assistant:devfrom
definitio:hide-ptz-warning

Conversation

@definitio
Copy link
Copy Markdown
Contributor

@definitio definitio commented Sep 14, 2019

Description:

Home Assistant prints "PTZ is not available on this camera" warning on every start because my camera doesn't support PTZ. It's really annoying. I think that message should has 'info' severity because there is no problem.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

ok to merge when changed to debug.

_LOGGER.debug("Setting up the ONVIF PTZ service")
if self._camera.get_service("ptz", create=False) is None:
_LOGGER.warning("PTZ is not available on this camera")
_LOGGER.info("PTZ is not available on this camera")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's make it debug. Also, "this" is useless in case you have 2 cameras.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@balloob balloob merged commit 9cd5c54 into home-assistant:dev Sep 18, 2019
@lock lock Bot locked and limited conversation to collaborators Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants