rossko57
(Rossko57)
April 13, 2020, 4:37pm
4
Oleg_Andreych:
But it doesn’t solve a case for the physical switch, which doesn’t emit such an event.
Any suggestions on how to trigger the rule for the physical switch?
You can’t, if there is no event.
You can listen for changes in the dimmer state, as you do.
If openHAB didn’t command that, then it was an external event.
Determining who-done-it is harder.
Edit: Updates 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 details on what a DP is and how to use it.
Problem Statement
Sometimes you are in a situation where you want to know where a certain command came from but there is no way built into the binding or the device to tell the difference between a manually initiated command at the device or a command initiated by a rule or the sitemap. For example, when one wants t…