Skip to content

Commit

Permalink
invert power state
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-godinez committed Aug 14, 2024
1 parent 80edbe1 commit d07fffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platformAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class OpenSaunaAccessory {

// Utility to set power state on GPIO
private setPowerState(pins: number[], state: CharacteristicValue) {
const powerState = state ? rpio.HIGH : rpio.LOW;
const powerState = state ? rpio.LOW : rpio.HIGH; // Invert logic if relays are active low
pins.forEach((pin) => {
rpio.open(pin, rpio.OUTPUT);
rpio.write(pin, powerState);
Expand Down

0 comments on commit d07fffa

Please sign in to comment.