'Initialize a new OctoPrint sensor.'

def __init__(self, api, condition, sensor_type, sensor_name, unit, endpoint, group, tool=None):

    self.sensor_name = sensor_name
    if (tool is None):
        self._name = '{}    {}'.format(sensor_name, condition)
    else:
        self._name = '{}    {}    {}    {}'.format(sensor_name, condition, tool, 'temp')
    self.sensor_type = sensor_type
    self.api = api
    self._state = None
    self._unit_of_measurement = unit
    self.api_endpoint = endpoint
    self.api_group = group
    self.api_tool = tool
    _LOGGER.debug('Created    OctoPrint    sensor    %r', self)
