Skip to content

Support local packages in the enhanced YAML parser #5240

@jimtng

Description

@jimtng

Could we also have local packages?

'.my_local_package':
  items:   
    ${name}:
      type: Switch
      label: ${label}
      icon: switch
      format: '%s'
      channel: mqtt:topic:${thing_id}:switch1


packages:
  obj1: !include
    local: .my_local_package  # <-- local instead of file
    vars: {name: "item_name1", label: "label1", thing_id: "thing1" }
  obj2: !include
    local: .my_local_package
    vars: {name: "item_name2", label: "label2", thing_id: "thing2" }

Originally posted by @spacemanspiff2007 in #4818 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions