Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By ppet
#30937 You must enter into the sketch what you need:
In code below for test I add "Serial.println("SwitchON");" and it's working. So change it like you want.

Minute_Old = DateTime.minute;
if (config.AutoTurnOn)
{
if (DateTime.hour == config.TurnOnHour && DateTime.minute == config.TurnOnMinute)
{
Serial.println("SwitchON");
}
}


Minute_Old = DateTime.minute;
if (config.AutoTurnOff)
{
if (DateTime.hour == config.TurnOffHour && DateTime.minute == config.TurnOffMinute)
{
Serial.println("SwitchOff");
}