Better handling of opened/closed window sensors