Is it possible to have dependencies between Items?

Quick question:

Can an Item “depend” on another item?
Example: A switchable Outlet (B) which is connected to another switchable Outlet (A).

To turn B on one must first turn on A. If one tries to turn on B OpenHAB should check A and if A is off turn it on automatically.
Is that possible?

To make this more complicated: I’m having multiple Layers of dependencies. There is a networked Yamaha AVR connected to Outlet B so to play music the AVR must be on which means B must be on which means A must be on.

That’s what Rules are for. You will probably need Design Pattern: Proxy Item.

You can also use Groups. Put all the Items that need to be ON into a Group and sendCommand ON to that Group and all members of the Group will receive the ON command.

Thanks. That could work.
Although I’m still hoping that there is a cleaner way.

Using the proxy pattern, I would need to create a ProxyItem for every Item which should depend on another item. Chaining would work well by using that approach, though. :thinking: