Bump Amcrest version to 1.8.0 (#53784)

* Bump Amcrest version to 1.8.0
* Add codeowner to Amcrest.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
This commit is contained in:
Sean Vig 2021-07-31 18:22:19 -04:00 committed by GitHub
parent e41bc1a0da
commit 673be4f7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -37,6 +37,7 @@ homeassistant/components/alpha_vantage/* @fabaff
homeassistant/components/ambee/* @frenck homeassistant/components/ambee/* @frenck
homeassistant/components/ambiclimate/* @danielhiversen homeassistant/components/ambiclimate/* @danielhiversen
homeassistant/components/ambient_station/* @bachya homeassistant/components/ambient_station/* @bachya
homeassistant/components/amcrest/* @flacjacket
homeassistant/components/analytics/* @home-assistant/core @ludeeus homeassistant/components/analytics/* @home-assistant/core @ludeeus
homeassistant/components/androidtv/* @JeffLIrion homeassistant/components/androidtv/* @JeffLIrion
homeassistant/components/apache_kafka/* @bachya homeassistant/components/apache_kafka/* @bachya

View File

@ -5,7 +5,7 @@ import logging
import threading import threading
import aiohttp import aiohttp
from amcrest import AmcrestError, Http, LoginError from amcrest import AmcrestError, ApiWrapper, LoginError
import voluptuous as vol import voluptuous as vol
from homeassistant.auth.permissions.const import POLICY_CONTROL from homeassistant.auth.permissions.const import POLICY_CONTROL
@ -114,8 +114,8 @@ CONFIG_SCHEMA = vol.Schema(
) )
class AmcrestChecker(Http): class AmcrestChecker(ApiWrapper):
"""amcrest.Http wrapper for catching errors.""" """amcrest.ApiWrapper wrapper for catching errors."""
def __init__(self, hass, name, host, port, user, password): def __init__(self, hass, name, host, port, user, password):
"""Initialize.""" """Initialize."""
@ -154,7 +154,7 @@ class AmcrestChecker(Http):
) )
def command(self, *args, **kwargs): def command(self, *args, **kwargs):
"""amcrest.Http.command wrapper to catch errors.""" """amcrest.ApiWrapper.command wrapper to catch errors."""
try: try:
ret = super().command(*args, **kwargs) ret = super().command(*args, **kwargs)
except LoginError as ex: except LoginError as ex:

View File

@ -571,7 +571,7 @@ class AmcrestCam(Camera):
def _goto_preset(self, preset): def _goto_preset(self, preset):
"""Move camera position and zoom to preset.""" """Move camera position and zoom to preset."""
try: try:
self._api.go_to_preset(action="start", preset_point_number=preset) self._api.go_to_preset(preset_point_number=preset)
except AmcrestError as error: except AmcrestError as error:
log_update_error( log_update_error(
_LOGGER, "move", self.name, f"camera to preset {preset}", error _LOGGER, "move", self.name, f"camera to preset {preset}", error

View File

@ -2,8 +2,8 @@
"domain": "amcrest", "domain": "amcrest",
"name": "Amcrest", "name": "Amcrest",
"documentation": "https://www.home-assistant.io/integrations/amcrest", "documentation": "https://www.home-assistant.io/integrations/amcrest",
"requirements": ["amcrest==1.7.2"], "requirements": ["amcrest==1.8.0"],
"dependencies": ["ffmpeg"], "dependencies": ["ffmpeg"],
"codeowners": [], "codeowners": ["@flacjacket"],
"iot_class": "local_polling" "iot_class": "local_polling"
} }

View File

@ -266,7 +266,7 @@ ambee==0.3.0
ambiclimate==0.2.1 ambiclimate==0.2.1
# homeassistant.components.amcrest # homeassistant.components.amcrest
amcrest==1.7.2 amcrest==1.8.0
# homeassistant.components.androidtv # homeassistant.components.androidtv
androidtv[async]==0.0.60 androidtv[async]==0.0.60