This commit is contained in:
Ludeeus 2021-05-04 20:09:00 +00:00
parent 41934320c0
commit 70063031c5

View File

@ -70,7 +70,12 @@ class HaCallServiceButton extends EventsMixin(PolymerElement) {
eventData.success = true;
},
function (err) {
if (err?.error?.message && err.error.message === "Connection lost") {
if (
el.domain === "homeassistant" &&
["restart", "stop"].includes(el.service) &&
err?.error?.message &&
err.error.message === "Connection lost"
) {
// We expect the service call to fail with 'Connection lost' when we restart or stop
el.$.progress.actionSuccess();
eventData.success = true;