Fix downloader_download_failed event not firing for HTTP response errors (#24640)

This commit is contained in:
sfjes 2019-06-20 13:59:17 -07:00 committed by Paulus Schoutsen
parent f1cbb2a0b3
commit 0bdbf007b2

View File

@ -79,6 +79,11 @@ def setup(hass, config):
"downloading '%s' failed, status_code=%d", "downloading '%s' failed, status_code=%d",
url, url,
req.status_code) req.status_code)
hass.bus.fire(
"{}_{}".format(DOMAIN, DOWNLOAD_FAILED_EVENT), {
'url': url,
'filename': filename
})
else: else:
if filename is None and \ if filename is None and \