JavaScript template support in url_path actions #2231
userdema
started this conversation in
Feature requests
Replies: 1 comment
-
|
I would like this as well, as it means we can make one popup work for any number of cards, performing the original navigate action but also dynamically define an entity/state/attribute, for instance. I am in that exact situation right now. Having a list of dynamically created cards, each that I would like to tap to open a popup, but I dont want to create X amount of the same popup to serve them. But since a bubble button action can only do one thing, there is no way to do this, not even through a script. At least none that I have found. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! First of all, love the work you're doing with Bubble Card, it's really the cornerstone of my whole dashboard setup.
I wanted to raise a feature request that I think would be super useful: support for JavaScript templates in
url_path, similar to how button-card handles it with the[[[...]]]syntax.The use case is pretty common — for example, I have a card tracking a family member's location and I'd love to open Google Maps at their current coordinates with a tap/hold action. Right now the only way to do this dynamically is through browser_mod, but many users (myself included) prefer to avoid adding extra integrations just for this.
Button-card solves it elegantly: it checks if
url_pathstarts with[[[, evaluates it as JS withhassin context, and uses the result as the URL. Something like:It's a pretty self-contained change and would open up a lot of possibilities without any external dependencies. What do you think? Would you consider adding it?
Beta Was this translation helpful? Give feedback.
All reactions