Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable haptic feedback (vibration) on andriod device #93

Closed
Eivind-V opened this issue Feb 10, 2022 · 17 comments · Fixed by #540
Closed

Disable haptic feedback (vibration) on andriod device #93

Eivind-V opened this issue Feb 10, 2022 · 17 comments · Fixed by #540
Labels
bug Something isn't working

Comments

@Eivind-V
Copy link

When using chips and light card on Andriod device I get a haptic feedback.

Have disabled it under profile settings
image

image

@piitaya
Copy link
Owner

piitaya commented Feb 10, 2022

I tested :

  • Vibrate option "on" : vibrate when I toggle a switch or a lamp
  • Vibrate option "off" : does not vibrate when I toggle a switch or a lamp

It's the native thing from home assistant toggle service, not a Mushroom feature.

@bernikr
Copy link

bernikr commented Apr 4, 2022

I have the same problem, that even with vibration turned "off" in the options the cards will vibrate on toggle.

@bernikr
Copy link

bernikr commented Apr 4, 2022

It's the native thing from home assistant toggle service, not a Mushroom feature.

Its not native to the home assistants toggle service, but to the custom-card-helper handleAction method.

I've raised an issue there: custom-cards/custom-card-helpers#61

I hope this can be resolved. I would really like to use the mushroom cards, but having my phone vibrate for 0.5 seconds every time I toggle something is not really the best experience.

@piitaya
Copy link
Owner

piitaya commented Apr 5, 2022

Can you provide some details about your phone/android version/HA Android version ? I have no issue with my OnePlus 8. So I unable to reproduce ce bug.

@bernikr
Copy link

bernikr commented Apr 5, 2022

Sure:
Phone: Huawei Mate 20 (HMA-L29)
Android Version: 10
HA Version: 2022.3.8
App Version: 2022.3.0-full

I also noticed that the vibration changes depending if they are turned on or turned off/phone is in "do not disturb" mode. When the vibrations are turned off it changes from two short pulses to a single 500ms pulse, which is way more annoying.

I suspect that there is a bug in the android app itself, since I found code there that is responsible for a 500ms vibration. I've also raised an issue there: home-assistant/android#2430

@piitaya
Copy link
Owner

piitaya commented Apr 5, 2022

I looked into the custom-card-helpers and the home-assistant-frontend code. Custom card helpers use success haptics while HA native cards use light ones.

@bernikr
Copy link

bernikr commented Apr 5, 2022

I saw that and wrote that into the issue i opened there. However, I think it is mostly a problem with the android app under certain conditions, as disabling vibrations works well in the mobile browser. Lets hope it gets fixed there soon.

@bernikr
Copy link

bernikr commented Apr 5, 2022

You could btw use handleClick instead of handleAction of the custom-card-helpers. It has a slightly different function signature (two booleans instead of one string for the action), but allows the user to define a haptics setting, instead of always emitting a success event on toggle or service call.

@piitaya
Copy link
Owner

piitaya commented Apr 5, 2022

custom-card-helpers is no longer maintained. I will import the handle-action into mushroom to keep it updated with home assistant action.

@bernikr
Copy link

bernikr commented Apr 5, 2022

After a bit more code reading and long discussion (home-assistant/android#2430), i think the problem is that the custom-card-helpers emit their haptics directly on the window, while all native HA cards emit it on their respective DOM element. I still don't understand the chain of bugs and undocumented things that lead to this strange behavior in the end, but this seems to be the only difference on how native HA cards and custom-card-helpers implement the haptics.

@gmac0612
Copy link

I have tried this today and encountered similar behaviour. Haptic setting in companion app is not respected & all taps provide a long 'success' vibration.

HA and companion app both latest stable as of time of writing, handset is a Samsung Galaxy S8+

I'd be very happy to see this fixed as the cards are perfect apart from this issue.

@dafer94
Copy link

dafer94 commented May 1, 2022

I am suffering the same behaviour described by Bernikr a few comments above, also with the same Huawei device: The haptics for custom cards does not turn off when the app toggle is disabled, they just change from two shorts pulses to a long one.

I have also tested it with an older device (OnePlus 3). The exact same dashboard with the same app settings and it works just fine.

Have somebody found a workaround for this? Maybe a dashboard setting that makes it quiet and prevent its inner cards from generating haptic feedback.

@nelsonamen
Copy link

Same problem, ONLY in mushrooms, vibrations always on

@filikun
Copy link

filikun commented May 21, 2022

This seems to be the same on iPhone. Code below does not work either.

        tap_action:
          action: call-service
          service: input_select.select_option
          haptic: none
          service_data:
            entity_id: input_select.chart_time_span
            option: day

@piitaya
Copy link
Owner

piitaya commented Jun 4, 2022

It should be fixed in the 1.9.0 beta version. Can you confirm it works now ?
@gmac0612 @Eivind-V @bernikr @dafer94 @nelsonamen

@nelsonamen
Copy link

It works!! 👍

@bernikr
Copy link

bernikr commented Jun 4, 2022

It's fixed now. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants