luixal / lovelace-media-source-image-card

A Lovelace custom card for showing images stored in Media Source
GNU General Public License v3.0
21 stars 0 forks source link

Request: Add tap_action #1

Closed davidgdlt closed 11 months ago

davidgdlt commented 12 months ago

Thanks for writing this custom card! I got here from this post: https://community.home-assistant.io/t/image-in-media-browser-on-picture-card/292457/14

Not sure how difficult this would be to implement, but it would be great if this card supported tap actions, ie. to be able to call a service with a tap on the image as supported in other cards. Something like:

tap_action: action: call-service service: camera.turn_on data: {} target: entity_id: camera.my_camera

luixal commented 11 months ago

Hi!

Glad you enjoy it!

That was something I planned to include, but being just for my use, I didn't code it.

I will add this, possibly in the same style mushroom cards do. The config would be just as you stated above :)

Cheers :)

davidgdlt commented 11 months ago

Thanks!

luixal commented 11 months ago

Hi @davidgdlt , I've implemented these changes. You can download the last release (0.1.1), already published for HACS.

You can find the info about using call-service in the readme, in the Actions section here.

Let me know if that works for you :)

davidgdlt commented 11 months ago

Just tried it and it works like a charm. Thanks again for taking the time to implement it! Cheers

luixal commented 11 months ago

No needed, thank you for using the card :)