Hi @Pabla 🙂
Thank you for your time, but let me try to better explain the situation I have using the air conditioner.
My equipment can be operated/command in three ways:
Remote control, which basically each function just turns on and off (let's call it SW1);
APP on the phone, which in this case knows the status of the device by WiFi integration / Samsung cloud (SW2);
Or by the dashboard mounted on Hubitat (SW3).
I will detail the use case of the actions and impacts.
a. Turning on the a/c through the HE dashboard (SW3), the virtual button activates the Samsung integration drive, setting the mode ON, this integration with the cloud updates the status of the APP (SW2), but the remote control thinks it is off ( SW1), as it has no integration, but the air will be turned on and it will work normally.
b. Turning on the air through the APP (SW2), through the integration with HE, the status of the drive is modified, so my rule turns on the SW3, aligning the dashboard.
c. The same thing happens if you use the control (SW1), the Samsung cloud is triggered, it updates the APP status, and the HE drive with the status modification triggers the rule that turns on the SW3 virtual button. In this case, the control now knows that air is connected.
As you can see, I have a rule that when switching SW1 or SW2 or SW3, it will in ON ways inform the status change and align the 3 SW for all to be ON.
In the case of turning off, it is the opposite way, any of the 3 SW can turn off, and a second rule makes the alignment to put the 3 SW in an OFF state.
As our friend @toggledbits mentioned, cave-mode is the easiest, create two rules, one for each situation and everything works, that's what I have today.
My puzzle is that since one rule is the opposite of the other, I thought of trying to have just one, using the SET and RESET situation.
As I demonstrated, the SET is easy, because anyone with the OR condition solves, one that is triggered, turns it ON and puts all the others in the same status, now turning OFF is the complicated thing, because it changes the condition from OR to AND, that is, SW1 and SW2 and SW3 have to be ON to keep the device ON, if any of them turns OFF you have to turn OFF all the others.
Well let's to follow the cave-mode which is easier for now, in the future our genius @toggledbits maybe create a Latch in reverse 🙂
Thanks.