diff --git a/pi_mqtt_gpio/modules/mcp3008.py b/pi_mqtt_gpio/modules/mcp3008.py
index a06fb4f0628014ab98f7b54840983b68d4640139..18c583a5464cf0437d45d56018208d85e7b72b85 100644
--- a/pi_mqtt_gpio/modules/mcp3008.py
+++ b/pi_mqtt_gpio/modules/mcp3008.py
@@ -49,7 +49,7 @@ class Sensor(GenericSensor):
         _LOG.warning("MCP3008: Reading from channel %r", channel)
         if channel == "invalid":
             raise Exception("Channel '" + config["channel"] + "' not found!")
-        value = self.mcp.read_adc(i)
+        value = self.mcp.read_adc(channel)
         _LOG.warning("MCP3008: value %d", value)
         return value