Is it possible to have things and channels in seperate files (textual config)

  • Platform information:
    • Dockerized OH 4.0.3
  • Issue of the topic: Is it possible to keep things and their channels in seperate files

I am using seperate openHAB configurations for my “productive” and “testbed” environments, and keep their setups in textual config files, many of which are generated via scripts (python with jinja2 templates). Main reason being that I’m a software developer at heart :slight_smile:

So, one issue which cropped up and is not easily solvable with my current scripting is that the chatgpt addon has multiple chats modelled as channels. Is it possible at all to have the channels in their seperate files, like seperating Things from their respective Bridge files (where applicable), or do the channels always have to be in the same file as the Thing ?

If nothing else, consider this an item of academic curiosity, with no real impact on day-to-day usage of openHAB :slight_smile:

Thing chatgpt:account:ultio "Major Domus"
[
    apiKey="MY-SECRET"
]
{
    Channels:
        Type chat : weather_advice "Weather Advice" [ ... ]
        Type chat : morning_message "Morning Message" [ ... ]
        Type chat : evening_message "Evening Message" [ ... ]
}

I believe the answer is no.

I believe this answer is yes. Just take care that your Thing UID follows the required pattern (i.e. bridgetUID:thing).

Thank you… I’ll modify my setup to work with this, maybe in the end, I would have ended up with too many itty bitty little files… Might be for the better in the end :slight_smile: