home-assistant / home-assistant/android

Haptics feedback goes wrong after first interaction

Open
#6,216 0 comments 0 reactions 0 assignees View on GitHub
bug webview
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Home Assistant Android app version(s):** 2025.11.4-full

**Android version(s):** 16

**Device model(s):** Google pixel 9 pro

**Home Assistant version:** 2025.12.5

**Description of problem:**

I've been trying to add haptics response to sliders in home assistant such as in pixel OS

Minimal reproducible code:
```javascript
(function () {
console.log("TEST");

const triggerHaptic = async (percentage) => {
window.dispatchEvent(new CustomEvent("haptic", { detail: "light" }));
};

// vibrate
const handlePointerMove = (e) => {
console.log('vibrate');
triggerHaptic(100);
};

// subscribe to drag
document.addEventListener("pointermove", (e) => {
handlePointerMove(e);
});
})();
```

Add this code to `/config/www/test.js`
Add this to panel -> resources: `/local/test.js`

What happens is:
On first drag everything works fine - you receive light clicks as you drag finger (that's all)
On any next drag - you receive light clicks as you drag finger, **BUT** when you stop or release - you get _hard_ click somewhy
Also, this hard click is not from any other systems, bc it's not there when script is off

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.