Entity Button Card onhold released

Silly requirement, does anyone know of a component like the Entity Button card that also implements a OnReleased of sort next to the OnHold ?
I’m trying to help someone out with automating their covers so that they roll up or down when they hold the up or down but stop the action when the button is released.

Cheers

well I fabricobbled something together myself;

<html>
<script>
    function touchstart(e) {
        e.preventDefault();
        toggle(e.target.value, true);
    }

    function touchend(e) {
        toggle(e.target.value, false);
    }

    document.addEventListener("DOMContentLoaded", function (event) {
        document.getElementById('btnUp').addEventListener("touchstart", touchstart, false);
        document.getElementById('btnDown').addEventListener("touchstart", touchstart, false);
        document.getElementById('btnUp').addEventListener("touchend", touchend, false);
        document.getElementById('btnDown').addEventListener("touchend", touchend, false);
    });

    function toggle(entity, state) {
        // call upon hass object ..
        console.log(`Setting state to ${state} for ${entity}`);
    }

</script>

<button type="submit" id="btnUp" value="switch.up">
    UP
</button>
<button type="submit" id="btnDown" value="switch.down">
    DOWN
</button>

</html>

Works on touch enabled displays, and that’s all I need. Now I’ll just pour it into a custom lovelace card.

Did you ever make this into a custom card?

I would love to use this card. Does it exists?

Check this discussion: Button released events?