1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00

Fix log api client when no hardcoded encryption key

This commit is contained in:
Jesse Hills
2025-04-28 14:07:29 +12:00
parent 38dae8489e
commit 273343b182

View File

@@ -29,8 +29,9 @@ async def async_run_logs(config: dict[str, Any], address: str) -> None:
port: int = int(conf[CONF_PORT]) port: int = int(conf[CONF_PORT])
password: str = conf[CONF_PASSWORD] password: str = conf[CONF_PASSWORD]
noise_psk: str | None = None noise_psk: str | None = None
if CONF_ENCRYPTION in conf: if encryption_config := conf.get(CONF_ENCRYPTION):
noise_psk = conf[CONF_ENCRYPTION][CONF_KEY] if key := encryption_config.get(CONF_KEY):
noise_psk = key
_LOGGER.info("Starting log output from %s using esphome API", address) _LOGGER.info("Starting log output from %s using esphome API", address)
cli = APIClient( cli = APIClient(
address, address,