I want to have a battery powered ESP8622 with a switch component. Can I somehow achieve that the switch can be operated at any time, but will only take effect once the ESP restarts from deepsleep? At the moment I get an error message when I want to change the state of that switch during deepsleep.
Never tried it but perhaps something like a boolean that you flip.
This boolean triggers an automation to wait for the device to reconnect, when it has reconnected it sends the state change.