pyunifi
pyunifi copied to clipboard
switch_port_power_off error
switch_port_power_off or switch_port_power_on will fail: TypeError: list indices must be integers or slices, not dict.
I fixed it with replacing for i in overrides: with for i in range(len(overrides)): in _switch_port_power().
Is this replaced in the source code ? I did pip install pyunifi and got the error.
@marc-odp I don't think so, I never did a Pull Request and nobody else cared about this.
I think one solution to this issue is in discussion in Pull Requests : https://github.com/finish06/pyunifi/pull/70#issue-1096583226 However it is not yet in the Code.