Room automation project

UKHeliBob:
It sounds like a Finite State Machine (FSM) would do what you want.

Sounds scary but isn't. Use switch/case and have the code in a WAITING case wait until the trigger phrase is heard then switch to a RESPONDING case to wait for a command for a period. Use millis() to time the period so that code execution is not blocked. If a command is received then act on it and return to the WAITING state, similarly if the period ends.

If you are not familiar with using millis() for timing then you may find
Using millis() for timing. A beginners guide useful.

Thanx for the reply and i understand what do you mean and I imagining by myself somehow like you described, but the problem is that i am really quite shitty programmer i know that i need only maybe 4 or some code lines to add here, but it will be difficult to me and it will take maybe more than a day, because - ye I dont even familiar with that mills() function I can even send lets say 3 euros (through paypal or revolut) to some, who will add these few additional lines :slight_smile: