Skip to content

Commit fc573a0

Browse files
authored
Fix Z-Wave connection string for encrypted ESPHome proxies (home-assistant#168370)
1 parent 7b8978c commit fc573a0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

homeassistant/helpers/service_info/esphome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ def socket_path(self) -> str:
2222
"""Return the socket path to connect to the ESPHome device."""
2323
url = URL.build(scheme="esphome", host=self.ip_address, port=self.port)
2424
if self.noise_psk:
25-
url = url.with_user(self.noise_psk)
25+
url = url.with_query({"key": self.noise_psk})
2626
return str(url)

tests/helpers/test_service_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ def test_esphome_socket_path() -> None:
3434
)
3535
assert info.socket_path == "esphome://192.168.1.100:6053"
3636
info.noise_psk = "my-noise-psk"
37-
assert info.socket_path == "esphome://my-noise-psk@192.168.1.100:6053"
37+
assert info.socket_path == "esphome://192.168.1.100:6053/?key=my-noise-psk"

0 commit comments

Comments
 (0)