mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 14:46:40 +00:00
Fix api log client crashing when api encryption is dynamic (#9245)
This commit is contained in:
parent
a4cc6166a0
commit
b743577ebe
@ -35,8 +35,8 @@ 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 := conf.get(CONF_ENCRYPTION)) and (key := encryption.get(CONF_KEY)):
|
||||||
noise_psk = conf[CONF_ENCRYPTION][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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user