Package Use

Malcolm, a quick note on how the forum works (Phil told me this not Alllllll that long ago) .
If anyone replies to the thread, then the OP will get a notification.
It’s not ‘my’ thread so I don’t, I only saw because I was cruising the topics.
If you reply to MY post then I get a notification too
Alternatively you can tag someone like @Malcolm_Smart then they get alerted
Be careful with the last one (tagging), some people object, especially when used as a shot gun “PLEASE HELP ME!!!” (as in shouting, you haven’t, don’t worry) Is often poorly received.
I’m sure you’ll be fine but forewarned is forearmed :smiley:

I also notice you’ve not read the guidelines, I think there’s a link from Tinkerer’s sticky which is also a good read

I have recently started using HA and I have looked through a number of git configurations and wonder why people don’t use packages more, it seems sensible for example for garage door opener, to group the customization - icons, friendly names, sensors (door) and switch with the automation all together in one file, rather than scattered around in separate files.

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

each package file then contains

homeassistant:
  customize:
    <customizations>

sensor:
  <sensors>

switch:
  <switches>

automation:
  <any automations for this thing>

etc.

The (simple) examples seem to be copied, so that the complex HA setup that appear in github seem very unwieldy.
packages seems to me a much more OO way of managing HA so I am surprised it is not more widespread.
Is it just inertia that prevents their use?

To each his own. Some people have another logic to group things than you do, so their packages will group other things. Some people separate by room, some by integration (all switches together, all input booleans together, etc.). You need to find out what works best for you.

Small question, where do you put the door sensor in your logic, if it is used for the doorbell part, but it’s also used for the alarm system? Does it go into the doorbell package or the alarm package? And why?

I don’t think you mean ‘Small question’ - you mean you can find something that ‘breaks’ this way of thinking about groups of objects - of course there will be exceptions, my answer would be somewhere logical and refactor if subsequently it appears to be in the wrong place :slight_smile: