Add >= condition to hour check to set sleeping state if inactivity >=3 hours