def METHOD_NAME(self):
    """Gets the flow rate and volume."""
    if not self.sensor:
        self.logger.error("Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.")
        return
    if not self.pi.connected:  # Check if pigpiod is running
        self.logger.error("Could not connect to pigpiod. Ensure it is running and try again.")
        return
    self.return_dict = copy.deepcopy(measurements_dict)
    l_min, pulses = self.sensor.flow_period()
    total_pulses = self.sensor.total_pulses()
    total_volume = self.sensor.total_volume()
    self.logger.debug(
        "fLow: {} l/min, pulses: {}, total pulses: {}, total volume: {}".format(
            l_min, pulses, total_pulses, total_volume))
    self.value_set(0, l_min)
    self.value_set(1, total_volume)
    self.set_custom_option("total_pulses", total_pulses)
    return self.return_dict