mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Use assignment expression for alexa init (#81242)
This commit is contained in:
parent
8bd4125390
commit
f43f0c4bcc
@ -1,4 +1,8 @@
|
||||
"""Support for Alexa skill service end point."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
@ -87,18 +91,14 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
|
||||
config = config[DOMAIN]
|
||||
|
||||
flash_briefings_config = config.get(CONF_FLASH_BRIEFINGS)
|
||||
|
||||
intent.async_setup(hass)
|
||||
|
||||
if flash_briefings_config:
|
||||
if flash_briefings_config := config.get(CONF_FLASH_BRIEFINGS):
|
||||
flash_briefings.async_setup(hass, flash_briefings_config)
|
||||
|
||||
try:
|
||||
smart_home_config = config[CONF_SMART_HOME]
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
# smart_home being absent is not the same as smart_home being None
|
||||
if CONF_SMART_HOME in config:
|
||||
smart_home_config: dict[str, Any] | None = config[CONF_SMART_HOME]
|
||||
smart_home_config = smart_home_config or SMART_HOME_SCHEMA({})
|
||||
await smart_home_http.async_setup(hass, smart_home_config)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user