with HABApp there is another option to create rules and automations for openHAB availabe. HABApp is based on Python 3 and is connected to openHAB trough the REST API. So if someone is familar with Python (3) it is a good idea to try it.
I started writng DSL rules with openHAB 1.x and based on this i think it is a good idea to setup up a collection of threads/topics to map well known DSL things to HABApp things and maybe learn some more options.
One of my favorites is the option to trigger a rule based on the change or update of a member on a group.
DSL Trigger
Member of <group> changed
HABApp Solution
class myClass(HABApp.Rule):
def __init__(self):
super().__init__()
for member in self.openhab.get_item('myGroup').members:
item = StringItem.get_item(member.name)
item.listen_event(self.myRule, ValueChangeEvent)
def myRule(self, event: ValueChangeEvent):
log.info(f'Item {event.name} changed from "{event.old_value}" to "{event.value}"')
myClass()
Idea in HABApp is to create a listener for each member of the group.
The Member of trigger is exactly what I was looking for. I would warmly suggest to @Spaceman_Spiff to include this example in the docs, because it is really useful.