mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Rename device to api in Axis integration (#113965)
This commit is contained in:
parent
c6f2ff8e88
commit
6800034d5a
@ -28,7 +28,7 @@ async def get_axis_api(
|
|||||||
"""Create a Axis device API."""
|
"""Create a Axis device API."""
|
||||||
session = get_async_client(hass, verify_ssl=False)
|
session = get_async_client(hass, verify_ssl=False)
|
||||||
|
|
||||||
device = axis.AxisDevice(
|
api = axis.AxisDevice(
|
||||||
Configuration(
|
Configuration(
|
||||||
session,
|
session,
|
||||||
config[CONF_HOST],
|
config[CONF_HOST],
|
||||||
@ -41,9 +41,7 @@ async def get_axis_api(
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
async with timeout(30):
|
async with timeout(30):
|
||||||
await device.vapix.initialize()
|
await api.vapix.initialize()
|
||||||
|
|
||||||
return device
|
|
||||||
|
|
||||||
except axis.Unauthorized as err:
|
except axis.Unauthorized as err:
|
||||||
LOGGER.warning(
|
LOGGER.warning(
|
||||||
@ -58,3 +56,5 @@ async def get_axis_api(
|
|||||||
except axis.AxisException as err:
|
except axis.AxisException as err:
|
||||||
LOGGER.exception("Unknown Axis communication error occurred")
|
LOGGER.exception("Unknown Axis communication error occurred")
|
||||||
raise AuthenticationRequired from err
|
raise AuthenticationRequired from err
|
||||||
|
|
||||||
|
return api
|
||||||
|
Loading…
x
Reference in New Issue
Block a user