Display service call error message (#2874)

This commit is contained in:
Jason Hu 2019-03-01 23:09:57 -08:00 committed by Paulus Schoutsen
parent 9383d80354
commit 34c6356a47

View File

@ -71,14 +71,16 @@ export default (superClass) =>
"Error calling service",
domain,
service,
serviceData
serviceData,
err
);
}
const message = this.hass.localize(
"ui.notification_toast.service_call_failed",
"service",
`${domain}/${service}`
);
const message =
this.hass.localize(
"ui.notification_toast.service_call_failed",
"service",
`${domain}/${service}`
) + ` ${err.message}`;
this.fire("hass-notification", { message });
throw err;
}