def set_weather(self, weather_type):
        """Queue up a set weather command. It will be applied when `tick` or `step` is called next.
        By the next tick, the lighting, skysphere, fog, and relevant particle systems will be updated and/or spawned
        to the given weather. If there is no skysphere or directional light in the world, the command may not function
        properly but will not cause a crash.

        NOTE: Because this command can effect the fog density, any changes made by a change_fog_density command before
        a set_weather command called will be undone. It is recommended to call change_fog_density after calling set
        weather.

        Args:
            weather_type (str): The type of weather, which can be 'Rain' or 'Cloudy'. In all downloadable worlds,
            the weather is clear by default. If the given type string is not available, the command will not be sent.

        """
        if not SetWeatherCommand.has_type(weather_type.lower()):
            raise HolodeckException("Invalid weather type " + weather_type)

        self._should_write_to_command_buffer = True
        command_to_send = SetWeatherCommand(weather_type.lower())
        self._commands.add_command(command_to_send)