Fixes device commands.

On and off where the wrong way round. Capital P was missing from the dim command.