Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101827

Deleting Leading Spaces in YAML

$
0
0

@Tangston311 wrote:

My configuration.yaml is starting to get outrageously long so I was thinking of splitting the file into multiple pieces using the !include function for my automations, scripts, scenes, etc…

Because I’ve set everything up in configuration.yaml, my spacing is like so:

scene:
  - name: Scene 1
    entities:
      cover.entry_entry_left_shade:
        position: 100
      cover.entry_entry_right_shade:
        position: 100
      cover.library_library_shade:
        position: 100

But I need to change it to:

Configuration.yaml
scene: !include scenes.yaml

Scenes.yaml

- name: Scene 1
  entities:
    cover.entry_entry_left_shade:
      position: 100
    cover.entry_entry_right_shade:
      position: 100
    cover.library_library_shade:
      position: 100

So I have to delete the leading two spaces of every line for every scene to get it to work in the new scenes.yaml (at least that’s my understanding). Does anyone know of an easy way to do that aside from manually deleting it from each line?

Posts: 10

Participants: 9

Read full topic


Viewing all articles
Browse latest Browse all 101827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>