From 5a0a7fe531d459fcf4eaaa8f1b4ca2305ee1d299 Mon Sep 17 00:00:00 2001 From: Kyle Gabriel Date: Tue, 11 Jun 2024 10:29:35 -0400 Subject: [PATCH] Fix for MCP23017 Pump Output --- mycodo/outputs/pump_mcp23017.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mycodo/outputs/pump_mcp23017.py b/mycodo/outputs/pump_mcp23017.py index 686b5b80b..0e7f41167 100644 --- a/mycodo/outputs/pump_mcp23017.py +++ b/mycodo/outputs/pump_mcp23017.py @@ -195,13 +195,7 @@ def initialize(self): for channel in channels_dict: try: self.currently_dispensing[channel] = False - self.output_states[channel] = False - if self.options_channels['state_startup'][channel] == 1: - self.turn_on_off(channel, "on") - elif self.options_channels['state_startup'][channel] == 0: - self.turn_on_off(channel, "off") - else: # Default state: Off - self.turn_on_off(channel, "off") + self.turn_on_off(channel, "off") except: self.logger.exception("Initializing startup state") return @@ -313,9 +307,6 @@ def output_switch(self, state, output_type=None, amount=None, output_channel=Non self.logger.error("Amount cannot be less than 0") return - if output_channel not in self.currently_dispensing: - self.currently_dispensing[output_channel] = False - self.logger.debug(f"state: {state}, output_type: {output_type}, amount: {amount}") if state == 'off':