core icon indicating copy to clipboard operation
core copied to clipboard

Supported features in blueprint imports are transformed to invalid values

Open ludeeus opened this issue 2 years ago • 12 comments

The problem

I have a blueprint with this input:

  input:
    update_entity:
      name: Update entities
      description: The update entities that should be controlled
      selector:
        entity:
          filter:
            domain: update
            supported_features: [update.UpdateEntityFeature.SPECIFIC_VERSION]

And this is working the way I expect it to work, I'm only able to select entities matching that filter. But if someone is importing this blueprint from URL, the supported_features part is transformed into an invalid value.

This is the resulting input after using the import feature:

  input:
    update_entity:
      name: Update entities
      description: The update entities that should be controlled
      selector:
        entity:
          filter:
          - domain:
            - update
            supported_features:
            - 2
          multiple: true

The UI allows this and the selector is rendered with the expected filter, but when you save an automation that uses this you will get an error like this:

There is an error in this Blueprint: Invalid blueprint: expected str @ data['blueprint']['input']['update_entity']['selector']['filter'][0]['supported_features'][0][0]. Got None

What version of Home Assistant Core has the issue?

core-2023.10.5

What was the last working version of Home Assistant Core?

Unknown if this has ever worked

What type of installation are you running?

Home Assistant OS

Integration causing the issue

blueprint

Link to integration documentation on our website

https://www.home-assistant.io/docs/automation/using_blueprints/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

ludeeus avatar Nov 05 '23 12:11 ludeeus

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.

(message by CodeOwnersMention)


blueprint documentation blueprint source (message by IssueLinks)

home-assistant[bot] avatar Nov 05 '23 12:11 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.

Still a problem in current dev

ludeeus avatar Feb 03 '24 14:02 ludeeus

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.

Tested again now on dev (4fce99edb58e999dc57748b629e159f46d6dd95c) still a problem.

ludeeus avatar May 06 '24 03:05 ludeeus

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.

I give up, just close it.

ludeeus avatar Aug 04 '24 07:08 ludeeus

The problem

I have a blueprint with this input:

  input:
    update_entity:
      name: Update entities
      description: The update entities that should be controlled
      selector:
        entity:
          filter:
            domain: update
            supported_features: [update.UpdateEntityFeature.Feature Homepage 



This is the resulting input after using the import feature:

```yaml
  input:
    update_entity:
      name: Update entities
      description: The update entities that should be controlled
      selector:
        entity:
          filter:
          - domain:
            - update
            supported_features:
            - 2

``

What version of Home Assistant Core has the issue?

core-2023.10.5

What was the last working version of Home Assistant Core?

Unknown if this has ever worked I have never set up homeassistant. io Van Clad Hill Arnold Mo 63010

Link to integration documentation on our website

https://www.home-assistant.io/docs/automation/using_blueprints/

Diagnostics information

No response

Example YAML snippet

No7 response

Anything in the logs that might be useful for us?

No response

Additional information

https://github.com/home-assistant/core/issues/103431#issue-1977761452

paperh8rrr avatar Oct 05 '24 20:10 paperh8rrr

blueprint for x:Westley House 8834 Van Clad Hill Arnold Mo 63010 [email protected]

paperh8rrr avatar Oct 05 '24 20:10 paperh8rrr

x:Westley House

paperh8rrr avatar Oct 05 '24 20:10 paperh8rrr

[Package: org-super-agenda Fetcher: github Source: https://github.com/alphapapa/org-super-agenda

Updating /mnt/store/melpa/working/org-super-agenda/ Checking out d0954b8e7780a4efe49ab32fc11941db21c22bfd Copying files (->) and directories (=>) from /mnt/store/melpa/working/org-super-agenda/ to /tmp/org-super-agendarT5JtR/org-super-agenda-20240916.1753 org-super-agenda.el -> org-super-agenda.el org-super-agenda.info -> org-super-agenda.info Created org-super-agenda-20240916.1753.tar containing: org-super-agenda-20240916.1753/ org-super-agenda-20240916.1753/dir org-super-agenda-20240916.1753/org-super-agenda-pkg.el org-super-agenda-20240916.1753/org-super-agenda.el org-super-agenda-20240916.1753/org-super-agenda.info ✓ Success: 2024-10-05T01:39:13+0000 org-super-agenda-20240916.1753.entry 2024-10-05T01:39:13+0000](url)

paperh8rrr avatar Oct 05 '24 20:10 paperh8rrr

[ I give up, just close it.](x:Westley House)

paperh8rrr avatar Oct 05 '24 20:10 paperh8rrr