Skip to content

Commit

Permalink
fix: switch init state
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak authored Jun 14, 2024
1 parent e63fb59 commit 959d304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/mcp2221/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(
self._pin = pin

# init GP
prev_state = False
self._state = prev_state = False

if self._device.GetGPType(self._pin) == MCP2221.TYPE.OUTPUT:
prev_state = bool(self._device.ReadGP(self._pin))
Expand Down

0 comments on commit 959d304

Please sign in to comment.