Remove Axis option to enable/disable camera (#36420)
This commit is contained in:
1 parent
a6107198b9
commit
99318b7b11
6 files changed
+3
-15
No files matched your search
@@ -2,7 +2,6 @@
|
||||
|
||||
from homeassistant.components import camera
|
||||
from homeassistant.components.axis.const import (
|
||||
CONF_CAMERA,
|
||||
CONF_STREAM_PROFILE,
|
||||
DOMAIN as AXIS_DOMAIN,
|
||||
)
|
||||
@@ -70,7 +69,7 @@ async def test_camera_with_stream_profile(hass):
|
||||
|
||||
async def test_camera_disabled(hass):
|
||||
"""Test that Axis camera platform is loaded properly but does not create camera entity."""
|
||||
with patch.dict(ENTRY_OPTIONS, {CONF_CAMERA: False}):
|
||||
with patch("axis.vapix.Params.image_format", new=None):
|
||||
await setup_axis_integration(hass)
|
||||
|
||||
assert len(hass.states.async_entity_ids(CAMERA_DOMAIN)) == 0
|
||||
@@ -2,7 +2,6 @@
|
||||
from homeassistant import data_entry_flow
|
||||
from homeassistant.components.axis import config_flow
|
||||
from homeassistant.components.axis.const import (
|
||||
CONF_CAMERA,
|
||||
CONF_EVENTS,
|
||||
CONF_MODEL,
|
||||
CONF_STREAM_PROFILE,
|
||||
@@ -352,7 +351,6 @@ async def test_option_flow(hass):
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["data"] == {
|
||||
CONF_CAMERA: True,
|
||||
CONF_EVENTS: True,
|
||||
CONF_STREAM_PROFILE: "profile_1",
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import pytest
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import axis
|
||||
from homeassistant.components.axis.const import (
|
||||
CONF_CAMERA,
|
||||
CONF_EVENTS,
|
||||
CONF_MODEL,
|
||||
DOMAIN as AXIS_DOMAIN,
|
||||
@@ -48,7 +47,7 @@ MAC = "00408C12345"
|
||||
MODEL = "model"
|
||||
NAME = "name"
|
||||
|
||||
ENTRY_OPTIONS = {CONF_CAMERA: True, CONF_EVENTS: True}
|
||||
ENTRY_OPTIONS = {CONF_EVENTS: True}
|
||||
|
||||
ENTRY_CONFIG = {
|
||||
CONF_HOST: "1.2.3.4",
|
||||
|
||||
Reference in new issue
Block a user