Skip to content

Template entity_id in service_scripts #4

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

Open
balk77 opened this issue Dec 31, 2024 · 0 comments
Open

Template entity_id in service_scripts #4

balk77 opened this issue Dec 31, 2024 · 0 comments

Comments

@balk77
Copy link

balk77 commented Dec 31, 2024

Hi, thanks for this nice custom component. I would like to use a template in the service scripts section. I have

global_template: >
        {% set player = states('input_select.moode_mediaplayers') %}

and it picks up the attributes correctly. But when I try this, it does not work:

service_scripts:
        media_next_track:
            service: media_player.media_next_track
            data_template:
              entity_id: "{{ player }}"

Is it possible to template the player as such?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant