It is not really clear to me where you want to go with it, but if you want a way to make a more generic rule, you might be interested to read up on how to trigger behaviors over rules using groups:
Edit: Updates for OH 4, inclusion of JS Scripting and Blockly examples, removed the doors example as it’s superfluous.
Please see https://community.openhab.org/t/design-pattern-what-is-a-design-pattern-and-how-do-i-use-them/40319 for how to read and use DPs.
Problem Statement
One powerful way to consolidate code in rules is to use array/list manipulation operations on the members of a Group. For example, filter down to just those members that are ON, get a list of the labels of those Items tha…
Edit: Rewritten for OH 4.
Please see https://community.openhab.org/t/design-pattern-what-is-a-design-pattern-and-how-do-i-use-them/40319 for a description of what Design Patterns are and how to use them.
Problem Statement
Many sensors report status to openHAB periodically (e.g. temperature sensor) or unpredictably (e.g. motion sensors) and a subset of these sensors do not have a built in way for openHAB to query whether or not they are alive. The only way for openHAB to detect that these devic…
1 Like