Skip to content

Wrong WakeUp/Bedtime login in WakePiPeriodicallyDuringDay #8

@daghemo

Description

@daghemo

Maybe I'm wrong, but I think that the following code from the WakePiPeriodicallyDuringDay example is not good:

if((now.hour() >= WakeUp_StartHour) && now.minute() >= WakeUp_StartMinute) {
    if((now.hour() <= Bedtime_StartHour) && now.minute() <= Bedtime_StartMinute)

Just try with WakeUp set to 7:00 and Bedtime set to 20:00. Both conditions will match only if now.minute() is 00, that is only in the first minute of every hour, not every minute of every hour in the WakeUp/Bedtime time range.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions