diff --git a/homeassistant/components/html5/notify.py b/homeassistant/components/html5/notify.py index 6970ebbedb4..c07cddb7a9c 100644 --- a/homeassistant/components/html5/notify.py +++ b/homeassistant/components/html5/notify.py @@ -242,7 +242,9 @@ class HTML5PushRegistrationView(HomeAssistantView): try: hass = request.app["hass"] - await hass.async_add_job(save_json, self.json_path, self.registrations) + await hass.async_add_executor_job( + save_json, self.json_path, self.registrations + ) return self.json_message("Push notification subscriber registered.") except HomeAssistantError: if previous_registration is not None: @@ -288,7 +290,9 @@ class HTML5PushRegistrationView(HomeAssistantView): try: hass = request.app["hass"] - await hass.async_add_job(save_json, self.json_path, self.registrations) + await hass.async_add_executor_job( + save_json, self.json_path, self.registrations + ) except HomeAssistantError: self.registrations[found] = reg return self.json_message(