1
0
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:
Dinghan Zhu 2025-02-23 16:20:47 -05:00 committed by GitHub
commit 89441aa1c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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",

View File

@ -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)