[SOLVED] Remote Power ON Computer (Wemos D1 mini + DHT22 +BMP280)

int PCLED;


timer.setInterval(1000L, PCpowerState); 


void PCpowerState() {
  PCLED = analogRead(A0);
  if (PCLED <= 100) {  // adjust accordingly
    // PC OFF
  } else if (PCLED >= 1000) {  // adjust accordingly
    // PC ON
  } else {
    // PC Standby
  }
}

BTW, A0 is only rated for 0-3v… not 5v :wink: if you don’t want to kill it, add in a 180K resistor in series.