home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.28k stars 30.6k forks source link

automation number in log, not automation name or id #97047

Closed Mariusthvdb closed 6 months ago

Mariusthvdb commented 1 year ago

Checklist

Describe the issue you are experiencing

Scherm­afbeelding 2023-07-22 om 12 04 29

even though the more info shows the correct details

Scherm­afbeelding 2023-07-22 om 12 04 38

Describe the behavior you expected

show the humanely useable automation name or id, and not the backend number for the automation, which brings nothing useful to the enduser in the first place

Steps to reproduce the issue

  1. create automation (and not use alias)
automation:
  - id: vijverpompen_alterneren
    trigger:
  1. give name to automation in ui

  2. wait for warning or error ;-) ...

What version of Home Assistant Core has the issue?

2023.7.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

any

Which operating system are you using to run this browser?

macOS Ventura 13.4.1

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

settings/automations shows the automation with its name alright

Scherm­afbeelding 2023-07-22 om 12 10 59

details:

Scherm­afbeelding 2023-07-22 om 12 11 16
home-assistant[bot] commented 1 year ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (automation) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `automation` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign automation` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


automation documentation automation source (message by IssueLinks)

frenck commented 1 year ago

Moved issue to Core, as this is not a frontend issue

issue-triage-workflows[bot] commented 1 year 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.

Mariusthvdb commented 1 year ago

please keep

joostlek commented 1 year ago

Can you still reproduce this?

I just tried this and get

Logger: homeassistant.components.automation.97047
Source: helpers/script.py:1783
Integration: Automation (documentation, issues)
First occurred: 15:48:43 (2 occurrences)
Last logged: 15:48:47

97047: Already running
Mariusthvdb commented 1 year ago

Can't check now as I am (far) away from home for some time and don't fiddle with HA.... it's what I saw just before I left though yes.

I saw the exact same loggings as in the opening post.

Has anything changed at all in de updates recently?

joostlek commented 1 year ago

Because I just added a new integration that would wait for an hour and ran it twice and this is my log. I named the automation the issue number (otherwise I get lost at some point). So it seems to be working normally. I am curious what your full automation looks like.

issue-triage-workflows[bot] commented 12 months 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.

Mariusthvdb commented 12 months ago

need to revisit this

Mariusthvdb commented 12 months ago

just made a testing error in an automation and can confirm the issue seems to have been resolved:

Automation with ID 'vijverpompen_notification' failed to setup triggers and has been disabled: extra keys not allowed @ data['entity_i']. Got None required key not provided @ data['entity_id']. Got None

its not the exact same error as in the opening post, but at least the id now shows correctly, suppose that would be the case in all logs. closing for now ! thanks

Mariusthvdb commented 11 months ago

have to re-open:

Scherm­afbeelding 2023-11-17 om 16 12 24 Scherm­afbeelding 2023-11-17 om 16 14 22

yaml:

automation:

  - id: iungo_update_binary_firmware_up_to_date
    trigger:
      platform: state
      entity_id: binary_sensor.iungo_update_available
    action:
      service: homeassistant.update_entity
      data: {}
      target:
        entity_id: binary_sensor.iungo_firmware_up_to_date

which is named in the UI to have this friendly_name:

Scherm­afbeelding 2023-11-17 om 16 16 36 Scherm­afbeelding 2023-11-17 om 16 17 36

it must have triggered a few times because I reloaded the template integration, so these binaries went from unavailable to on. I will add a condition for that, but that isnt really relevant for now, th fact it doesnt show its name and is numbered is what this issue is about

issue-triage-workflows[bot] commented 11 months 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.

Mariusthvdb commented 11 months ago

Keep

issue-triage-workflows[bot] commented 10 months 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.

Mariusthvdb commented 10 months ago

Dear bot please keep

issue-triage-workflows[bot] commented 10 months 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.

Mariusthvdb commented 10 months ago

Keep,

issue-triage-workflows[bot] commented 9 months 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.

Mariusthvdb commented 9 months ago

indeed there was no activity recently.... thats why this remains in issue, so keep please

joostlek commented 9 months ago

Well we had our conversation on Discord and we found out that this error is raised because you didn't name your automations via the automation way, but are renaming the resulting entity in the entity registry. The automations itself arent using the entity registry to work, so it's a hassle to fetch the entity name for an automation that does not have a name.

Mariusthvdb commented 9 months ago

Maybe. It’s still odd that naming the automations in the yaml ( by means of the alias) resolves this.

one would expect those aliases to be the yaml equivalent of the ui name.

issue-triage-workflows[bot] commented 9 months 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.

joostlek commented 9 months ago

Maybe. It’s still odd that naming the automations in the yaml ( by means of the alias) resolves this.

money would expect those aliases to be the yaml equivalent of the ui name.

Yes but the UI name is the name of the automation in the automation editor.

Mariusthvdb commented 9 months ago

money = one ....

Yes but the UI name is the name of the automation in the automation editor.

let me try once more to explain what I see. I just created this new automation in yaml:

  - id: automation_naming_test
    alias: Automation naming test
    trigger:
      platform: state
      entity_id: input_boolean.naming_test
    action:
      - not:
          condition: state
          entity_id: input_boolean.test_2
          state: 'on'
      - service: input_boolean.turn_on
        target:
          entity_id: input_boolean.test_2

the trigger entity_id does not exist yet in my system. Upon reloading Automations, I get this:

Scherm­afbeelding 2024-01-29 om 13 33 13

aware that is a Spook repair, but it is affirmative of the issue, because HA treats automations the same way:

only removing that alias from the yaml and reloading results in:

Scherm­afbeelding 2024-01-29 om 13 35 47

and the system is aware of the automation entity_id (which is thus also could have mentioned in the report out of the warning itself):

Scherm­afbeelding 2024-01-29 om 13 35 54

so, all of this happens without ever being inside the automation editor at all.

restating the Alias fixes the warning message per direct.

issue-triage-workflows[bot] commented 6 months 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.