One of my projects leans heavily on triggers and scheduling and despite all efforts put in by @rsiegel and others they are not yet working flawlessly.
The triggers problem is simple it is not possible yet to create multiple triggers with the same IF. So a user (@shramiksalgaonkar) suggested to create a new (even two) buttons which includes the multiple actions later called some Rube Goldberg logic, hence my topic.
In my simplicity and sometime ignorance what the best coding is to achieve this I am using the code:
CAYENNE_IN(V10) // Because 2 is a crowd for triggers, 1 trigger for all Night Time events GO-GO-GO in testing
However did only does partly the trick, because the buttons V5 and V6 will turn on/off to the same status of V10 however without doing the actions behind V5 and V6. I was hoping it would do similar as if you would do a scheduling or a trigger. Example code (the action behind):
CAYENNE_IN(V5) // action switch lamp V5
Flamingo_Send(V5, getValue.asInt()); // ON/OFF
So looking for a solution without adding addition lines, true in this example it is only 2 lines for each action extra and I can be sloppy with programming because I am using an ESP8266 (Wemos D1 R2). But I need to copy this about ten times and not all sensors have the same coding.
Another really dirty solution is to add a delay so the connection with the server is lost and during “reboot” everything is set to the latest status (but this will result in loosing connection continuously)