mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 14:18:14 +00:00
Merge f6083354681fdee7e0dc4e436bfeb6c305b48ab2 into bfa3254d6c5ab2f555196a3b4f8e245800d85724
This commit is contained in:
commit
89441aa1c9
@ -919,7 +919,7 @@ def parse_args(argv):
|
||||
"--port",
|
||||
help="The HTTP port to open connections on. Defaults to 6052.",
|
||||
type=int,
|
||||
default=6052,
|
||||
default=os.environ.get("ESPHOME_DASHBOARD_PORT", 6052),
|
||||
)
|
||||
parser_dashboard.add_argument(
|
||||
"--address",
|
||||
|
@ -35,14 +35,14 @@ class DashboardTestHelper:
|
||||
return result
|
||||
|
||||
|
||||
@pytest_asyncio.fixture()
|
||||
async def dashboard() -> DashboardTestHelper:
|
||||
@pytest_asyncio.fixture(name="dashboard")
|
||||
async def fixture_dashboard() -> DashboardTestHelper:
|
||||
sock, port = bind_unused_port()
|
||||
args = Mock(
|
||||
ha_addon=True,
|
||||
configuration=get_fixture_path("conf"),
|
||||
port=port,
|
||||
)
|
||||
os.environ["ESPHOME_DASHBOARD_PORT"] = str(port)
|
||||
DASHBOARD.settings.parse_args(args)
|
||||
app = web_server.make_app()
|
||||
http_server = HTTPServer(app)
|
||||
|
Loading…
x
Reference in New Issue
Block a user