Make uses_http a readonly property of device config (#1449)

`uses_http` will no longer be included in `DeviceConfig.to_dict()`
This commit is contained in:
Steven B.
2025-01-14 14:20:53 +00:00
committed by GitHub
parent 57f6c4138a
commit be34dbd387
7 changed files with 25 additions and 20 deletions

View File

@@ -5,6 +5,5 @@
"device_family": "SMART.IPCAMERA",
"encryption_type": "AES",
"https": true
},
"uses_http": false
}
}

View File

@@ -6,6 +6,5 @@
"encryption_type": "KLAP",
"https": false,
"login_version": 2
},
"uses_http": false
}
}

View File

@@ -5,6 +5,5 @@
"device_family": "IOT.SMARTPLUGSWITCH",
"encryption_type": "XOR",
"https": false
},
"uses_http": false
}
}

View File

@@ -154,12 +154,10 @@ async def test_discover_single(discovery_mock, custom_port, mocker):
discovery_mock.encrypt_type,
discovery_mock.login_version,
)
uses_http = discovery_mock.default_port == 80
config = DeviceConfig(
host=host,
port_override=custom_port,
connection_type=ct,
uses_http=uses_http,
credentials=Credentials(),
)
assert x.config == config