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

Templates in Service Action #154

Open
earion68 opened this issue Sep 1, 2022 · 2 comments
Open

Templates in Service Action #154

earion68 opened this issue Sep 1, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@earion68
Copy link
Contributor

earion68 commented Sep 1, 2022

Describe the bug
Not able to handle templates in Service Action

To Reproduce
Edit an existing action with service data template.

Example:

  action:
  - service: media_player.volume_set
    data_template:
      entity_id: media_player.denon_avr_x2500h
      volume_level: '{{ ((states(''input_number.volume_video'')|int)+80)/100 }}'

Expected behavior
Edit the action normally

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 104

Additional context

  • Home Assistant Version: docker-2022.8.6
  • Shortumation Version: 0.7.0
  • Homeassistant server type: debian/docker

Shortumation Logs

TypeError: Cannot read properties of undefined (reading 'volume_level')
@earion68 earion68 added bug Something isn't working triage labels Sep 1, 2022
@asosnovsky asosnovsky added this to the Version 1 milestone Sep 1, 2022
@asosnovsky asosnovsky moved this to Triage in Shortumations Roadmap Sep 1, 2022
@asosnovsky asosnovsky moved this from Triage to In Progress in Shortumations Roadmap Sep 1, 2022
@asosnovsky
Copy link
Owner

can you actually provide a bit more logs?
I just tried to reproduce this, but the UI loads this (you can only see it in yaml mode, need proper editor support)

and there is no error in my logs
image

@earion68
Copy link
Contributor Author

earion68 commented Sep 7, 2022

Here is the full stack. Hope this will help.
Let me know if you need the full automation yaml. The issue only happens when I try to edit the specific node with the yaml previously provided.

Issue persists in 0.7.4

Error Stack

{}

at JH (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1412021)
at Component (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1414421)
at div
at div
at div
at uW (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1446485)
at div
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:10783
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:663702
at div
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:10783
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:662276
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:10783
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:663072
at div
at Ed (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:650590)
at div
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:10783
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:574827
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:653233
at http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:659601
at cf (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:664482)
at fW (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1450960)
at Provider (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1164674)
at Lj (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1260078)
at dW
at hW (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1451772)
at div
at div
at jW (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1462557)
at div
at div
at Sq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1491711)
at n (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1493350)
at Eq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1495055)
at Aq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1499380)
at div
at main
at Fq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1502536)
at s (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:496711)
at MF (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1271505)
at Iq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1500791)
at Pq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1500522)
at Zq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1500906)
at Lq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1503440)
at zq (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1504134)
at I (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:440694)
at P (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:439963)
at R (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:441627)
at n (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1500183)
at n (http://lyra:9004/web/static/js/main.bd6bb4ee.js:2:1493350)
at div
at Uq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants