def add_sensor(self, sensor):
        """
        Add a new sensor to the container.

        :type sensor: ``dict``
        """
        sensor_id = self._get_sensor_id(sensor=sensor)

        if sensor_id in self._sensors:
            LOG.warning("Sensor %s already exists and running.", sensor_id)
            return False

        self._spawn_sensor_process(sensor=sensor)
        LOG.debug("Sensor %s started.", sensor_id)
        self._sensors[sensor_id] = sensor
        return True

        Add a new sensor to the container.

        :type sensor: ``dict``
        
st2reactor/st2reactor/container/process_container.py