Lovelace: Add deep press (3D touch) to existing cards

Is it possible that this could work with the Markdown Card? I would like a deep press on my markdown card to have my system run a tts script. I attempted but was unsuccessful.
Thanks for the efforts, this works great on the button card.

Should definitely be possible. Iā€™ll look into it.

1 Like

Actually it is already possible, all you need to do is add hold_action to the markdown card, see below

  - type: markdown
    deep_press: true
    hold_action:
      haptic: heavy
      action: call-service
      service: light.toggle
      service_data:
        entity_id: light.kitchen_light
    content: >
      ## Test markdown with deep-press

Unfortunately, this does not appear to work on my device. The device is old with a modded Android 6 install could this be the problem or some other system settings/compatibility?

Oh, this mod is specifically for use with Apple products.
If you have a device which is unsupported, a polyfill will kick in and replace the force touch sensitivity with a timer instead. To get the polyfill to work, you need to add this at the root of your lovelace config

deep_press:
  enable_unsupported: true

however, there is an issue in the underlying library with old android devices which i sadly cant do anything about. Whats happening when you press the markdown card?

Sadly, I am getting no response from a press on my markdown card with / without the enable_unsupported.

      - type: markdown
        deep_press:
            enable_unsupported: true
        hold_action:
          haptic: heavy
          action: call-service
          service: switch.toggle
          service_data:
            entity_id: switch.porch_light
        content: >
          ## Test markdown with deep-press

Donā€™t put the deep press / enable supported in the card, it needs to be at the root of your lovelace config.

Deep Press 2.0.0 released!
I just published a new version of Deep Press.
This release features a huge refactor and is focused on improving performance and stability.
A new feature is also introduced which will shrink the pressed card based on how hard you press.
It is on by default, but can be disabled by adding

deep_press:
  animations: false

to the root of your config.

Enjoy and let me know if any issues arise!

What if you donā€™t have a root of your lovelace config? I donā€™t think I have one. I switched from the default to custom config but have done all my card customizations thru the GUI so donā€™t know that I have a lovelace config file.

If you use storage mode put it in the top of your config in the RAW editor. If you use YAML mode you MUST have a file called ā€˜ui-lovelace.yamlā€™ and you can simply put it there (both methods are actually the same just another file).

1 Like

NEW RELEASE 2.1.0
Long time no see!
This release aims to make the loading more robust.
I recently noticed that more often than not deep_press would not load at all and required a refresh. This aims to fix these issues.

Please let me know of any other problems.

1 Like

YES! Excited about this update! This addon is a must have. Deep press works extremely nice on iPhones (and iPads!) without 3D Touch hardware (with the software solution since iOS13). I really hope that HA changes the default ā€˜tap_holdā€™ command and animation to your style. Then all devices (including Android) can use that way of hold_action.

Glad you like it! Thanks for the kind words.
I too feel like the core hold action is not ideal, thats was my motivation to create this.

Are you having any issues or are there any features you think are missing?
Since this thread has quite low traction IĀ“m not sure if people are actually using it or if its even working well for them.

1 Like

I was having the issues you described. Had to refresh the app so it would work again. But with the new update havenā€™t encoutered it as of yet :slight_smile: I will make sure to let you know if it somehow still occurs.

@roflcoopter Hi, I notice an issue when using latest custom button-card together with deep press, when having double_tap action. This only happens when having deep_press enabled. But it also only occurs since latest 3 updates of button-card. Before that no issues. So the question is: what causes the issue, button-card or deep press (or maybe both).

I have created a ticket over at button-card Github. Care to chime in? > https://github.com/custom-cards/button-card/issues/399

Thanks for your time!

Hopefully resolved in 2.1.1-1

Hi,

Is it normal that the UI Editor is no longer available after the installation of the plug-in and its implementation?

I get the following error message but everything works properly:

UI editor is not supported for this config: 
Key "deep_press" is not supported by the UI editor.
You can still edit your config in YAML.

Hmm i dont use the UI editor myself so i dont know what would cause this.
There is a compatibility issue with custom button card in the current version tho, so i would not recommend using deep press until that is fixed, if you are using custom button card aswell