Skip to content
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

Service Template not supported in button actions? #134

Open
mplogas opened this issue May 11, 2023 · 0 comments
Open

Service Template not supported in button actions? #134

mplogas opened this issue May 11, 2023 · 0 comments

Comments

@mplogas
Copy link

mplogas commented May 11, 2023

The problem

Based on your lock example, I wanted to incorporate the lock.open for tedee locks:

Here's what I have tried, in-line with the official documentation . I also tried various permutations and service_template, with no luck,

hold_action:
  action: call-service
  service: >-                                                   
    {% if is_state('lock.haustuer', 'locked') %}
      lock.unlock
    {% else %}
      lock.open
    {% endif %}
  entity_id: lock.haustuer

This raises an error that the <entire template string> is not a supported service. When using service_template instead, I don't get an error message at all. but it'S not working either.

  hold_action:
    action:
      - service_template: >
          {% if is_state('lock.haustuer', 'locked') %}
            lock.unlock
          {% else %}
            lock.open
          {% endif %}
        entity_id:  lock.haustuer

Is templating the service call supported?

What version of Paper Buttons Row has the issue?

2.13

What version of Home Assistant are you running?

2023.5.2

What version of the Frontend are you running?

20230503.3

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

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