Skip to content

Commit

Permalink
Fix MCP23017 Pump Output KeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Jun 6, 2024
1 parent a576d18 commit f230afb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mycodo/outputs/pump_mcp23017.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ 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':
Expand Down

1 comment on commit f230afb

@kizniche
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Radical DIY Forum. There might be relevant details there:

https://forum.radicaldiy.com/t/need-help-configuring-mcp23017-for-peristaltic-pumps-in-mycodo/1879/7

Please sign in to comment.