home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.69k forks source link

Testing template in the UI does not provide any error or result #20780

Open erjoalgo opened 4 months ago

erjoalgo commented 4 months ago

Checklist

Describe the issue you are experiencing

I'm new to using templates and I was trying to add a condition to limit an automation to run at most once daily.

Testing various other triggers in the UI appears to work with a popup green or yellow box indicating whether the automation succeeded or failed.

But nothing happens when clicking "Test" to testing the template:

I assume I'm doing something wrong but I expect at least an error message. I don't see anything in the console.

11-May-2024-15:31:02

I've included a screen recording of the issue.

Version info:

Home Assistant

Core 2024.5.2
Supervisor 2024.05.1
Frontend 20240501.1

Describe the behavior you expected

Expect to see a popup when clicking on the Test button for a trigger while debugging.

Steps to reproduce the issue

  1. Try to create an automation and enter a template trigger with the value {{ true }}
  2. Click Test on the drop-down menu for that trigger
  3. Nothing happens. Expect to see a popup with an error or success message ...

What version of Home Assistant Core has the issue?

2024.5.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

124.0.6367.118 (Official Build) built on Debian 12.5, running on Debian 12.5 (64-bit)

Which operating system are you using to run this browser?

Debian

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

karwosts commented 4 months ago

Hmm working for me. Did you really try in safe mode? It's clear that your screen grab is not from safe mode.

image

rw-django-fan-2020 commented 3 months ago

The yaml editor for template automations or scripts is broken.

When I try: service: media_player.play_media data: media_content_type: folder media_content_id: {{ ["2023", "2024"] | random }} target: entity_id: media_player.mpd_homeassistant

Then it does not work.

When I try: service: media_player.play_media data: media_content_type: folder media_content_id: >- {{ ["2023", "2024"] | random }} target: entity_id: media_player.mpd_homeassistant

Then it works.

Where are many more examples like that.

github-actions[bot] commented 6 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.