I have found a lot of (old) posts and questions related to this subject, but no answer. I wonder if I missed something, because it seems so obvious.
Within ‘things’ files we are able to group channels within a thing and allow for some form of hierarchical addressing, e.g.:
Bridge mqtt:broker:mosquitto {
Thing topic 4ch_switch {
Channels:
Type switch : power12v [ stateTopic="stat/sonoff//4ch/POWER1"]
Type switch : power220v [ stateTopic="stat/sonoff/4ch/POWER2" ]
}
}
// just an illustrative example, might not be syntactically correct.
Where a channel is addressed in the items file as:
Switch mySwitch { channel = "mqtt:topic:mosquitto:4ch_switch:power12vl" }
Which seems logical and follows an hierarchical addressing scheme. (although imho it would be cleaner if the bridge “mqtt:broker:mosquitto” would also have a symbolical name and ‘topic’ would become after the bridge name)
However, with item naming I always find myself creating a kind of chaos with long names and underscores e.g.
Switch groundFloor_rear_garden_lamp1 { channel = "... "}
Switch groundFloor_rear_garden_lamp2 { channel = "... "}
Switch groundFloor_rear_garden_lamp3 { channel = "... "}
Is it possible somehow (or considered) to follow a more hierarchical approach here, something like:
groundFloor_rear_garden {
Switch lamp1 { channel = "... "}
Switch lamp1 { channel = "... "}
Switch lamp1 { channel = "... "}
}
It improves readability and makes it also easier to maintain.