mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +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."""
|
||||
session = get_async_client(hass, verify_ssl=False)
|
||||
|
||||
device = axis.AxisDevice(
|
||||
api = axis.AxisDevice(
|
||||
Configuration(
|
||||
session,
|
||||
config[CONF_HOST],
|
||||
@ -41,9 +41,7 @@ async def get_axis_api(
|
||||
|
||||
try:
|
||||
async with timeout(30):
|
||||
await device.vapix.initialize()
|
||||
|
||||
return device
|
||||
await api.vapix.initialize()
|
||||
|
||||
except axis.Unauthorized as err:
|
||||
LOGGER.warning(
|
||||
@ -58,3 +56,5 @@ async def get_axis_api(
|
||||
except axis.AxisException as err:
|
||||
LOGGER.exception("Unknown Axis communication error occurred")
|
||||
raise AuthenticationRequired from err
|
||||
|
||||
return api
|
||||
|
Loading…
x
Reference in New Issue
Block a user