Reworked handling of commands to sleeping devices