def discrete(cls, name, description=None, unit='', params=None,
                 default=None, initial_status=None):
        """Instantiate a new discrete sensor object.

        Parameters
        ----------
        name : str
            The name of the sensor.
        description : str
            A short description of the sensor.
        units : str
            The units of the sensor value. May be the empty string
            if there are no applicable units.
        params : [str]
            Sequence of all allowable discrete sensor states
        default : str
            An initial value for the sensor. Defaults to the first item
            of params
        initial_status : int enum or None
            An initial status for the sensor. If None, defaults to
            Sensor.UNKNOWN. `initial_status` must be one of the keys in
            Sensor.STATUSES

        """
        return cls(cls.DISCRETE, name, description, unit, params,
                   default, initial_status)
Instantiate a new discrete sensor object.

        Parameters
        ----------
        name : str
            The name of the sensor.
        description : str
            A short description of the sensor.
        units : str
            The units of the sensor value. May be the empty string
            if there are no applicable units.
        params : [str]
            Sequence of all allowable discrete sensor states
        default : str
            An initial value for the sensor. Defaults to the first item
            of params
        initial_status : int enum or None
            An initial status for the sensor. If None, defaults to
            Sensor.UNKNOWN. `initial_status` must be one of the keys in
            Sensor.STATUSES