Skip to content

Commit f196864

Browse files
committed
Fix setup without domain in HA config
1 parent 44e8b51 commit f196864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/python_script/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def md5(data: str) -> str:
4545

4646

4747
async def async_setup(hass: HomeAssistant, hass_config: ConfigType):
48-
config: dict = hass_config[DOMAIN]
48+
config: dict = hass_config.get(DOMAIN) or {}
4949
if CONF_REQUIREMENTS in config:
5050
hass.async_create_task(
5151
async_process_requirements(hass, DOMAIN, config[CONF_REQUIREMENTS])

0 commit comments

Comments
 (0)