frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Automation tracer for choose shows different number in step details and trace timeline

Open scop opened this issue 2 years ago • 10 comments

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Rather minor UI thing, but the automation tracer shows different number of the chosen option in step details vs trace timeline. Step details appears to use 0 for the first one, trace timeline uses 1.

Screenshot from 2021-12-13 14-35-02 Screenshot from 2021-12-13 14-35-20

Describe the behavior you expected

In this particular case, either 0 for both, or 1 for both. But more generally, the same number for both.

Steps to reproduce the issue

Look at the trace for an automation containing a "choose" action.

What version of Home Assistant Core has the issue?

core-2021.12.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

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

scop avatar Dec 13 '21 13:12 scop

Please download and attach the trace here too

emontnemery avatar Dec 13 '21 13:12 emontnemery

I've a trace from one of my own automations. Screenshots: image image

trace automation.spdif_switch_lego_room 2021-12-20T14_52_13.354265+00_00.json.zip

emontnemery avatar Dec 20 '21 15:12 emontnemery

Yep, that's the issue: "Result: choice: 1" vs "Choose: Option 2 executed"

scop avatar Dec 20 '21 20:12 scop

That one is a bit tricky. We had adjusted the user-friendly timeline view to match the automation editor UI and showing 1..n (https://github.com/home-assistant/frontend/pull/10059).

But the technical returned data from the run itself is using the technical values 0..n for debugging, to not interfere with the real technical trace data.

=> I understand the raised point here, but I am not sure if going back to showing 0/0 or 1/1 is really better.

spacegaier avatar Dec 21 '21 09:12 spacegaier

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.

github-actions[bot] avatar Mar 21 '22 10:03 github-actions[bot]

I don't think this is stale.

scop avatar Mar 21 '22 14:03 scop

Do you have a suggestion for how to fix this @scop, @spacegaier? The problem is that we try to be user friendly in the graph but the "step details" just shows the trace data as pointed out by @spacegaier, and I agree it's a bit confusing.

emontnemery avatar Mar 21 '22 16:03 emontnemery

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.

github-actions[bot] avatar Jun 19 '22 17:06 github-actions[bot]

I haven't really used this view in a long time, but IIRC the problem I had with it was, that I would have liked to go and modify one of the "choose" alternatives for an automation.

But the UI does not have a way to jump directly to a specific step or choose option or the like, there's just the "Edit automation" button with the pen icon which takes one to the top of the entire automation editor, and one needs to locate the desired step manually. At that point, after managing to locate the correct set of choices, one needs to also remember or figure out which one of them the interesting one was, and the ambiguity in numbering of the choices in the previous view depending on where one started from makes the task even harder.

Even though I understand the attempt at user friendliness here, in this particular scenario the differences between views actually makes things less user friendly. Apart from what I've already suggested here (which I understand isn't perfect by any means and is controversial):

  • Having a possibility to somehow jump to the desired step in the automation editor from the debugger would solve the underlying problem I had.
  • Only remotedly related, but I think the order of tabs in the debugger would be better if it was Trace timeline | Related logbook entries | Step details | Automation config rather than having Step details there first -- i.e. show the user friendlier views first starting from the left, proceeding to more technical detail towards right.

scop avatar Jun 22 '22 06:06 scop

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.

github-actions[bot] avatar Sep 20 '22 07:09 github-actions[bot]