Window status open/close/tilt config

You’re welcome! :slight_smile: And thanks for the cudos! :smiley: HA has a steep learning curve at times, but we’re all (well, most users) here to help and enjoy our “hobby” Home Assistant! It’s like an addiction, you can’t escape after a while! :laughing: You’ll see, you’re already hooked up. :joy:

I’ll take a little detour, but that should explain how things work in HA. :slight_smile: In HA, all things are listed in so called domains, eg. light, sensor, binary_sensor and such. Everything starts with its domain. To know about this domain based system is what we need later on.

The configuration of HA is “normally” written in one file, configuration.yaml. If you split up this configuration, it will be later on combined into one large (internal) file, and will be worked with. Right were you set the include (compared to added at the end) in your configuration.yaml, the file will be included and used like it would be all one file from the beginning.

This approach means, you can only include a domain once. So sensor: can only be listed once. If you use it eg. in knx.yaml, you can’t use it anywhere else, neither in the “original” configuration.yaml, nor in any other file you split up.
That’s why people use sensor.yaml and set all their sensors in this file. Same goes for other domains.
And yes, that would mean, you’d have to delete the sensor configuration in knx.yaml and add it to sensor.yaml. As you already noticed, this seems kind of unintuitive, and that’s where packages come to the rescue.

Packages are a different system, and internally it will be handled differently, so you can use whatever domain you like in any package file you configure. That’s the beauty of it, and as you already noticed, it makes things way more logical.

You can setup your package files like you want to. Eg. with rooms, but also with other things. I personally like to set my packages up with their “meaning”. So I have a waste package, a router package, a flora package. I do have some room packages, but they are not a typical room package, in my case they’re for special things, like the kitchen. Eg. you have a fan, that “goes with you”. Mine is sitting on my desk right now, but if it’s to hot, I use it in the bedroom for the night. Where would you put that configuration? In “office_package” or in “bedroom_package”? Or much better, in a “fan_package.yaml”? You get the idea. :wink:

This gives you the flexibility to decide where you would remember it best - for me, this is the only logical approach on sorting things like that.

Long story short, if you use packages, you’ll have much more fun in the future! :slight_smile: And if you haven’t done a lot of configuration yet, it’s even more usable. You don’t have to move from a different system to packages…

So, start setting up packages in configuration.yaml, so you can use them. I use this approach:

homeassistant:
  packages: !include_dir_named packages

and then, in my folder /config/packages I just have all the different files for packages. Like this:

├── config
│   ├── packages
│   │   ├── flora_package.yaml
│   │   ├── waste_package.yaml
│   ├── configuration.yaml

Don’t take that the wrong way, but just start with packages, and if problems come up, just ask! :slight_smile:

But if I may suggest another good read, that will help you further down the road:

You might find some of the above advice in there to, eg. post #13:joy: :joy:

Adn one last thing, that people tend to forget: if you’re at the beginning, think of a naming convention for your devices. There’s not much, that is more tedious than renaming things later on…

I hope this gets you started, and as already said numerous times: Ask, if I’m not clear enough or if you have any other questions! :slight_smile: