Add missing name field to emulated_hue config (#87456)

Co-authored-by: J. Nick Koston <nick@koston.org>
pull/87482/head
Gregory Haynes 2023-02-05 17:34:37 +00:00 committed by GitHub
parent 04e05af44c
commit 936ffafd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -831,6 +831,7 @@ def create_hue_success_response(
def create_config_model(config: Config, request: web.Request) -> dict[str, Any]:
"""Create a config resource."""
return {
"name": "HASS BRIDGE",
"mac": "00:00:00:00:00:00",
"swversion": "01003542",
"apiversion": "1.17.0",

View File

@ -465,8 +465,9 @@ async def test_discover_full_state(hue_client):
# Make sure array is correct size
assert len(result_json) == 2
assert len(config_json) == 6
assert len(config_json) == 7
assert len(lights_json) >= 1
assert "name" in config_json
# Make sure the config wrapper added to the config is there
assert "mac" in config_json
@ -505,7 +506,8 @@ async def test_discover_config(hue_client):
config_json = await result.json()
# Make sure array is correct size
assert len(config_json) == 6
assert len(config_json) == 7
assert "name" in config_json
# Make sure the config wrapper added to the config is there
assert "mac" in config_json