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
71.65k stars 29.94k forks source link

"Home Assistant Repairs" detecting notify in Automation's as an "Error" #115566

Closed Coolie1101 closed 3 weeks ago

Coolie1101 commented 5 months ago

The problem

I keep getting the following repair error for multiple automations after automations are reloaded, please note, I have been using this notifier for a long time with no issues, it is currently working and sending notifications.

Uptime Kuma Notification uses an unknown service
The automation "Uptime Kuma Notification" (automation.uptime_kuma_notification) has an action that calls an unknown service: notify.telegram.

This error prevents the automation from running correctly. Maybe this service is no longer available, or perhaps a typo caused it.

To fix this error, [edit the automation](http://hassos:8123/config/automation/edit/1651758116418) and remove the action that calls this service.

Click on SUBMIT below to confirm you have fixed this automation.

What version of Home Assistant Core has the issue?

2024.4.1

What was the last working version of Home Assistant Core?

2024.3.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Assistant Repair

Link to integration documentation on our website

https://www.home-assistant.io/integrations/repairs/

Diagnostics information

No response

Example YAML snippet

telegram_bot:
  - platform: polling
    api_key: !secret telegram_api_key
    allowed_chat_ids:
      - !secret telegram_chat_id_me
    parse_mode: html

notify:
  - platform: telegram
    chat_id: !secret telegram_chat_id_me
    name: Telegram

action:
  - service: notify.telegram
    data:
      message: >-
        {{ trigger.to_state.attributes.friendly_name }} is now {{ 'Online' if
        trigger.to_state.state == 'up' }} {{ 'Offline' if trigger.to_state.state
        == 'down' }} {{ 'Paused' if trigger.to_state.state == 'pause' }} {{
        'Unknown' if trigger.to_state.state == 'unknown' }}

Anything in the logs that might be useful for us?

No entries in log pertaining to this error.

Additional information

Most recent notificatio:

USI GATEWAY is now Online

home-assistant[bot] commented 5 months ago

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

Code owner commands Code owners of `repairs` 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 repairs` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


repairs documentation repairs source (message by IssueLinks)

erkr commented 5 months ago

Just a dumb question wrt the YAML snippet; is that all defined in an automation? The first two sections should be defined outside the automations in the configuration.yaml:


telegram_bot:
  - platform: polling
    api_key: !secret telegram_api_key
    allowed_chat_ids:
      - !secret telegram_chat_id_me
    parse_mode: html

notify:
  - platform: telegram
    chat_id: !secret telegram_chat_id_me
    name: Telegram
Coolie1101 commented 5 months ago

No, they are not all defined in the automation, the Telegram Integration and the Notify component is defined in configuration.yaml

FYI, the automations work as expected, and has been for years.

erkr commented 5 months ago

Thanks for clarifying. I hope someone can confirm your issue. I defined a number of notifiers myself (platforms: groups, rest, file and pushsafer), and use them in my automations.

None of them are causing repair errors. You could temporary try to use another platform then telegram in the notify. Maybe it is telegram related.

Coolie1101 commented 5 months ago

Maybe it is telegram related.

Maybe, but there isn't any related entries in the log, and why would it only show up now?

erkr commented 5 months ago

There where several repair improvement over the latest releases. That can cause regression. Just try if it is telegram specific. The more specific you are, the bigger the chance someone looks into it. The is nothing wrong with notification used in automations

Coolie1101 commented 5 months ago

I have multiple notifiers using Telegram, none of which is producing errors, except notify.telegram, I currently don't have any other notify integrations.

notify:
  - platform: telegram
    chat_id: !secret telegram_chat_id_me
    name: Telegram

  - platform: telegram
    chat_id: !secret telegram_chat_id_her
    name: Trini11

  - platform: telegram
    chat_id: !secret telegram_chat_id_niala
    name: Niala

  - platform: telegram
    chat_id: !secret telegram_chat_id_hassbianbot
    name: HassbianBot

  - platform: telegram
    chat_id: !secret telegram_chat_id_group
    name: Group
erkr commented 5 months ago

Maybe something goes wrong in checking repairs using the same name as the platform. But that is then telegram specific, as my pushsafer notifier also has Pushsafer as name without issues

Coolie1101 commented 5 months ago

Should I then report this as an issue under the Telegram Integration?

erkr commented 5 months ago

I think that is a better guess indeed

Coolie1101 commented 5 months ago

Can we move this or I have to create new?

erkr commented 5 months ago

I am just a user like you, but try if you can change the integration and link. Otherwise creating a new one that points to this one will be fine

Coolie1101 commented 5 months ago

Seems like alot more is broken after updating to 2024.4.1, I just noticed a couple template errors in the logs relevant to #114907

erkr commented 5 months ago

Not necessarily broken. Latest HA starts up faster. As a result more templates initially can have uninitialised sensors. I had to make some templates more robust to get rid of template errors during startup myself.

eovnu87435ds commented 4 months ago

I recently filed an issue for the roborock integration and realized that it shares a lot of similarities here.

It seems to me that the common thread here is that HA is reporting via repairs when certain service calls are not available, but the repair UI is instructing users to change their service calls before checking if the service is running.

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