keesschollaart81 / vscode-home-assistant

Visual Studio Code Extension for Home Assistant. ⭐ if you think this is cool!
MIT License
555 stars 119 forks source link

!include_dir_merge_list issue in configuration.yaml #3154

Open pganansia opened 2 months ago

pganansia commented 2 months ago

Please include the related YAML code:

media_player: !include /config/include/elements/media_player.yaml
mqtt: !include /config/include/elements/mqtt.yaml
sensor: !include /config/include/elements/sensor.yaml
template: !include_dir_merge_list /config/include/elements/templates/

The instruction !include_dir_merge_list triggererd ENOENT error as the directory exists ans is not empty. The path is correct. The !include instructions are working well.

Find my Home Assistant Configuration here: [Link to Home Assistant Configuration]()

Extension runs in:

I'm running VS Code on:

I'm accessing my files:

frenck commented 2 months ago

I'm really unclear on what the error is here?

Could you include a screenshot?

pganansia commented 2 months ago

Hi frenck, Here is a screenshot. Capture d'écran 2024-10-01 112210 I hope that will help to understand my issue. It's like if the instruction !include_dir_merge_list is not functionning. And the error is : "There were no files found in folder '/config/include/elements/templates/' referenced with '!include_dir_merge_list' from 'file:///workspace/Homeassistant/config/configuration.yaml'" The screen of the /config directory from the docker container: Capture d'écran 2024-10-01 115253 The same from the server itself: Capture d'écran 2024-10-01 115151

Thanks for your help.

ERBN19 commented 2 months ago

I also have the same problem/ message. I am here because of the source of my error message. But this came after updating Studio Code Server Update 5.15.0 to 5.16.1.

Unexpected error updating the schemas, message: ENOENT: no such file or directory, realpath '/config/config/ui_lovelace_minimalist/config/script/scripts.yaml' Source: Home Assistant Config Helper

For extra information, the file of the error. copy path: /config/ui_lovelace_minimalist/config/script/scripts.yaml copy relative path: ui_lovelace_minimalist/config/script/scripts.yaml

error tag 1 Error tag 2

andarotajo commented 1 month ago

Noticed the same "ENOENT" error recently. On every save it pops up for the files automations.yaml, scenes.yaml and scripts.yaml. My configuration is on GitHub so I don't have those files committed as they're managed by HA. Not having those files results in the schemas not working correctly.

If I create those 3 files, even if they're empty, it works again. Hope that helps