Restore command line switch state after restart

If no command_state and value_template are specified then just restore last state.
Like input_boolean and light do.
Now it resets to off.