mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Rename device to api in Axis integration (#113965)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user