core icon indicating copy to clipboard operation
core copied to clipboard

Using invalid !input in blueprint does not raise any warning, just ignores blueprint

Open Zocker1999NET opened this issue 2 years ago • 5 comments

The problem

When using !input with a non-existent input for setting a variable in a blueprint (see example in YAML below), Home-Assistant does outright just skip reading the file any further without issuing any warnings.

I even tried to set the log level from WARNING to INFO where no log appeared either.

This makes

  • it hard to detect the issue on the file itself
  • you search the issue in the filename or any other potential reason Home-Assistant is just not seeing the file

Steps to reproduce:

  1. Check your available blueprints (in my case, for automation)
  2. Add the example blueprint from below (with the error)
  3. Re-check the list of blueprints, it should still be missing (no explicit reload required as blueprints are (at least tried to) reloaded on every file change, step 5 confirms this)
  4. Comment out the error line
  5. Re-check the list of blueprints, now the blueprint appears

What version of Home Assistant Core has the issue?

2023.3.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Blueprints

Link to integration documentation on our website

https://www.home-assistant.io/docs/blueprint/

Diagnostics information

No response

Example YAML snippet

# this is the original where I discovered this issue

blueprint:
  name: Home Assistant update notification
  description: Send a notification when theres an update availiable for Home Assistant
  domain: automation
  input:
    current_tracker:
      name: Current Version sensor
      description: The sensor which tracks the current available version
      selector:
        entity:
          integration: version
          domain: sensor
    update_tracker:
      name: Update sensor
      description: The sensor which tracks the newest available version
      selector:
        entity:
          integration: version
          domain: sensor
    notification_title:
      name: Notification title (Optional)
      description: "Text to use as title. May use variables current_version and newest_version."
      default: "Version {{ newest_version }} of Home-Assistant was released"
    notification_message:
      name: Notification message (Optional)
      description: "Text to use as message. May use variables current_version and newest_version."
      default: "You currently run version {{ current_version }}. You may find the release notes here."
    notify_device:
      name: Device to notify
      description: Device needs to run the official Home Assistant app to receive notifications
      selector:
        device:
          integration: mobile_app
    is_ios:
      name: Is it an iOS device?
      description: Toggle if your selected device runs iOS, default is true
      selector:
        boolean:
      default: true

variables:
  current_tracker: !input current_tracker
  update_tracker: !input update_tracker
  current_version: "{{ states[current_tracker].state }}"
  newest_version: "{{ states[update_tracker].state }}"
  release_notes: "https://www.home-assistant.io/blog/categories/release-notes/"
  is_ios: !input is_ios
  notify_device: !input notify_device
# the next line causes the issue, commenting out lets Home-Assistant use the blueprint flawless
  include_release_notes: !input include_release_notes
  notification_title: !input notification_title
  notification_message: !input notification_message

trigger:
  - platform: template
    value_template: "{{ current_version != newest_version }}"
    for:
      minutes: 1

action:
  - device_id: !input notify_device
    domain: mobile_app
    type: notify
    title: "{{ notification_title }}"
    message: "{{ notification_message }}"
    data: >
      {% if include_release_notes %}
        {% set android_data = { "clickAction": "%s" } | format(release_notes) %}
        {% set ios_data = { "url": "%s" } | format(release_notes) %}
        {{ ios_data if is_ios else android_data }}
      {% endif %}

Anything in the logs that might be useful for us?

That's the issue, these are missing

Additional information

No response

Zocker1999NET avatar Mar 22 '23 23:03 Zocker1999NET

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.

Just ran into this myself. It's silently just ignored.

elupus avatar Apr 06 '24 19:04 elupus

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.

Still valid i think

elupus avatar Jul 06 '24 06:07 elupus

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.

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.

Still valid as far as i know

elupus avatar Jan 09 '25 10:01 elupus

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

Code owner commands

Code owners of blueprint 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 blueprint 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)


blueprint documentation blueprint source (message by IssueLinks)

home-assistant[bot] avatar Mar 28 '25 20:03 home-assistant[bot]

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.