Merge pull request #4152 from home-assistant/haptics

Only do haptic on entity interactions
This commit is contained in:
Bram Kragten 2019-10-29 12:53:44 +01:00 committed by GitHub
commit c6fb896fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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