From 0bdbf007b256cc7c5bfddc474d16b825d62652ac Mon Sep 17 00:00:00 2001 From: sfjes Date: Thu, 20 Jun 2019 13:59:17 -0700 Subject: [PATCH] Fix downloader_download_failed event not firing for HTTP response errors (#24640) --- homeassistant/components/downloader/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/downloader/__init__.py b/homeassistant/components/downloader/__init__.py index 5af367ef92d..7e169acc5a3 100644 --- a/homeassistant/components/downloader/__init__.py +++ b/homeassistant/components/downloader/__init__.py @@ -79,6 +79,11 @@ def setup(hass, config): "downloading '%s' failed, status_code=%d", url, req.status_code) + hass.bus.fire( + "{}_{}".format(DOMAIN, DOWNLOAD_FAILED_EVENT), { + 'url': url, + 'filename': filename + }) else: if filename is None and \