borisbu / OctoRelay

OctoPrint / Octopi plugin to control relays
GNU Affero General Public License v3.0
43 stars 24 forks source link

Avoid excessive switches on startup #293

Closed RobinTail closed 2 weeks ago

RobinTail commented 1 month ago

If relay is inverted, gpiozero sets its initial value to false, which turns it on, because false is the default initial value in docs:

https://gpiozero.readthedocs.io/en/latest/api_output.html#led

coveralls commented 1 month ago

Coverage Status

coverage: 100.0%. remained the same when pulling e8c4edf20e16af3ccc29e6d368439e3e0a5c3fa9 on fix-switching-on-startup into c4211fd9de1e713ecf1730992ae2404ccee565c5 on develop.