Only do haptic on entity interactions

This commit is contained in:
Bram Kragten 2019-10-29 12:37:25 +01:00
parent 31a047ce9e
commit c3896a4613

View File

@ -72,6 +72,7 @@ export const handleClick = (
case "toggle": case "toggle":
if (config.entity) { if (config.entity) {
toggleEntity(hass, config.entity!); toggleEntity(hass, config.entity!);
forwardHaptic("light");
} }
break; break;
case "call-service": { case "call-service": {
@ -81,7 +82,7 @@ export const handleClick = (
} }
const [domain, service] = actionConfig.service.split(".", 2); const [domain, service] = actionConfig.service.split(".", 2);
hass.callService(domain, service, actionConfig.service_data); hass.callService(domain, service, actionConfig.service_data);
}
}
forwardHaptic("light"); forwardHaptic("light");
}
}
}; };