Homeassistant packages

I have a file name alexa_confirm.yaml in homeassistant packages folder that path is /config/packages/media_player/alexa_confirm.yaml

Which configuration path should I take? That home assistant is capable of reading the file in the packages folder. My setup is incorrect! using the lines below.

text: !include…/packages/alexa_confirm.yaml
text: !include_dir_merge_named/packages
text: !include_dir_merge_named/config/packages/media_player/alexa_confirm.yaml

Error loading /config/configuration.yaml: could not determine a constructor for the tag '!include../packages/alexa_confirm.yaml'
in "/config/configuration.yaml", line 991, column 7

Error loading /config/configuration.yaml: could not determine a constructor for the tag '!include_dir_merge_named/packages'
in "/config/configuration.yaml", line 990, column 7 

Error loading /config/configuration.yaml: could not determine a constructor for the tag '!include_dir_merge_named/config/packages/media_player/alexa_confirm.yaml'
in "/config/configuration.yaml", line 989, column 7

My config file

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages/

python_script:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
frontend:
  themes: !include_dir_merge_named themes
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
tts:
  - platform: google_translate
    language: "no"
    service_name: google_translate_say

automation: !include automations.yaml
input_boolean: !include include/input_boolean.yaml
input_number: !include include/input_number.yaml
input_select: !include include/input_select.yaml
sensor: !include sensors.yaml
script: !include scripts.yaml
multiscrape: !include multiscrape.yaml
mqtt: !include mqtt.yaml
#text: !include../packages/alexa_confirm.yaml
text: !include_dir_merge_named/packages
zone: !include zones.yaml

you’ve already referenced the packages folder here:

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages/

I’ve not come across text: !include... before, but you should only keep package files in the package directory.

1 Like